'Tis the season!
- Decked the halls - Jingled the bells - Wrapped the presents - Loaded up the sleigh
@@ -32,6 +32,7 @@ import net.minecraftforge.fml.common.registry.GameRegistry;
|
|||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.util.Calendar;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <i>"Electroblob's Wizardry adds an RPG-like system of spells to Minecraft, with the aim of being as playable as
|
* <i>"Electroblob's Wizardry adds an RPG-like system of spells to Minecraft, with the aim of being as playable as
|
||||||
@@ -88,6 +89,8 @@ public class Wizardry {
|
|||||||
* this folder contains the main config file and the global spell properties folder, if used. */
|
* this folder contains the main config file and the global spell properties folder, if used. */
|
||||||
public static File configDirectory;
|
public static File configDirectory;
|
||||||
|
|
||||||
|
public static boolean tisTheSeason;
|
||||||
|
|
||||||
// The instance of wizardry that Forge uses.
|
// The instance of wizardry that Forge uses.
|
||||||
@Instance(Wizardry.MODID)
|
@Instance(Wizardry.MODID)
|
||||||
public static Wizardry instance;
|
public static Wizardry instance;
|
||||||
@@ -106,6 +109,10 @@ public class Wizardry {
|
|||||||
configDirectory = new File(event.getModConfigurationDirectory(), Wizardry.MODID);
|
configDirectory = new File(event.getModConfigurationDirectory(), Wizardry.MODID);
|
||||||
settings.initConfig(event);
|
settings.initConfig(event);
|
||||||
|
|
||||||
|
Calendar calendar = Calendar.getInstance();
|
||||||
|
tisTheSeason = calendar.get(Calendar.MONTH) + 1 == 12 && calendar.get(Calendar.DAY_OF_MONTH) >= 24
|
||||||
|
&& calendar.get(Calendar.DAY_OF_MONTH) <= 26;
|
||||||
|
|
||||||
// Capabilities
|
// Capabilities
|
||||||
WizardData.register();
|
WizardData.register();
|
||||||
DispenserCastingData.register();
|
DispenserCastingData.register();
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package electroblob.wizardry.client.model;
|
package electroblob.wizardry.client.model;
|
||||||
|
|
||||||
|
import electroblob.wizardry.Wizardry;
|
||||||
import electroblob.wizardry.block.BlockStatue;
|
import electroblob.wizardry.block.BlockStatue;
|
||||||
import net.minecraft.client.model.ModelRenderer;
|
import net.minecraft.client.model.ModelRenderer;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
@@ -13,6 +14,7 @@ public class ModelWizardArmour extends ModelArmourFixer {
|
|||||||
ModelRenderer hatSegment4;
|
ModelRenderer hatSegment4;
|
||||||
ModelRenderer hatSegment5;
|
ModelRenderer hatSegment5;
|
||||||
ModelRenderer hatSegment6;
|
ModelRenderer hatSegment6;
|
||||||
|
ModelRenderer hatBobble;
|
||||||
ModelRenderer robe;
|
ModelRenderer robe;
|
||||||
|
|
||||||
public ModelWizardArmour(float delta){
|
public ModelWizardArmour(float delta){
|
||||||
@@ -75,6 +77,13 @@ public class ModelWizardArmour extends ModelArmourFixer {
|
|||||||
hatSegment6.mirror = true;
|
hatSegment6.mirror = true;
|
||||||
setRotation(hatSegment6, -0.5585054F, 0F, 0F);
|
setRotation(hatSegment6, -0.5585054F, 0F, 0F);
|
||||||
|
|
||||||
|
hatBobble = new ModelRenderer(this, 52, 47);
|
||||||
|
hatBobble.addBox(0F, 0F, 0F, 3, 3, 3);
|
||||||
|
hatBobble.setRotationPoint(-1.5F, -15.1F, 4F);
|
||||||
|
hatBobble.setTextureSize(64, 64);
|
||||||
|
hatBobble.mirror = true;
|
||||||
|
setRotation(hatBobble, -0.65F, 0F, 0F);
|
||||||
|
|
||||||
bipedBody = new ModelRenderer(this, 16, 16);
|
bipedBody = new ModelRenderer(this, 16, 16);
|
||||||
bipedBody.addBox(-4F, 0F, -2F, 8, 11, 4, delta);
|
bipedBody.addBox(-4F, 0F, -2F, 8, 11, 4, delta);
|
||||||
bipedBody.setRotationPoint(0F, 0F, 0F);
|
bipedBody.setRotationPoint(0F, 0F, 0F);
|
||||||
@@ -97,6 +106,7 @@ public class ModelWizardArmour extends ModelArmourFixer {
|
|||||||
bipedHead.addChild(hatSegment4);
|
bipedHead.addChild(hatSegment4);
|
||||||
bipedHead.addChild(hatSegment5);
|
bipedHead.addChild(hatSegment5);
|
||||||
bipedHead.addChild(hatSegment6);
|
bipedHead.addChild(hatSegment6);
|
||||||
|
bipedHead.addChild(hatBobble);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5){
|
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5){
|
||||||
@@ -129,6 +139,8 @@ public class ModelWizardArmour extends ModelArmourFixer {
|
|||||||
this.robe.rotateAngleX = (this.bipedLeftLeg.rotateAngleX + this.bipedRightLeg.rotateAngleX) / 2f;
|
this.robe.rotateAngleX = (this.bipedLeftLeg.rotateAngleX + this.bipedRightLeg.rotateAngleX) / 2f;
|
||||||
this.robe.rotateAngleY = this.bipedBody.rotateAngleY;
|
this.robe.rotateAngleY = this.bipedBody.rotateAngleY;
|
||||||
this.robe.rotateAngleZ = (this.bipedLeftLeg.rotateAngleZ + this.bipedRightLeg.rotateAngleZ) / 2f;
|
this.robe.rotateAngleZ = (this.bipedLeftLeg.rotateAngleZ + this.bipedRightLeg.rotateAngleZ) / 2f;
|
||||||
|
|
||||||
|
this.hatBobble.showModel = Wizardry.tisTheSeason;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -67,10 +67,10 @@ public final class WizardryModels {
|
|||||||
|
|
||||||
registerMultiTexturedModel((ItemCrystal)WizardryItems.magic_crystal);
|
registerMultiTexturedModel((ItemCrystal)WizardryItems.magic_crystal);
|
||||||
|
|
||||||
registerItemModel(WizardryItems.magic_wand);
|
registerWandModel(WizardryItems.magic_wand);
|
||||||
registerItemModel(WizardryItems.apprentice_wand);
|
registerWandModel(WizardryItems.apprentice_wand);
|
||||||
registerItemModel(WizardryItems.advanced_wand);
|
registerWandModel(WizardryItems.advanced_wand);
|
||||||
registerItemModel(WizardryItems.master_wand);
|
registerWandModel(WizardryItems.master_wand);
|
||||||
|
|
||||||
registerItemModel(WizardryItems.spell_book);
|
registerItemModel(WizardryItems.spell_book);
|
||||||
// Wildcard registered for wizard trades.
|
// Wildcard registered for wizard trades.
|
||||||
@@ -78,37 +78,37 @@ public final class WizardryModels {
|
|||||||
registerItemModel(WizardryItems.arcane_tome);
|
registerItemModel(WizardryItems.arcane_tome);
|
||||||
registerItemModel(WizardryItems.wizard_handbook);
|
registerItemModel(WizardryItems.wizard_handbook);
|
||||||
|
|
||||||
registerItemModel(WizardryItems.novice_fire_wand);
|
registerWandModel(WizardryItems.novice_fire_wand);
|
||||||
registerItemModel(WizardryItems.novice_ice_wand);
|
registerWandModel(WizardryItems.novice_ice_wand);
|
||||||
registerItemModel(WizardryItems.novice_lightning_wand);
|
registerWandModel(WizardryItems.novice_lightning_wand);
|
||||||
registerItemModel(WizardryItems.novice_necromancy_wand);
|
registerWandModel(WizardryItems.novice_necromancy_wand);
|
||||||
registerItemModel(WizardryItems.novice_earth_wand);
|
registerWandModel(WizardryItems.novice_earth_wand);
|
||||||
registerItemModel(WizardryItems.novice_sorcery_wand);
|
registerWandModel(WizardryItems.novice_sorcery_wand);
|
||||||
registerItemModel(WizardryItems.novice_healing_wand);
|
registerWandModel(WizardryItems.novice_healing_wand);
|
||||||
|
|
||||||
registerItemModel(WizardryItems.apprentice_fire_wand);
|
registerWandModel(WizardryItems.apprentice_fire_wand);
|
||||||
registerItemModel(WizardryItems.apprentice_ice_wand);
|
registerWandModel(WizardryItems.apprentice_ice_wand);
|
||||||
registerItemModel(WizardryItems.apprentice_lightning_wand);
|
registerWandModel(WizardryItems.apprentice_lightning_wand);
|
||||||
registerItemModel(WizardryItems.apprentice_necromancy_wand);
|
registerWandModel(WizardryItems.apprentice_necromancy_wand);
|
||||||
registerItemModel(WizardryItems.apprentice_earth_wand);
|
registerWandModel(WizardryItems.apprentice_earth_wand);
|
||||||
registerItemModel(WizardryItems.apprentice_sorcery_wand);
|
registerWandModel(WizardryItems.apprentice_sorcery_wand);
|
||||||
registerItemModel(WizardryItems.apprentice_healing_wand);
|
registerWandModel(WizardryItems.apprentice_healing_wand);
|
||||||
|
|
||||||
registerItemModel(WizardryItems.advanced_fire_wand);
|
registerWandModel(WizardryItems.advanced_fire_wand);
|
||||||
registerItemModel(WizardryItems.advanced_ice_wand);
|
registerWandModel(WizardryItems.advanced_ice_wand);
|
||||||
registerItemModel(WizardryItems.advanced_lightning_wand);
|
registerWandModel(WizardryItems.advanced_lightning_wand);
|
||||||
registerItemModel(WizardryItems.advanced_necromancy_wand);
|
registerWandModel(WizardryItems.advanced_necromancy_wand);
|
||||||
registerItemModel(WizardryItems.advanced_earth_wand);
|
registerWandModel(WizardryItems.advanced_earth_wand);
|
||||||
registerItemModel(WizardryItems.advanced_sorcery_wand);
|
registerWandModel(WizardryItems.advanced_sorcery_wand);
|
||||||
registerItemModel(WizardryItems.advanced_healing_wand);
|
registerWandModel(WizardryItems.advanced_healing_wand);
|
||||||
|
|
||||||
registerItemModel(WizardryItems.master_fire_wand);
|
registerWandModel(WizardryItems.master_fire_wand);
|
||||||
registerItemModel(WizardryItems.master_ice_wand);
|
registerWandModel(WizardryItems.master_ice_wand);
|
||||||
registerItemModel(WizardryItems.master_lightning_wand);
|
registerWandModel(WizardryItems.master_lightning_wand);
|
||||||
registerItemModel(WizardryItems.master_necromancy_wand);
|
registerWandModel(WizardryItems.master_necromancy_wand);
|
||||||
registerItemModel(WizardryItems.master_earth_wand);
|
registerWandModel(WizardryItems.master_earth_wand);
|
||||||
registerItemModel(WizardryItems.master_sorcery_wand);
|
registerWandModel(WizardryItems.master_sorcery_wand);
|
||||||
registerItemModel(WizardryItems.master_healing_wand);
|
registerWandModel(WizardryItems.master_healing_wand);
|
||||||
|
|
||||||
registerItemModel(WizardryItems.spectral_sword);
|
registerItemModel(WizardryItems.spectral_sword);
|
||||||
registerItemModel(WizardryItems.spectral_pickaxe);
|
registerItemModel(WizardryItems.spectral_pickaxe);
|
||||||
@@ -304,6 +304,23 @@ public final class WizardryModels {
|
|||||||
ModelLoader.setCustomMeshDefinition(item, s -> new ModelResourceLocation(item.getRegistryName(), "inventory"));
|
ModelLoader.setCustomMeshDefinition(item, s -> new ModelResourceLocation(item.getRegistryName(), "inventory"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Registers a wand model, using the item's registry name as the model name (this convention makes it easier to
|
||||||
|
* keep track of everything).
|
||||||
|
*/
|
||||||
|
private static void registerWandModel(Item item){
|
||||||
|
|
||||||
|
if(Wizardry.tisTheSeason){
|
||||||
|
// Changing the last parameter from null to "inventory" fixed the item/block model weirdness. No idea why!
|
||||||
|
ModelBakery.registerItemVariants(item, new ModelResourceLocation("ebwizardry:festive_wand", "inventory"));
|
||||||
|
// Assigns the model for all metadata values
|
||||||
|
ModelLoader.setCustomMeshDefinition(item, s -> new ModelResourceLocation("ebwizardry:festive_wand", "inventory"));
|
||||||
|
}else{
|
||||||
|
registerItemModel(item);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Registers an item model, using the itemstack-sensitive {@link IMultiTexturedItem#getModelName(ItemStack)} as the
|
* Registers an item model, using the itemstack-sensitive {@link IMultiTexturedItem#getModelName(ItemStack)} as the
|
||||||
* model name. This allows items to change their texture based on metadata/NBT. Variant defaults to "normal". Registers the
|
* model name. This allows items to change their texture based on metadata/NBT. Variant defaults to "normal". Registers the
|
||||||
|
|||||||
@@ -218,7 +218,8 @@ public class EntityWizard extends EntityCreature implements INpc, IMerchant, ISp
|
|||||||
// Copied from EntityVillager
|
// Copied from EntityVillager
|
||||||
if(!this.world.isRemote && this.livingSoundTime > -this.getTalkInterval() + 20){
|
if(!this.world.isRemote && this.livingSoundTime > -this.getTalkInterval() + 20){
|
||||||
this.livingSoundTime = -this.getTalkInterval();
|
this.livingSoundTime = -this.getTalkInterval();
|
||||||
this.playSound(stack.isEmpty() ? WizardrySounds.ENTITY_WIZARD_NO : WizardrySounds.ENTITY_WIZARD_YES, this.getSoundVolume(), this.getSoundPitch());
|
SoundEvent yes = Wizardry.tisTheSeason ? WizardrySounds.ENTITY_WIZARD_HOHOHO : WizardrySounds.ENTITY_WIZARD_YES;
|
||||||
|
this.playSound(stack.isEmpty() ? WizardrySounds.ENTITY_WIZARD_NO : yes, this.getSoundVolume(), this.getSoundPitch());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -256,6 +257,7 @@ public class EntityWizard extends EntityCreature implements INpc, IMerchant, ISp
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SoundEvent getAmbientSound(){
|
protected SoundEvent getAmbientSound(){
|
||||||
|
if(Wizardry.tisTheSeason) return WizardrySounds.ENTITY_WIZARD_HOHOHO;
|
||||||
return this.isTrading() ? WizardrySounds.ENTITY_WIZARD_TRADING : WizardrySounds.ENTITY_WIZARD_AMBIENT;
|
return this.isTrading() ? WizardrySounds.ENTITY_WIZARD_TRADING : WizardrySounds.ENTITY_WIZARD_AMBIENT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package electroblob.wizardry.entity.projectile;
|
package electroblob.wizardry.entity.projectile;
|
||||||
|
|
||||||
|
import electroblob.wizardry.Wizardry;
|
||||||
import electroblob.wizardry.registry.Spells;
|
import electroblob.wizardry.registry.Spells;
|
||||||
import electroblob.wizardry.registry.WizardrySounds;
|
import electroblob.wizardry.registry.WizardrySounds;
|
||||||
import electroblob.wizardry.spell.Spell;
|
import electroblob.wizardry.spell.Spell;
|
||||||
@@ -44,15 +45,34 @@ public class EntityMagicMissile extends EntityMagicArrow {
|
|||||||
public void tickInAir(){
|
public void tickInAir(){
|
||||||
|
|
||||||
if(this.world.isRemote){
|
if(this.world.isRemote){
|
||||||
ParticleBuilder.create(Type.SPARKLE, rand, posX, posY, posZ, 0.03, true).clr(1, 1, 0.65f).fade(0.7f, 0, 1)
|
|
||||||
.time(20 + rand.nextInt(10)).spawn(world);
|
|
||||||
|
|
||||||
if(this.ticksExisted > 1){ // Don't spawn particles behind where it started!
|
if(Wizardry.tisTheSeason){
|
||||||
double x = posX - motionX/2;
|
|
||||||
double y = posY - motionY/2;
|
ParticleBuilder.create(Type.SPARKLE, rand, posX, posY, posZ, 0.03, true).clr(0.8f, 0.15f, 0.15f)
|
||||||
double z = posZ - motionZ/2;
|
.time(20 + rand.nextInt(10)).spawn(world);
|
||||||
ParticleBuilder.create(Type.SPARKLE, rand, x, y, z, 0.03, true).clr(1, 1, 0.65f).fade(0.7f, 0, 1)
|
|
||||||
.time(20 + rand.nextInt(10)).spawn(world);
|
ParticleBuilder.create(Type.SNOW).pos(posX, posY, posZ).spawn(world);
|
||||||
|
|
||||||
|
if(this.ticksExisted > 1){ // Don't spawn particles behind where it started!
|
||||||
|
double x = posX - motionX / 2;
|
||||||
|
double y = posY - motionY / 2;
|
||||||
|
double z = posZ - motionZ / 2;
|
||||||
|
ParticleBuilder.create(Type.SPARKLE, rand, x, y, z, 0.03, true).clr(0.15f, 0.7f, 0.15f)
|
||||||
|
.time(20 + rand.nextInt(10)).spawn(world);
|
||||||
|
}
|
||||||
|
|
||||||
|
}else{
|
||||||
|
|
||||||
|
ParticleBuilder.create(Type.SPARKLE, rand, posX, posY, posZ, 0.03, true).clr(1, 1, 0.65f).fade(0.7f, 0, 1)
|
||||||
|
.time(20 + rand.nextInt(10)).spawn(world);
|
||||||
|
|
||||||
|
if(this.ticksExisted > 1){ // Don't spawn particles behind where it started!
|
||||||
|
double x = posX - motionX / 2;
|
||||||
|
double y = posY - motionY / 2;
|
||||||
|
double z = posZ - motionZ / 2;
|
||||||
|
ParticleBuilder.create(Type.SPARKLE, rand, x, y, z, 0.03, true).clr(1, 1, 0.65f).fade(0.7f, 0, 1)
|
||||||
|
.time(20 + rand.nextInt(10)).spawn(world);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package electroblob.wizardry.item;
|
package electroblob.wizardry.item;
|
||||||
|
|
||||||
|
import electroblob.wizardry.Wizardry;
|
||||||
import electroblob.wizardry.constants.Constants;
|
import electroblob.wizardry.constants.Constants;
|
||||||
import electroblob.wizardry.data.WizardData;
|
import electroblob.wizardry.data.WizardData;
|
||||||
import electroblob.wizardry.registry.Spells;
|
import electroblob.wizardry.registry.Spells;
|
||||||
@@ -11,11 +12,13 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||||||
import net.minecraft.inventory.Slot;
|
import net.minecraft.inventory.Slot;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
|
||||||
public class ItemBlankScroll extends Item implements IWorkbenchItem {
|
public class ItemBlankScroll extends Item implements IWorkbenchItem {
|
||||||
|
|
||||||
public ItemBlankScroll(){
|
public ItemBlankScroll(){
|
||||||
this.setCreativeTab(WizardryTabs.WIZARDRY);
|
this.setCreativeTab(WizardryTabs.WIZARDRY);
|
||||||
|
this.addPropertyOverride(new ResourceLocation("festive"), (s, w, e) -> Wizardry.tisTheSeason ? 1 : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -14,10 +14,7 @@ import net.minecraft.entity.EntityLivingBase;
|
|||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.ActionResult;
|
import net.minecraft.util.*;
|
||||||
import net.minecraft.util.EnumActionResult;
|
|
||||||
import net.minecraft.util.EnumHand;
|
|
||||||
import net.minecraft.util.NonNullList;
|
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.common.MinecraftForge;
|
import net.minecraftforge.common.MinecraftForge;
|
||||||
import net.minecraftforge.fml.common.network.simpleimpl.IMessage;
|
import net.minecraftforge.fml.common.network.simpleimpl.IMessage;
|
||||||
@@ -37,6 +34,7 @@ public class ItemScroll extends Item implements ISpellCastingItem {
|
|||||||
setHasSubtypes(true);
|
setHasSubtypes(true);
|
||||||
setMaxStackSize(16);
|
setMaxStackSize(16);
|
||||||
setCreativeTab(WizardryTabs.SPELLS);
|
setCreativeTab(WizardryTabs.SPELLS);
|
||||||
|
this.addPropertyOverride(new ResourceLocation("festive"), (s, w, e) -> Wizardry.tisTheSeason ? 1 : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ public class ItemSpellBook extends Item {
|
|||||||
setHasSubtypes(true);
|
setHasSubtypes(true);
|
||||||
setMaxStackSize(16);
|
setMaxStackSize(16);
|
||||||
setCreativeTab(WizardryTabs.SPELLS);
|
setCreativeTab(WizardryTabs.SPELLS);
|
||||||
|
this.addPropertyOverride(new ResourceLocation("festive"), (s, w, e) -> Wizardry.tisTheSeason ? 1 : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -27,10 +27,7 @@ import net.minecraft.inventory.Slot;
|
|||||||
import net.minecraft.item.EnumAction;
|
import net.minecraft.item.EnumAction;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.ActionResult;
|
import net.minecraft.util.*;
|
||||||
import net.minecraft.util.EnumActionResult;
|
|
||||||
import net.minecraft.util.EnumHand;
|
|
||||||
import net.minecraft.util.SoundCategory;
|
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.util.math.RayTraceResult;
|
import net.minecraft.util.math.RayTraceResult;
|
||||||
import net.minecraft.util.math.Vec3d;
|
import net.minecraft.util.math.Vec3d;
|
||||||
|
|||||||
@@ -178,9 +178,14 @@ public class ItemWizardArmour extends ItemArmor implements IWorkbenchItem, IMana
|
|||||||
|
|
||||||
String s = "wizard_armour";
|
String s = "wizard_armour";
|
||||||
|
|
||||||
if(this.element != null) s = s + "_" + this.element.getName();
|
if(Wizardry.tisTheSeason){
|
||||||
|
s = s + "_festive";
|
||||||
|
}else{
|
||||||
|
if(this.element != null) s = s + "_" + this.element.getName();
|
||||||
|
if(stack.hasTagCompound() && stack.getTagCompound().getBoolean("legendary")) s = "legendary_" + s;
|
||||||
|
}
|
||||||
|
|
||||||
if(slot == EntityEquipmentSlot.LEGS) s = s + "_legs";
|
if(slot == EntityEquipmentSlot.LEGS) s = s + "_legs";
|
||||||
if(stack.hasTagCompound() && stack.getTagCompound().getBoolean("legendary")) s = "legendary_" + s;
|
|
||||||
|
|
||||||
return "ebwizardry:textures/armour/" + s + ".png";
|
return "ebwizardry:textures/armour/" + s + ".png";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -243,7 +243,12 @@ public final class Spells {
|
|||||||
IForgeRegistry<Spell> registry = event.getRegistry();
|
IForgeRegistry<Spell> registry = event.getRegistry();
|
||||||
|
|
||||||
registry.register(new None());
|
registry.register(new None());
|
||||||
registry.register(new SpellArrow<>("magic_missile", EntityMagicMissile::new).addProperties(Spell.DAMAGE).soundValues(1, 1.4f, 0.4f));
|
registry.register(new SpellArrow<EntityMagicMissile>("magic_missile", EntityMagicMissile::new){
|
||||||
|
@Override
|
||||||
|
protected String getTranslationKey(){
|
||||||
|
return Wizardry.tisTheSeason ? super.getTranslationKey() + "_festive" : super.getTranslationKey();
|
||||||
|
}
|
||||||
|
}.addProperties(Spell.DAMAGE).soundValues(1, 1.4f, 0.4f));
|
||||||
registry.register(new Ignite());
|
registry.register(new Ignite());
|
||||||
registry.register(new Freeze());
|
registry.register(new Freeze());
|
||||||
registry.register(new Snowball());
|
registry.register(new Snowball());
|
||||||
|
|||||||
@@ -88,6 +88,7 @@ public final class WizardrySounds {
|
|||||||
public static final SoundEvent ENTITY_WIZARD_TRADING = createSound("entity.wizard.trading");
|
public static final SoundEvent ENTITY_WIZARD_TRADING = createSound("entity.wizard.trading");
|
||||||
public static final SoundEvent ENTITY_WIZARD_HURT = createSound("entity.wizard.hurt");
|
public static final SoundEvent ENTITY_WIZARD_HURT = createSound("entity.wizard.hurt");
|
||||||
public static final SoundEvent ENTITY_WIZARD_DEATH = createSound("entity.wizard.death");
|
public static final SoundEvent ENTITY_WIZARD_DEATH = createSound("entity.wizard.death");
|
||||||
|
public static final SoundEvent ENTITY_WIZARD_HOHOHO = createSound("entity.wizard.hohoho");
|
||||||
|
|
||||||
public static final SoundEvent ENTITY_DARKNESS_ORB_HIT = createSound("entity.darkness_orb.hit");
|
public static final SoundEvent ENTITY_DARKNESS_ORB_HIT = createSound("entity.darkness_orb.hit");
|
||||||
public static final SoundEvent ENTITY_DART_HIT = createSound("entity.dart.hit");
|
public static final SoundEvent ENTITY_DART_HIT = createSound("entity.dart.hit");
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package electroblob.wizardry.spell;
|
package electroblob.wizardry.spell;
|
||||||
|
|
||||||
|
import electroblob.wizardry.Wizardry;
|
||||||
import electroblob.wizardry.constants.Constants;
|
import electroblob.wizardry.constants.Constants;
|
||||||
import electroblob.wizardry.event.SpellCastEvent;
|
import electroblob.wizardry.event.SpellCastEvent;
|
||||||
import electroblob.wizardry.registry.WizardryItems;
|
import electroblob.wizardry.registry.WizardryItems;
|
||||||
@@ -66,6 +67,11 @@ public class EmpoweringPresence extends Spell {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected String getTranslationKey(){
|
||||||
|
return Wizardry.tisTheSeason ? super.getTranslationKey() + "_festive" : super.getTranslationKey();
|
||||||
|
}
|
||||||
|
|
||||||
@SubscribeEvent(priority = EventPriority.LOW) // Doesn't really matter but there's no point processing it if casting is blocked
|
@SubscribeEvent(priority = EventPriority.LOW) // Doesn't really matter but there's no point processing it if casting is blocked
|
||||||
public static void onSpellCastPreEvent(SpellCastEvent.Pre event){
|
public static void onSpellCastPreEvent(SpellCastEvent.Pre event){
|
||||||
// Empowerment stacks extra potency on top of the existing potency.
|
// Empowerment stacks extra potency on top of the existing potency.
|
||||||
@@ -78,4 +84,5 @@ public class EmpoweringPresence extends Spell {
|
|||||||
event.getModifiers().get(SpellModifiers.POTENCY) * potency, true);
|
event.getModifiers().get(SpellModifiers.POTENCY) * potency, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
package electroblob.wizardry.spell;
|
package electroblob.wizardry.spell;
|
||||||
|
|
||||||
|
import electroblob.wizardry.Wizardry;
|
||||||
import electroblob.wizardry.registry.WizardryItems;
|
import electroblob.wizardry.registry.WizardryItems;
|
||||||
import electroblob.wizardry.util.AllyDesignationSystem;
|
import electroblob.wizardry.util.AllyDesignationSystem;
|
||||||
import electroblob.wizardry.util.ParticleBuilder;
|
import electroblob.wizardry.util.ParticleBuilder;
|
||||||
@@ -62,4 +63,9 @@ public class InvigoratingPresence extends Spell {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected String getTranslationKey(){
|
||||||
|
return Wizardry.tisTheSeason ? super.getTranslationKey() + "_festive" : super.getTranslationKey();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -597,13 +597,23 @@ public abstract class Spell extends IForgeRegistryEntry.Impl<Spell> implements C
|
|||||||
* translating it. If, for whatever reason, you need to supply an ITextComponent but don't want it translated
|
* translating it. If, for whatever reason, you need to supply an ITextComponent but don't want it translated
|
||||||
* (perhaps a name?), you can use TextComponentString, which will simply keep the raw string it is given. */
|
* (perhaps a name?), you can use TextComponentString, which will simply keep the raw string it is given. */
|
||||||
|
|
||||||
|
/** Returns the translation key for this spell. */
|
||||||
|
protected String getTranslationKey(){
|
||||||
|
return "spell." + unlocalisedName;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Returns the translation key for this spell's description. */
|
||||||
|
protected String getDescriptionTranslationKey(){
|
||||||
|
return "spell." + unlocalisedName + ".desc";
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the translated display name of the spell, without formatting (i.e. not coloured). <b>Client-side
|
* Returns the translated display name of the spell, without formatting (i.e. not coloured). <b>Client-side
|
||||||
* only!</b> On the server side, use {@link TextComponentTranslation} (see {@link Spell#getNameForTranslation()}).
|
* only!</b> On the server side, use {@link TextComponentTranslation} (see {@link Spell#getNameForTranslation()}).
|
||||||
*/
|
*/
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public String getDisplayName(){
|
public String getDisplayName(){
|
||||||
return net.minecraft.client.resources.I18n.format("spell." + unlocalisedName);
|
return net.minecraft.client.resources.I18n.format(getTranslationKey());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -611,7 +621,7 @@ public abstract class Spell extends IForgeRegistryEntry.Impl<Spell> implements C
|
|||||||
* formatting (i.e. not coloured).
|
* formatting (i.e. not coloured).
|
||||||
*/
|
*/
|
||||||
public ITextComponent getNameForTranslation(){
|
public ITextComponent getNameForTranslation(){
|
||||||
return new TextComponentTranslation("spell." + unlocalisedName);
|
return new TextComponentTranslation(getTranslationKey());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -620,7 +630,7 @@ public abstract class Spell extends IForgeRegistryEntry.Impl<Spell> implements C
|
|||||||
*/
|
*/
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public String getDisplayNameWithFormatting(){
|
public String getDisplayNameWithFormatting(){
|
||||||
return this.getElement().getFormattingCode() + net.minecraft.client.resources.I18n.format("spell." + unlocalisedName);
|
return this.getElement().getFormattingCode() + net.minecraft.client.resources.I18n.format(getTranslationKey());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -628,7 +638,7 @@ public abstract class Spell extends IForgeRegistryEntry.Impl<Spell> implements C
|
|||||||
* formatting (i.e. coloured).
|
* formatting (i.e. coloured).
|
||||||
*/
|
*/
|
||||||
public ITextComponent getNameForTranslationFormatted(){
|
public ITextComponent getNameForTranslationFormatted(){
|
||||||
return new TextComponentTranslation("spell." + unlocalisedName).setStyle(this.getElement().getColour());
|
return new TextComponentTranslation(getTranslationKey()).setStyle(this.getElement().getColour());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -637,7 +647,7 @@ public abstract class Spell extends IForgeRegistryEntry.Impl<Spell> implements C
|
|||||||
*/
|
*/
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public String getDescription(){
|
public String getDescription(){
|
||||||
return net.minecraft.client.resources.I18n.format("spell." + unlocalisedName + ".desc");
|
return net.minecraft.client.resources.I18n.format(getDescriptionTranslationKey());
|
||||||
}
|
}
|
||||||
|
|
||||||
// ============================================ Sound methods ==============================================
|
// ============================================ Sound methods ==============================================
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package electroblob.wizardry.spell;
|
package electroblob.wizardry.spell;
|
||||||
|
|
||||||
|
import electroblob.wizardry.Wizardry;
|
||||||
import electroblob.wizardry.util.ParticleBuilder;
|
import electroblob.wizardry.util.ParticleBuilder;
|
||||||
import electroblob.wizardry.util.ParticleBuilder.Type;
|
import electroblob.wizardry.util.ParticleBuilder.Type;
|
||||||
import electroblob.wizardry.util.SpellModifiers;
|
import electroblob.wizardry.util.SpellModifiers;
|
||||||
@@ -9,7 +10,11 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||||||
import net.minecraft.item.EnumAction;
|
import net.minecraft.item.EnumAction;
|
||||||
import net.minecraft.util.EnumHand;
|
import net.minecraft.util.EnumHand;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.util.text.ITextComponent;
|
||||||
|
import net.minecraft.util.text.TextComponentTranslation;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.fml.relauncher.Side;
|
||||||
|
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
public class SummonSnowGolem extends Spell {
|
public class SummonSnowGolem extends Spell {
|
||||||
|
|
||||||
@@ -45,4 +50,8 @@ public class SummonSnowGolem extends Spell {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected String getTranslationKey(){
|
||||||
|
return Wizardry.tisTheSeason ? super.getTranslationKey() + "_festive" : super.getTranslationKey();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1289,4 +1289,9 @@ integration.antiqueatlas.marker.ebwizardry\:wizard_tower=Wizard Tower
|
|||||||
integration.antiqueatlas.marker.ebwizardry\:obelisk=Obelisk
|
integration.antiqueatlas.marker.ebwizardry\:obelisk=Obelisk
|
||||||
integration.antiqueatlas.marker.ebwizardry\:shrine=Shrine
|
integration.antiqueatlas.marker.ebwizardry\:shrine=Shrine
|
||||||
|
|
||||||
|
spell.ebwizardry\:magic_missile_festive=Magic Mistletoe
|
||||||
|
spell.ebwizardry\:summon_snow_golem_festive=Summon Frosty The Snowman
|
||||||
|
spell.ebwizardry\:invigorating_presence_festive=Invigorating Presents
|
||||||
|
spell.ebwizardry\:empowering_presence_festive=Empowering Presents
|
||||||
|
|
||||||
wizard.debug=%1$s, %2$s, %3$s
|
wizard.debug=%1$s, %2$s, %3$s
|
||||||
|
|||||||
@@ -1289,4 +1289,9 @@ integration.antiqueatlas.marker.ebwizardry\:wizard_tower=Wizard Tower
|
|||||||
integration.antiqueatlas.marker.ebwizardry\:obelisk=Obelisk
|
integration.antiqueatlas.marker.ebwizardry\:obelisk=Obelisk
|
||||||
integration.antiqueatlas.marker.ebwizardry\:shrine=Shrine
|
integration.antiqueatlas.marker.ebwizardry\:shrine=Shrine
|
||||||
|
|
||||||
|
spell.ebwizardry\:magic_missile_festive=Magic Mistletoe
|
||||||
|
spell.ebwizardry\:summon_snow_golem_festive=Summon Frosty The Snowman
|
||||||
|
spell.ebwizardry\:invigorating_presence_festive=Invigorating Presents
|
||||||
|
spell.ebwizardry\:empowering_presence_festive=Empowering Presents
|
||||||
|
|
||||||
wizard.debug=%1$s, %2$s, %3$s
|
wizard.debug=%1$s, %2$s, %3$s
|
||||||
|
|||||||
@@ -2,5 +2,13 @@
|
|||||||
"parent": "item/generated",
|
"parent": "item/generated",
|
||||||
"textures": {
|
"textures": {
|
||||||
"layer0": "ebwizardry:items/scroll"
|
"layer0": "ebwizardry:items/scroll"
|
||||||
}
|
},
|
||||||
|
"overrides": [
|
||||||
|
{
|
||||||
|
"predicate": {
|
||||||
|
"festive": 1
|
||||||
|
},
|
||||||
|
"model": "ebwizardry:item/festive_scroll"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent": "item/generated",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "ebwizardry:items/scroll_festive"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent": "item/generated",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "ebwizardry:items/spell_book_festive"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent": "item/handheld",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "ebwizardry:items/wand_festive"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2,5 +2,13 @@
|
|||||||
"parent": "item/generated",
|
"parent": "item/generated",
|
||||||
"textures": {
|
"textures": {
|
||||||
"layer0": "ebwizardry:items/scroll"
|
"layer0": "ebwizardry:items/scroll"
|
||||||
}
|
},
|
||||||
|
"overrides": [
|
||||||
|
{
|
||||||
|
"predicate": {
|
||||||
|
"festive": 1
|
||||||
|
},
|
||||||
|
"model": "ebwizardry:item/festive_scroll"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
@@ -2,5 +2,13 @@
|
|||||||
"parent": "item/generated",
|
"parent": "item/generated",
|
||||||
"textures": {
|
"textures": {
|
||||||
"layer0": "ebwizardry:items/spell_book"
|
"layer0": "ebwizardry:items/spell_book"
|
||||||
}
|
},
|
||||||
|
"overrides": [
|
||||||
|
{
|
||||||
|
"predicate": {
|
||||||
|
"festive": 1
|
||||||
|
},
|
||||||
|
"model": "ebwizardry:item/festive_spell_book"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
@@ -62,6 +62,7 @@
|
|||||||
"entity.wizard.no": {"category": "neutral", "sounds": ["mob/villager/no1", "mob/villager/no2", "mob/villager/no3"]},
|
"entity.wizard.no": {"category": "neutral", "sounds": ["mob/villager/no1", "mob/villager/no2", "mob/villager/no3"]},
|
||||||
"entity.wizard.hurt": {"category": "neutral", "sounds": ["mob/villager/hit1", "mob/villager/hit2", "mob/villager/hit3", "mob/villager/hit4"]},
|
"entity.wizard.hurt": {"category": "neutral", "sounds": ["mob/villager/hit1", "mob/villager/hit2", "mob/villager/hit3", "mob/villager/hit4"]},
|
||||||
"entity.wizard.death": {"category": "neutral", "sounds": ["mob/villager/death"]},
|
"entity.wizard.death": {"category": "neutral", "sounds": ["mob/villager/death"]},
|
||||||
|
"entity.wizard.hohoho": {"category": "neutral", "sounds": ["ebwizardry:hohoho"]},
|
||||||
|
|
||||||
"entity.darkness_orb.hit": {"category": "spells", "sounds": ["mob/wither/hurt1", "mob/wither/hurt2", "mob/wither/hurt3", "mob/wither/hurt4"]},
|
"entity.darkness_orb.hit": {"category": "spells", "sounds": ["mob/wither/hurt1", "mob/wither/hurt2", "mob/wither/hurt3", "mob/wither/hurt4"]},
|
||||||
"entity.dart.hit": {"category": "spells", "sounds": ["damage/hit1", "damage/hit2", "damage/hit3"]},
|
"entity.dart.hit": {"category": "spells", "sounds": ["damage/hit1", "damage/hit2", "damage/hit3"]},
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
@@ -74,5 +74,9 @@
|
|||||||
"planks": {
|
"planks": {
|
||||||
"texture": "ebwizardry:gui/spell_hud/planks",
|
"texture": "ebwizardry:gui/spell_hud/planks",
|
||||||
"metadata": "ebwizardry:gui/spell_hud/planks"
|
"metadata": "ebwizardry:gui/spell_hud/planks"
|
||||||
|
},
|
||||||
|
"festive": {
|
||||||
|
"texture": "ebwizardry:gui/spell_hud/festive",
|
||||||
|
"metadata": "ebwizardry:gui/spell_hud/festive"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
{
|
||||||
|
"name": "Festive",
|
||||||
|
"description": "'Tis the season!",
|
||||||
|
"width": 126,
|
||||||
|
"height": 41,
|
||||||
|
"mirror": {
|
||||||
|
"x": true,
|
||||||
|
"y": true
|
||||||
|
},
|
||||||
|
"spell_icon_inset": {
|
||||||
|
"x": 2,
|
||||||
|
"y": 2
|
||||||
|
},
|
||||||
|
"text_inset": {
|
||||||
|
"x": 40,
|
||||||
|
"y": 20
|
||||||
|
},
|
||||||
|
"spell_cascade_offset": {
|
||||||
|
"x": 0,
|
||||||
|
"y": 8
|
||||||
|
},
|
||||||
|
"cooldown_bar": {
|
||||||
|
"x": 39,
|
||||||
|
"y": 1,
|
||||||
|
"length": 86,
|
||||||
|
"height": 8,
|
||||||
|
"mirror": {
|
||||||
|
"x": true,
|
||||||
|
"y": true
|
||||||
|
},
|
||||||
|
"show_when_full": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 1.6 KiB |