Updated to Forge 1811
This commit is contained in:
parent
f9cb1a08ba
commit
5cb39d1dbd
|
@ -1,5 +1,5 @@
|
|||
#
|
||||
#Mon Mar 21 18:42:09 EDT 2016
|
||||
#Sat Mar 26 13:55:38 EDT 2016
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_block=next_line
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
|
||||
|
@ -288,10 +288,10 @@ org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not
|
|||
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
|
||||
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=next_line
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=next_line
|
||||
org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
|
||||
org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
|
||||
org.eclipse.jdt.core.compiler.compliance=1.6
|
||||
org.eclipse.jdt.core.formatter.blank_lines_after_package=1
|
||||
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
|
||||
|
|
|
@ -12,6 +12,7 @@ Version 2.0.0-23
|
|||
uses its life essence to feed the demonic will crystals inside of its area (two blocks above the ritual stone, 7x7 region and 5 high). This costs LP and
|
||||
demonic will from the aura of the particular type, and costs less will the more... varied the mobs killed are. Growth amount is dictated by the max health
|
||||
of the mobs killed.
|
||||
- Updated to Forge 1811
|
||||
|
||||
------------------------------------------------------
|
||||
Version 2.0.0-22
|
||||
|
|
|
@ -2,7 +2,7 @@ mod_name=BloodMagic
|
|||
package_group=com.wayoftime.bloodmagic
|
||||
mod_version=2.0.0
|
||||
mc_version=1.9
|
||||
forge_version=12.16.0.1782-1.9
|
||||
forge_version=12.16.0.1811-1.9
|
||||
curse_id=224791
|
||||
|
||||
mappings_version=snapshot_20160321
|
||||
|
|
|
@ -25,29 +25,29 @@ public class PotionEventHandlers
|
|||
@SubscribeEvent
|
||||
public void onLivingJumpEvent(LivingEvent.LivingJumpEvent event)
|
||||
{
|
||||
if (event.entityLiving.isPotionActive(ModPotions.boost))
|
||||
if (event.getEntityLiving().isPotionActive(ModPotions.boost))
|
||||
{
|
||||
int i = event.entityLiving.getActivePotionEffect(ModPotions.boost).getAmplifier();
|
||||
event.entityLiving.motionY += (0.1f) * (2 + i);
|
||||
int i = event.getEntityLiving().getActivePotionEffect(ModPotions.boost).getAmplifier();
|
||||
event.getEntityLiving().motionY += (0.1f) * (2 + i);
|
||||
}
|
||||
|
||||
// if (event.entityLiving.isPotionActive(ModPotions.heavyHeart)) {
|
||||
// event.entityLiving.motionY = 0;
|
||||
// if (event.getEntityLiving().isPotionActive(ModPotions.heavyHeart)) {
|
||||
// event.getEntityLiving().motionY = 0;
|
||||
// }
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onEntityUpdate(LivingEvent.LivingUpdateEvent event)
|
||||
{
|
||||
// if (event.entityLiving.isPotionActive(ModPotions.boost))
|
||||
// if (event.getEntityLiving().isPotionActive(ModPotions.boost))
|
||||
// {
|
||||
// int i = event.entityLiving.getActivePotionEffect(ModPotions.boost).getAmplifier();
|
||||
// int i = event.getEntityLiving().getActivePotionEffect(ModPotions.boost).getAmplifier();
|
||||
// {
|
||||
// float percentIncrease = (i + 1) * 0.05f;
|
||||
//
|
||||
// if (event.entityLiving instanceof EntityPlayer)
|
||||
// if (event.getEntityLiving() instanceof EntityPlayer)
|
||||
// {
|
||||
// EntityPlayer entityPlayer = (EntityPlayer) event.entityLiving;
|
||||
// EntityPlayer entityPlayer = (EntityPlayer) event.getEntityLiving();
|
||||
//
|
||||
// if ((entityPlayer.onGround || entityPlayer.capabilities.isFlying) && entityPlayer.moveForward > 0F)
|
||||
// entityPlayer.moveFlying(0F, 1F, entityPlayer.capabilities.isFlying ? (percentIncrease / 2.0f) : percentIncrease);
|
||||
|
@ -55,11 +55,11 @@ public class PotionEventHandlers
|
|||
// }
|
||||
// }
|
||||
|
||||
if (event.entityLiving.isPotionActive(ModPotions.whirlwind))
|
||||
if (event.getEntityLiving().isPotionActive(ModPotions.whirlwind))
|
||||
{
|
||||
int d0 = 3;
|
||||
AxisAlignedBB axisAlignedBB = new AxisAlignedBB(event.entityLiving.posX - 0.5, event.entityLiving.posY - 0.5, event.entityLiving.posZ - 0.5, event.entityLiving.posX + 0.5, event.entityLiving.posY + 0.5, event.entityLiving.posZ + 0.5).expand(d0, d0, d0);
|
||||
List entityList = event.entityLiving.worldObj.getEntitiesWithinAABB(Entity.class, axisAlignedBB);
|
||||
AxisAlignedBB axisAlignedBB = new AxisAlignedBB(event.getEntityLiving().posX - 0.5, event.getEntityLiving().posY - 0.5, event.getEntityLiving().posZ - 0.5, event.getEntityLiving().posX + 0.5, event.getEntityLiving().posY + 0.5, event.getEntityLiving().posZ + 0.5).expand(d0, d0, d0);
|
||||
List entityList = event.getEntityLiving().worldObj.getEntitiesWithinAABB(Entity.class, axisAlignedBB);
|
||||
|
||||
for (Object thing : entityList)
|
||||
{
|
||||
|
@ -77,12 +77,12 @@ public class PotionEventHandlers
|
|||
else if (projectile instanceof EntityThrowable)
|
||||
throwingEntity = ((EntityThrowable) projectile).getThrower();
|
||||
|
||||
if (throwingEntity != null && throwingEntity.equals(event.entityLiving))
|
||||
if (throwingEntity != null && throwingEntity.equals(event.getEntityLiving()))
|
||||
continue;
|
||||
|
||||
double delX = projectile.posX - event.entityLiving.posX;
|
||||
double delY = projectile.posY - event.entityLiving.posY;
|
||||
double delZ = projectile.posZ - event.entityLiving.posZ;
|
||||
double delX = projectile.posX - event.getEntityLiving().posX;
|
||||
double delY = projectile.posY - event.getEntityLiving().posY;
|
||||
double delZ = projectile.posZ - event.getEntityLiving().posZ;
|
||||
|
||||
double angle = (delX * projectile.motionX + delY * projectile.motionY + delZ * projectile.motionZ) / (Math.sqrt(delX * delX + delY * delY + delZ * delZ) * Math.sqrt(projectile.motionX * projectile.motionX + projectile.motionY * projectile.motionY + projectile.motionZ * projectile.motionZ));
|
||||
|
||||
|
@ -114,14 +114,14 @@ public class PotionEventHandlers
|
|||
@SubscribeEvent(priority = EventPriority.HIGHEST)
|
||||
public void onPlayerDamageEvent(LivingAttackEvent event)
|
||||
{
|
||||
if (event.entityLiving.isPotionActive(ModPotions.whirlwind) && event.isCancelable() && event.source.isProjectile())
|
||||
if (event.getEntityLiving().isPotionActive(ModPotions.whirlwind) && event.isCancelable() && event.getSource().isProjectile())
|
||||
event.setCanceled(true);
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onEndermanTeleportEvent(EnderTeleportEvent event)
|
||||
{
|
||||
if (event.entityLiving.isPotionActive(ModPotions.planarBinding) && event.isCancelable())
|
||||
if (event.getEntityLiving().isPotionActive(ModPotions.planarBinding) && event.isCancelable())
|
||||
{
|
||||
event.setCanceled(true);
|
||||
}
|
||||
|
|
|
@ -122,7 +122,7 @@ public class RitualExpulsion extends Ritual
|
|||
return false;
|
||||
}
|
||||
|
||||
moveEntityViaTeleport(entityLiving, event.targetX, event.targetY, event.targetZ);
|
||||
moveEntityViaTeleport(entityLiving, event.getTargetX(), event.getTargetY(), event.getTargetZ());
|
||||
boolean flag = false;
|
||||
int i = MathHelper.floor_double(entityLiving.posX);
|
||||
int j = MathHelper.floor_double(entityLiving.posY);
|
||||
|
@ -198,7 +198,7 @@ public class RitualExpulsion extends Ritual
|
|||
{
|
||||
entityplayermp.mountEntityAndWakeUp();
|
||||
}
|
||||
entityLiving.setPositionAndUpdate(event.targetX, event.targetY, event.targetZ);
|
||||
entityLiving.setPositionAndUpdate(event.getTargetX(), event.getTargetY(), event.getTargetZ());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ public class ClientEventHandler
|
|||
@SubscribeEvent
|
||||
public void onTooltipEvent(ItemTooltipEvent event)
|
||||
{
|
||||
ItemStack stack = event.itemStack;
|
||||
ItemStack stack = event.getItemStack();
|
||||
if (stack == null)
|
||||
{
|
||||
return;
|
||||
|
@ -46,10 +46,10 @@ public class ClientEventHandler
|
|||
int amount = GhostItemHelper.getItemGhostAmount(stack);
|
||||
if (amount == 0)
|
||||
{
|
||||
event.toolTip.add("Everything");
|
||||
event.getToolTip().add("Everything");
|
||||
} else
|
||||
{
|
||||
event.toolTip.add("Ghost item amount: " + amount);
|
||||
event.getToolTip().add("Ghost item amount: " + amount);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -59,13 +59,13 @@ public class ClientEventHandler
|
|||
{
|
||||
final String BLOCKS = "blocks";
|
||||
|
||||
ritualStoneBlankIcon = forName(event.map, "RitualStone", BLOCKS);
|
||||
ritualStoneWaterIcon = forName(event.map, "WaterRitualStone", BLOCKS);
|
||||
ritualStoneFireIcon = forName(event.map, "FireRitualStone", BLOCKS);
|
||||
ritualStoneEarthIcon = forName(event.map, "EarthRitualStone", BLOCKS);
|
||||
ritualStoneAirIcon = forName(event.map, "AirRitualStone", BLOCKS);
|
||||
ritualStoneDawnIcon = forName(event.map, "LightRitualStone", BLOCKS);
|
||||
ritualStoneDuskIcon = forName(event.map, "DuskRitualStone", BLOCKS);
|
||||
ritualStoneBlankIcon = forName(event.getMap(), "RitualStone", BLOCKS);
|
||||
ritualStoneWaterIcon = forName(event.getMap(), "WaterRitualStone", BLOCKS);
|
||||
ritualStoneFireIcon = forName(event.getMap(), "FireRitualStone", BLOCKS);
|
||||
ritualStoneEarthIcon = forName(event.getMap(), "EarthRitualStone", BLOCKS);
|
||||
ritualStoneAirIcon = forName(event.getMap(), "AirRitualStone", BLOCKS);
|
||||
ritualStoneDawnIcon = forName(event.getMap(), "LightRitualStone", BLOCKS);
|
||||
ritualStoneDuskIcon = forName(event.getMap(), "DuskRitualStone", BLOCKS);
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
|
@ -100,9 +100,9 @@ public class ClientEventHandler
|
|||
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
BlockPos vec3 = new BlockPos(minecraft.objectMouseOver.getBlockPos().getX(), minecraft.objectMouseOver.getBlockPos().getY(), minecraft.objectMouseOver.getBlockPos().getZ());
|
||||
double posX = player.lastTickPosX + (player.posX - player.lastTickPosX) * event.partialTicks;
|
||||
double posY = player.lastTickPosY + (player.posY - player.lastTickPosY) * event.partialTicks;
|
||||
double posZ = player.lastTickPosZ + (player.posZ - player.lastTickPosZ) * event.partialTicks;
|
||||
double posX = player.lastTickPosX + (player.posX - player.lastTickPosX) * event.getPartialTicks();
|
||||
double posY = player.lastTickPosY + (player.posY - player.lastTickPosY) * event.getPartialTicks();
|
||||
double posZ = player.lastTickPosZ + (player.posZ - player.lastTickPosZ) * event.getPartialTicks();
|
||||
|
||||
for (RitualComponent ritualComponent : ritual.getComponents())
|
||||
{
|
||||
|
|
|
@ -112,9 +112,9 @@ public class EventHandler
|
|||
@SubscribeEvent(priority = EventPriority.HIGHEST)
|
||||
public void onEntityDeath(LivingDeathEvent event)
|
||||
{
|
||||
if (event.entityLiving instanceof EntityPlayer)
|
||||
if (event.getEntityLiving() instanceof EntityPlayer)
|
||||
{
|
||||
EntityPlayer player = (EntityPlayer) event.entityLiving;
|
||||
EntityPlayer player = (EntityPlayer) event.getEntityLiving();
|
||||
|
||||
if (LivingArmour.hasFullSet(player))
|
||||
{
|
||||
|
@ -178,7 +178,7 @@ public class EventHandler
|
|||
@SubscribeEvent
|
||||
public void chunkSave(ChunkDataEvent.Save event)
|
||||
{
|
||||
int dim = event.world.provider.getDimension();
|
||||
int dim = event.getWorld().provider.getDimension();
|
||||
ChunkCoordIntPair loc = event.getChunk().getChunkCoordIntPair();
|
||||
|
||||
NBTTagCompound nbt = new NBTTagCompound();
|
||||
|
@ -199,7 +199,7 @@ public class EventHandler
|
|||
@SubscribeEvent
|
||||
public void chunkLoad(ChunkDataEvent.Load event)
|
||||
{
|
||||
int dim = event.world.provider.getDimension();
|
||||
int dim = event.getWorld().provider.getDimension();
|
||||
if (event.getData().getCompoundTag("BloodMagic").hasKey("base"))
|
||||
{
|
||||
NBTTagCompound nbt = event.getData().getCompoundTag("BloodMagic");
|
||||
|
@ -216,10 +216,10 @@ public class EventHandler
|
|||
@SubscribeEvent(priority = EventPriority.HIGHEST)
|
||||
public void onEntityUpdate(LivingEvent.LivingUpdateEvent event)
|
||||
{
|
||||
if (event.entityLiving instanceof EntityPlayer)
|
||||
if (event.getEntityLiving() instanceof EntityPlayer)
|
||||
{
|
||||
EntityPlayer player = (EntityPlayer) event.entityLiving;
|
||||
if (event.entityLiving.isPotionActive(ModPotions.boost))
|
||||
EntityPlayer player = (EntityPlayer) event.getEntityLiving();
|
||||
if (event.getEntityLiving().isPotionActive(ModPotions.boost))
|
||||
{
|
||||
player.stepHeight = 1.0f;
|
||||
} else
|
||||
|
@ -262,9 +262,9 @@ public class EventHandler
|
|||
}
|
||||
}
|
||||
|
||||
if (event.entityLiving.isPotionActive(ModPotions.boost))
|
||||
if (event.getEntityLiving().isPotionActive(ModPotions.boost))
|
||||
{
|
||||
int i = event.entityLiving.getActivePotionEffect(ModPotions.boost).getAmplifier();
|
||||
int i = event.getEntityLiving().getActivePotionEffect(ModPotions.boost).getAmplifier();
|
||||
{
|
||||
percentIncrease += (i + 1) * 0.05f;
|
||||
}
|
||||
|
@ -295,19 +295,19 @@ public class EventHandler
|
|||
@SubscribeEvent
|
||||
public void onEntityHurt(LivingHurtEvent event)
|
||||
{
|
||||
if (event.entity.worldObj.isRemote)
|
||||
if (event.getEntity().worldObj.isRemote)
|
||||
return;
|
||||
|
||||
if (event.source.getEntity() instanceof EntityPlayer && !PlayerHelper.isFakePlayer((EntityPlayer) event.source.getEntity()))
|
||||
if (event.getSource().getEntity() instanceof EntityPlayer && !PlayerHelper.isFakePlayer((EntityPlayer) event.getSource().getEntity()))
|
||||
{
|
||||
EntityPlayer player = (EntityPlayer) event.source.getEntity();
|
||||
EntityPlayer player = (EntityPlayer) event.getSource().getEntity();
|
||||
|
||||
if (player.getItemStackFromSlot(EntityEquipmentSlot.CHEST) != null && player.getItemStackFromSlot(EntityEquipmentSlot.CHEST).getItem() instanceof ItemPackSacrifice)
|
||||
{
|
||||
ItemPackSacrifice pack = (ItemPackSacrifice) player.getItemStackFromSlot(EntityEquipmentSlot.CHEST).getItem();
|
||||
|
||||
boolean shouldSyphon = pack.getStoredLP(player.getItemStackFromSlot(EntityEquipmentSlot.CHEST)) < pack.CAPACITY;
|
||||
float damageDone = event.entityLiving.getHealth() < event.ammount ? event.ammount - event.entityLiving.getHealth() : event.ammount;
|
||||
float damageDone = event.getEntityLiving().getHealth() < event.getAmount() ? event.getAmount() - event.getEntityLiving().getHealth() : event.getAmount();
|
||||
int totalLP = Math.round(damageDone * ConfigHandler.sacrificialPackConversion);
|
||||
|
||||
if (shouldSyphon)
|
||||
|
@ -321,55 +321,55 @@ public class EventHandler
|
|||
{
|
||||
if (ConfigHandler.thaumcraftGogglesUpgrade)
|
||||
{
|
||||
if (event.left.getItem() == ModItems.livingArmourHelmet && event.right.getItem() == Constants.Compat.THAUMCRAFT_GOGGLES && !event.right.isItemDamaged())
|
||||
if (event.getLeft().getItem() == ModItems.livingArmourHelmet && event.getRight().getItem() == Constants.Compat.THAUMCRAFT_GOGGLES && !event.getRight().isItemDamaged())
|
||||
{
|
||||
ItemStack output = new ItemStack(ModItems.upgradeTome);
|
||||
output = NBTHelper.checkNBT(output);
|
||||
ItemUpgradeTome.setKey(output, Constants.Mod.MODID + ".upgrade.revealing");
|
||||
ItemUpgradeTome.setLevel(output, 1);
|
||||
event.cost = 1;
|
||||
event.setCost(1);
|
||||
|
||||
event.output = output;
|
||||
event.setOutput(output);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (event.left.getItem() == ModItems.upgradeTome && event.right.getItem() == ModItems.upgradeTome)
|
||||
if (event.getLeft().getItem() == ModItems.upgradeTome && event.getRight().getItem() == ModItems.upgradeTome)
|
||||
{
|
||||
LivingArmourUpgrade leftUpgrade = ItemUpgradeTome.getUpgrade(event.left);
|
||||
if (leftUpgrade != null && ItemUpgradeTome.getKey(event.left).equals(ItemUpgradeTome.getKey(event.right)))
|
||||
LivingArmourUpgrade leftUpgrade = ItemUpgradeTome.getUpgrade(event.getLeft());
|
||||
if (leftUpgrade != null && ItemUpgradeTome.getKey(event.getLeft()).equals(ItemUpgradeTome.getKey(event.getRight())))
|
||||
{
|
||||
int leftLevel = ItemUpgradeTome.getLevel(event.left);
|
||||
int rightLevel = ItemUpgradeTome.getLevel(event.right);
|
||||
int leftLevel = ItemUpgradeTome.getLevel(event.getLeft());
|
||||
int rightLevel = ItemUpgradeTome.getLevel(event.getRight());
|
||||
|
||||
if (leftLevel == rightLevel && leftLevel < leftUpgrade.getMaxTier() - 1)
|
||||
{
|
||||
ItemStack outputStack = event.left.copy();
|
||||
ItemStack outputStack = event.getLeft().copy();
|
||||
ItemUpgradeTome.setLevel(outputStack, leftLevel + 1);
|
||||
event.cost = leftLevel + 2;
|
||||
event.setCost(leftLevel + 2);
|
||||
|
||||
event.output = outputStack;
|
||||
event.setOutput(outputStack);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (event.left.getItem() instanceof IUpgradeTrainer && event.right.getItem() == ModItems.upgradeTome)
|
||||
if (event.getLeft().getItem() instanceof IUpgradeTrainer && event.getRight().getItem() == ModItems.upgradeTome)
|
||||
{
|
||||
LivingArmourUpgrade rightUpgrade = ItemUpgradeTome.getUpgrade(event.right);
|
||||
LivingArmourUpgrade rightUpgrade = ItemUpgradeTome.getUpgrade(event.getRight());
|
||||
if (rightUpgrade != null)
|
||||
{
|
||||
String key = ItemUpgradeTome.getKey(event.right);
|
||||
ItemStack outputStack = event.left.copy();
|
||||
String key = ItemUpgradeTome.getKey(event.getRight());
|
||||
ItemStack outputStack = event.getLeft().copy();
|
||||
List<String> keyList = new ArrayList<String>();
|
||||
keyList.add(key);
|
||||
if (((IUpgradeTrainer) event.left.getItem()).setTrainedUpgrades(outputStack, keyList))
|
||||
if (((IUpgradeTrainer) event.getLeft().getItem()).setTrainedUpgrades(outputStack, keyList))
|
||||
{
|
||||
event.cost = 1;
|
||||
event.setCost(1);
|
||||
|
||||
event.output = outputStack;
|
||||
event.setOutput(outputStack);
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -405,10 +405,10 @@ public class EventHandler
|
|||
{
|
||||
IBlockState state = event.getTargetBlock();
|
||||
Block block = state.getBlock();
|
||||
if (block != null && block instanceof BlockAltar && event.entityPlayer != null && event.entityPlayer instanceof EntityPlayerMP && event.entityPlayer.getActiveItemStack() != null && event.entityPlayer.getActiveItemStack().getItem() instanceof ItemAltarMaker)
|
||||
if (block != null && block instanceof BlockAltar && event.getEntityPlayer() != null && event.getEntityPlayer() instanceof EntityPlayerMP && event.getEntityPlayer().getActiveItemStack() != null && event.getEntityPlayer().getActiveItemStack().getItem() instanceof ItemAltarMaker)
|
||||
{
|
||||
ItemAltarMaker altarMaker = (ItemAltarMaker) event.entityPlayer.getActiveItemStack().getItem();
|
||||
ChatUtil.sendNoSpam(event.entityPlayer, TextHelper.localizeEffect("chat.BloodMagic.altarMaker.destroy", altarMaker.destroyAltar(event.entityPlayer)));
|
||||
ItemAltarMaker altarMaker = (ItemAltarMaker) event.getEntityPlayer().getActiveItemStack().getItem();
|
||||
ChatUtil.sendNoSpam(event.getEntityPlayer(), TextHelper.localizeEffect("chat.BloodMagic.altarMaker.destroy", altarMaker.destroyAltar(event.getEntityPlayer())));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -425,7 +425,7 @@ public class EventHandler
|
|||
@SubscribeEvent
|
||||
public void onConfigChanged(ConfigChangedEvent event)
|
||||
{
|
||||
if (event.modID.equals(Constants.Mod.MODID))
|
||||
if (event.getModID().equals(Constants.Mod.MODID))
|
||||
ConfigHandler.syncConfig();
|
||||
}
|
||||
|
||||
|
@ -455,15 +455,15 @@ public class EventHandler
|
|||
@SubscribeEvent
|
||||
public void interactEvent(PlayerInteractEvent event)
|
||||
{
|
||||
if (event.world.isRemote)
|
||||
if (event.getWorld().isRemote)
|
||||
return;
|
||||
|
||||
EntityPlayer player = event.entityPlayer;
|
||||
EntityPlayer player = event.getEntityPlayer();
|
||||
|
||||
if (PlayerHelper.isFakePlayer(player))
|
||||
return;
|
||||
|
||||
if (event.useBlock == Result.DENY && event.useItem != Result.DENY)
|
||||
if (event.getUseBlock() == Result.DENY && event.getUseItem() != Result.DENY)
|
||||
{
|
||||
ItemStack held = player.getActiveItemStack();
|
||||
if (held != null && held.getItem() instanceof IBindable)
|
||||
|
@ -525,7 +525,7 @@ public class EventHandler
|
|||
@SubscribeEvent
|
||||
public void onEntityHealed(LivingHealEvent event)
|
||||
{
|
||||
EntityLivingBase healedEntity = event.entityLiving;
|
||||
EntityLivingBase healedEntity = event.getEntityLiving();
|
||||
if (!(healedEntity instanceof EntityPlayer))
|
||||
{
|
||||
return;
|
||||
|
@ -539,10 +539,10 @@ public class EventHandler
|
|||
LivingArmour armour = ItemLivingArmour.armourMap.get(chestStack);
|
||||
if (armour != null)
|
||||
{
|
||||
StatTrackerHealthboost.incrementCounter(armour, event.amount);
|
||||
StatTrackerHealthboost.incrementCounter(armour, event.getAmount());
|
||||
if (player.worldObj.canSeeSky(player.getPosition()) && player.worldObj.provider.isDaytime())
|
||||
{
|
||||
StatTrackerSolarPowered.incrementCounter(armour, event.amount);
|
||||
StatTrackerSolarPowered.incrementCounter(armour, event.getAmount());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -551,9 +551,9 @@ public class EventHandler
|
|||
@SubscribeEvent
|
||||
public void onEntityAttacked(LivingAttackEvent event)
|
||||
{
|
||||
DamageSource source = event.source;
|
||||
Entity sourceEntity = event.source.getEntity();
|
||||
EntityLivingBase attackedEntity = event.entityLiving;
|
||||
DamageSource source = event.getSource();
|
||||
Entity sourceEntity = event.getSource().getEntity();
|
||||
EntityLivingBase attackedEntity = event.getEntityLiving();
|
||||
|
||||
if (attackedEntity.hurtResistantTime > 0)
|
||||
{
|
||||
|
@ -567,7 +567,7 @@ public class EventHandler
|
|||
// Living Armor Handling
|
||||
if (LivingArmour.hasFullSet(attackedPlayer))
|
||||
{
|
||||
float amount = Math.min(Utils.getModifiedDamage(attackedPlayer, event.source, event.ammount), attackedPlayer.getHealth());
|
||||
float amount = Math.min(Utils.getModifiedDamage(attackedPlayer, event.getSource(), event.getAmount()), attackedPlayer.getHealth());
|
||||
ItemStack chestStack = attackedPlayer.getItemStackFromSlot(EntityEquipmentSlot.CHEST);
|
||||
LivingArmour armour = ItemLivingArmour.armourMap.get(chestStack);
|
||||
if (armour != null)
|
||||
|
@ -594,7 +594,7 @@ public class EventHandler
|
|||
// Living Armor Handling
|
||||
if (LivingArmour.hasFullSet(player))
|
||||
{
|
||||
float amount = Math.min(Utils.getModifiedDamage(attackedEntity, event.source, event.ammount), attackedEntity.getHealth());
|
||||
float amount = Math.min(Utils.getModifiedDamage(attackedEntity, event.getSource(), event.getAmount()), attackedEntity.getHealth());
|
||||
ItemStack chestStack = player.getItemStackFromSlot(EntityEquipmentSlot.CHEST);
|
||||
LivingArmour armour = ItemLivingArmour.armourMap.get(chestStack);
|
||||
if (armour != null)
|
||||
|
@ -611,9 +611,9 @@ public class EventHandler
|
|||
@SubscribeEvent
|
||||
public void onArrowFire(ArrowLooseEvent event)
|
||||
{
|
||||
World world = event.entityPlayer.worldObj;
|
||||
World world = event.getEntityPlayer().worldObj;
|
||||
ItemStack stack = event.getBow();
|
||||
EntityPlayer player = event.entityPlayer;
|
||||
EntityPlayer player = event.getEntityPlayer();
|
||||
|
||||
if (LivingArmour.hasFullSet(player))
|
||||
{
|
||||
|
@ -690,8 +690,8 @@ public class EventHandler
|
|||
@SubscribeEvent
|
||||
public void onLivingDrops(LivingDropsEvent event)
|
||||
{
|
||||
EntityLivingBase attackedEntity = event.entityLiving;
|
||||
DamageSource source = event.source;
|
||||
EntityLivingBase attackedEntity = event.getEntityLiving();
|
||||
DamageSource source = event.getSource();
|
||||
Entity entity = source.getEntity();
|
||||
|
||||
if (attackedEntity.isPotionActive(ModPotions.soulSnare))
|
||||
|
@ -701,7 +701,7 @@ public class EventHandler
|
|||
|
||||
double amountOfSouls = random.nextDouble() * (lvl + 1) * (lvl + 1) * 5;
|
||||
ItemStack soulStack = ((IDemonWill) ModItems.monsterSoul).createWill(0, amountOfSouls);
|
||||
event.drops.add(new EntityItem(attackedEntity.worldObj, attackedEntity.posX, attackedEntity.posY, attackedEntity.posZ, soulStack));
|
||||
event.getDrops().add(new EntityItem(attackedEntity.worldObj, attackedEntity.posX, attackedEntity.posY, attackedEntity.posZ, soulStack));
|
||||
}
|
||||
|
||||
if (entity != null && entity instanceof EntityPlayer)
|
||||
|
@ -711,7 +711,7 @@ public class EventHandler
|
|||
if (heldStack != null && heldStack.getItem() instanceof IDemonWillWeapon && !player.worldObj.isRemote)
|
||||
{
|
||||
IDemonWillWeapon demonWillWeapon = (IDemonWillWeapon) heldStack.getItem();
|
||||
List<ItemStack> droppedSouls = demonWillWeapon.getRandomDemonWillDrop(attackedEntity, player, heldStack, event.lootingLevel);
|
||||
List<ItemStack> droppedSouls = demonWillWeapon.getRandomDemonWillDrop(attackedEntity, player, heldStack, event.getLootingLevel());
|
||||
if (!droppedSouls.isEmpty())
|
||||
{
|
||||
ItemStack remainder;
|
||||
|
@ -719,7 +719,7 @@ public class EventHandler
|
|||
{
|
||||
remainder = PlayerDemonWillHandler.addDemonWill(player, willStack);
|
||||
if (remainder != null && ((IDemonWill) remainder.getItem()).getWill(remainder) >= 0.0001)
|
||||
event.drops.add(new EntityItem(attackedEntity.worldObj, attackedEntity.posX, attackedEntity.posY, attackedEntity.posZ, remainder));
|
||||
event.getDrops().add(new EntityItem(attackedEntity.worldObj, attackedEntity.posX, attackedEntity.posY, attackedEntity.posZ, remainder));
|
||||
}
|
||||
player.inventoryContainer.detectAndSendChanges();
|
||||
}
|
||||
|
@ -728,17 +728,17 @@ public class EventHandler
|
|||
if (heldStack != null && heldStack.getItem() == ModItems.boundSword && !(attackedEntity instanceof EntityAnimal))
|
||||
for (int i = 0; i <= EnchantmentHelper.getLootingModifier(player); i++)
|
||||
if (this.random.nextDouble() < 0.2)
|
||||
event.drops.add(new EntityItem(attackedEntity.worldObj, attackedEntity.posX, attackedEntity.posY, attackedEntity.posZ, new ItemStack(ModItems.bloodShard, 1, 0)));
|
||||
event.getDrops().add(new EntityItem(attackedEntity.worldObj, attackedEntity.posX, attackedEntity.posY, attackedEntity.posZ, new ItemStack(ModItems.bloodShard, 1, 0)));
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onItemPickup(EntityItemPickupEvent event)
|
||||
{
|
||||
ItemStack stack = event.item.getEntityItem();
|
||||
ItemStack stack = event.getItem().getEntityItem();
|
||||
if (stack != null && stack.getItem() instanceof IDemonWill)
|
||||
{
|
||||
EntityPlayer player = event.entityPlayer;
|
||||
EntityPlayer player = event.getEntityPlayer();
|
||||
|
||||
ItemStack remainder = PlayerDemonWillHandler.addDemonWill(player, stack);
|
||||
|
||||
|
|
Loading…
Reference in a new issue