diff --git a/src/main/java/tombenpotter/emt/ElectroMagicTools.java b/src/main/java/tombenpotter/emt/ElectroMagicTools.java index d1abb0d..6155a39 100644 --- a/src/main/java/tombenpotter/emt/ElectroMagicTools.java +++ b/src/main/java/tombenpotter/emt/ElectroMagicTools.java @@ -72,7 +72,7 @@ public class ElectroMagicTools { ElectroMagicTools.logger.info("Loading the proxies"); proxy.load(); ElectroMagicTools.logger.info("Making mobs drop additional items"); - MinecraftForge.EVENT_BUS.register(new EntityEventHandler()); + MinecraftForge.EVENT_BUS.register(new EventHandlerEMT()); ElectroMagicTools.logger.info("Adding dungeon loot"); DungeonChestGenerator.generateLoot(); diff --git a/src/main/java/tombenpotter/emt/common/entities/EntityLaser.java b/src/main/java/tombenpotter/emt/common/entities/EntityLaser.java index 2cdc2f7..669d4a1 100644 --- a/src/main/java/tombenpotter/emt/common/entities/EntityLaser.java +++ b/src/main/java/tombenpotter/emt/common/entities/EntityLaser.java @@ -163,14 +163,11 @@ public class EntityLaser extends Entity implements IProjectile { if (this.inGround) { Block j = this.worldObj.getBlock(this.xTile, this.yTile, this.zTile); int k = this.worldObj.getBlockMetadata(this.xTile, this.yTile, this.zTile); - this.worldObj.createExplosion(this, (int)this.posX, (int)this.posY, (int)this.posZ, 3, true); - this.setDead(); - //for(int x = 0; x < 6; x++){ - // for(int z = 0; z < 6; z++){ - // this.worldObj.setBlockToAir((int)this.posX + x, (int)this.posY, (int)this.posZ + z); - // } - //} - //this.setDead(); + if(!this.worldObj.isRemote){ + this.worldObj.createExplosion(this, (int)this.posX, (int)this.posY, (int)this.posZ, 3, true); + this.setDead(); + } + if (j == this.inTile && k == this.inData) { ++this.ticksInGround; diff --git a/src/main/java/tombenpotter/emt/common/items/ItemRegistry.java b/src/main/java/tombenpotter/emt/common/items/ItemRegistry.java index 5efcc29..590d42b 100644 --- a/src/main/java/tombenpotter/emt/common/items/ItemRegistry.java +++ b/src/main/java/tombenpotter/emt/common/items/ItemRegistry.java @@ -11,7 +11,7 @@ import net.minecraftforge.common.util.EnumHelper; import net.minecraftforge.oredict.OreDictionary; import thaumcraft.api.ThaumcraftApi; import tombenpotter.emt.ModInformation; -import tombenpotter.emt.common.items.armor.ItemEMTQuantum; +import tombenpotter.emt.common.items.armor.ItemInfusedQuantum; import tombenpotter.emt.common.items.armor.wings.ItemFeatherWing; import tombenpotter.emt.common.items.armor.wings.ItemThaumiumReinforcedWing; import tombenpotter.emt.common.items.armor.boots.ItemElectricBootsTraveller; @@ -88,7 +88,7 @@ public class ItemRegistry { onering = new ItemOneRing(); GameRegistry.registerItem(onering, "BaseBaubles"); - quantumArmor = new ItemEMTQuantum(InternalName.itemArmorQuantumChestplate, 1).setUnlocalizedName(ModInformation.modid + ".quantum"); + quantumArmor = new ItemInfusedQuantum(InternalName.itemArmorQuantumChestplate, 1).setUnlocalizedName(ModInformation.modid + ".quantum"); electricGoggles = new ItemElectricGoggles(ItemArmor.ArmorMaterial.IRON, 3, 0).setUnlocalizedName(ModInformation.modid + ".goggles.electric"); GameRegistry.registerItem(electricGoggles, "ElectricGogglesRevealing"); diff --git a/src/main/java/tombenpotter/emt/common/items/armor/ItemEMTQuantum.java b/src/main/java/tombenpotter/emt/common/items/armor/ItemInfusedQuantum.java similarity index 99% rename from src/main/java/tombenpotter/emt/common/items/armor/ItemEMTQuantum.java rename to src/main/java/tombenpotter/emt/common/items/armor/ItemInfusedQuantum.java index 5b612e0..409e652 100644 --- a/src/main/java/tombenpotter/emt/common/items/armor/ItemEMTQuantum.java +++ b/src/main/java/tombenpotter/emt/common/items/armor/ItemInfusedQuantum.java @@ -61,7 +61,7 @@ import net.minecraftforge.common.ISpecialArmor.ArmorProperties; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.entity.living.LivingFallEvent; -public class ItemEMTQuantum extends ItemArmorElectric { +public class ItemInfusedQuantum extends ItemArmorElectric { IIcon icon0; IIcon icon1; @@ -74,7 +74,7 @@ public class ItemEMTQuantum extends ItemArmorElectric { public static AudioSource audioSource; private static boolean lastJetpackUsed = false; - public ItemEMTQuantum(InternalName internalName, int armorType1) { + public ItemInfusedQuantum(InternalName internalName, int armorType1) { super(internalName, InternalName.quantum, armorType1, 2000000, 12000.0D, 4); MinecraftForge.EVENT_BUS.register(this); diff --git a/src/main/java/tombenpotter/emt/common/items/foci/ItemChargeFocus.java b/src/main/java/tombenpotter/emt/common/items/foci/ItemChargeFocus.java index 738fa41..b5e74c8 100644 --- a/src/main/java/tombenpotter/emt/common/items/foci/ItemChargeFocus.java +++ b/src/main/java/tombenpotter/emt/common/items/foci/ItemChargeFocus.java @@ -50,7 +50,7 @@ public class ItemChargeFocus extends ItemBaseFocus { @Override public ItemStack onFocusRightClick(ItemStack itemstack, World world, EntityPlayer player, MovingObjectPosition movingobjectposition) { ItemWandCasting wand = (ItemWandCasting) itemstack.getItem(); - if (wand.consumeAllVis(itemstack, player, getVisCost(itemstack), true, true)) { + if (player.capabilities.isCreativeMode || wand.consumeAllVis(itemstack, player, getVisCost(itemstack), true, true)) { if (!world.isRemote) { int energyLeft = ConfigHandler.chargeFocusProduction; diff --git a/src/main/java/tombenpotter/emt/common/items/foci/ItemChristmasFocus.java b/src/main/java/tombenpotter/emt/common/items/foci/ItemChristmasFocus.java index 7594c7e..5051061 100644 --- a/src/main/java/tombenpotter/emt/common/items/foci/ItemChristmasFocus.java +++ b/src/main/java/tombenpotter/emt/common/items/foci/ItemChristmasFocus.java @@ -58,7 +58,7 @@ public class ItemChristmasFocus extends ItemBaseFocus { int x = mop.blockX; int y = mop.blockY + 1; int z = mop.blockZ; - if (wand.consumeAllVis(itemstack, player, getVisCost(itemstack), true, true)) { + if (player.capabilities.isCreativeMode || wand.consumeAllVis(itemstack, player, getVisCost(itemstack), true, true)) { if (!world.isRemote) { EntitySnowman snowman; snowman = new EntitySnowman(world); diff --git a/src/main/java/tombenpotter/emt/common/items/foci/ItemExplosionFocus.java b/src/main/java/tombenpotter/emt/common/items/foci/ItemExplosionFocus.java index 6a8db61..c1aba2f 100644 --- a/src/main/java/tombenpotter/emt/common/items/foci/ItemExplosionFocus.java +++ b/src/main/java/tombenpotter/emt/common/items/foci/ItemExplosionFocus.java @@ -48,7 +48,7 @@ public class ItemExplosionFocus extends ItemBaseFocus { @Override public ItemStack onFocusRightClick(ItemStack itemstack, World world, EntityPlayer player, MovingObjectPosition movingobjectposition) { ItemWandCasting wand = (ItemWandCasting) itemstack.getItem(); - if (wand.consumeAllVis(itemstack, player, getVisCost(itemstack), true, true)) { + if (player.capabilities.isCreativeMode || wand.consumeAllVis(itemstack, player, getVisCost(itemstack), true, true)) { if (!world.isRemote) { EntityLaser laser; laser = new EntityLaser(world, player, 2); diff --git a/src/main/java/tombenpotter/emt/common/items/foci/ItemShieldFocus.java b/src/main/java/tombenpotter/emt/common/items/foci/ItemShieldFocus.java index 001e354..64eceb2 100644 --- a/src/main/java/tombenpotter/emt/common/items/foci/ItemShieldFocus.java +++ b/src/main/java/tombenpotter/emt/common/items/foci/ItemShieldFocus.java @@ -59,7 +59,7 @@ public class ItemShieldFocus extends ItemBaseFocus { public void onUsingFocusTick(ItemStack itemstack, EntityPlayer player, int count) { ItemWandCasting wand = (ItemWandCasting) itemstack.getItem(); - if (wand.consumeAllVis(itemstack, player, getVisCost(itemstack), true, true)) { + if (player.capabilities.isCreativeMode || wand.consumeAllVis(itemstack, player, getVisCost(itemstack), true, true)) { player.motionX = 0.0D; if(!player.capabilities.isCreativeMode && player.motionY < 0) diff --git a/src/main/java/tombenpotter/emt/common/network/PacketEMTKeys.java b/src/main/java/tombenpotter/emt/common/network/PacketEMTKeys.java index 4b7c67b..a4c2f1c 100644 --- a/src/main/java/tombenpotter/emt/common/network/PacketEMTKeys.java +++ b/src/main/java/tombenpotter/emt/common/network/PacketEMTKeys.java @@ -13,10 +13,8 @@ public class PacketEMTKeys implements IMessage, IMessageHandler