Revert "Updated rods so they don't sue the deprecated methods"

This reverts commit a63cbf44f6.
This commit is contained in:
Flaxbeard committed 2016-10-04 22:26:01 -05:00
1 parent b98af839fe
commit 3f90dd940a
9 files changed
+9 -9

No files matched your search

@@ -54,7 +54,7 @@ public class ItemDiviningRod extends ItemMod implements IManaUsingItem, IAvatarW
public ActionResult<ItemStack> onItemRightClick(@Nonnull ItemStack stack, World world, EntityPlayer p, EnumHand hand) {
if(ManaItemHandler.requestManaExactForTool(stack, p, COST, true)) {
if(world.isRemote) {
int range = IManaProficiencyArmor.Helper.hasProficiency(p, stack) ? 20 : 15;
int range = IManaProficiencyArmor.Helper.hasProficiency(p) ? 20 : 15;
long seedxor = world.rand.nextLong();
doHighlight(world, new BlockPos(p), range, seedxor);
p.swingArm(hand);
@@ -127,7 +127,7 @@ public class ItemExchangeRod extends ItemMod implements IManaUsingItem, IWirefra
EntityPlayer player = (EntityPlayer) entity;
int extraRange = ItemNBTHelper.getInt(stack, TAG_EXTRA_RANGE, 1);
int extraRangeNew = IManaProficiencyArmor.Helper.hasProficiency(player, stack) ? 3 : 1;
int extraRangeNew = IManaProficiencyArmor.Helper.hasProficiency(player) ? 3 : 1;
if(extraRange != extraRangeNew)
ItemNBTHelper.setInt(stack, TAG_EXTRA_RANGE, extraRangeNew);
@@ -54,7 +54,7 @@ public class ItemFireRod extends ItemMod implements IManaUsingItem, IAvatarWield
entity.setPosition(pos.getX() + 0.5, pos.getY() + 1, pos.getZ() + 0.5);
player.worldObj.spawnEntityInWorld(entity);
player.getCooldownTracker().setCooldown(this, IManaProficiencyArmor.Helper.hasProficiency(player, par1ItemStack) ? COOLDOWN / 2 : COOLDOWN);
player.getCooldownTracker().setCooldown(this, IManaProficiencyArmor.Helper.hasProficiency(player) ? COOLDOWN / 2 : COOLDOWN);
ManaItemHandler.requestManaExactForTool(par1ItemStack, player, COST, true);
world.playSound(null, player.posX, player.posY, player.posZ, SoundEvents.ENTITY_BLAZE_AMBIENT, SoundCategory.PLAYERS, 1F, 1F);
@@ -211,7 +211,7 @@ public class ItemGravityRod extends ItemMod implements IManaUsingItem {
Vector3 moveVector = new Vector3(player.getLookVec().normalize());
if(item instanceof EntityItem) {
((EntityItem) item).setPickupDelay(20);
float mot = IManaProficiencyArmor.Helper.hasProficiency(player, stack) ? 2.25F : 1.5F;
float mot = IManaProficiencyArmor.Helper.hasProficiency(player) ? 2.25F : 1.5F;
item.motionX = moveVector.x * mot;
item.motionY = moveVector.y;
item.motionZ = moveVector.z * mot;
@@ -62,7 +62,7 @@ public class ItemMissileRod extends ItemMod implements IManaUsingItem, IAvatarWi
if(!(living instanceof EntityPlayer)) return;
EntityPlayer player = (EntityPlayer) living;
if(count != getMaxItemUseDuration(stack) && count % (IManaProficiencyArmor.Helper.hasProficiency(player, stack) ? 1 : 2) == 0 && !player.worldObj.isRemote && ManaItemHandler.requestManaExactForTool(stack, player, COST_PER, false)) {
if(count != getMaxItemUseDuration(stack) && count % (IManaProficiencyArmor.Helper.hasProficiency(player) ? 1 : 2) == 0 && !player.worldObj.isRemote && ManaItemHandler.requestManaExactForTool(stack, player, COST_PER, false)) {
if(spawnMissile(player.worldObj, player, player.posX + (Math.random() - 0.5 * 0.1), player.posY + 2.4 + (Math.random() - 0.5 * 0.1), player.posZ + (Math.random() - 0.5 * 0.1)))
ManaItemHandler.requestManaExactForTool(stack, player, COST_PER, true);
@@ -74,7 +74,7 @@ public class ItemRainbowRod extends ItemMod implements IManaUsingItem, IAvatarWi
BlockPos.MutableBlockPos lastChecker = new BlockPos.MutableBlockPos();
int count = 0;
boolean prof = IManaProficiencyArmor.Helper.hasProficiency(player, par1ItemStack);
boolean prof = IManaProficiencyArmor.Helper.hasProficiency(player);
int maxlen = prof ? 160 : 100;
int time = prof ? (int) (TIME * 1.6) : TIME;
@@ -117,7 +117,7 @@ public class ItemSmeltRod extends ItemMod implements IManaUsingItem {
}
if(!decremented)
playerData.put(p, new SmeltData(pos, IManaProficiencyArmor.Helper.hasProficiency(p, stack) ? (int) (TIME * 0.6) : TIME));
playerData.put(p, new SmeltData(pos, IManaProficiencyArmor.Helper.hasProficiency(p) ? (int) (TIME * 0.6) : TIME));
else {
for(int i = 0; i < 2; i++) {
double x = pos.getBlockPos().getX() + Math.random();
@@ -107,7 +107,7 @@ public class ItemTerraformRod extends ItemMod implements IManaUsingItem, IBlockP
}
private void terraform(ItemStack par1ItemStack, World world, EntityPlayer player) {
int range = IManaProficiencyArmor.Helper.hasProficiency(player, par1ItemStack) ? 22 : 16;
int range = IManaProficiencyArmor.Helper.hasProficiency(player) ? 22 : 16;
BlockPos startCenter = new BlockPos(player).down();
@@ -74,7 +74,7 @@ public class ItemTornadoRod extends ItemMod implements IManaUsingItem, IAvatarWi
} else if(isFlying(par1ItemStack)) {
if(holding) {
player.fallDistance = 0F;
player.motionY = IManaProficiencyArmor.Helper.hasProficiency(player, par1ItemStack) ? 1.6 : 1.25;
player.motionY = IManaProficiencyArmor.Helper.hasProficiency(player) ? 1.6 : 1.25;
player.worldObj.playSound(null, player.posX, player.posY, player.posZ, BotaniaSoundEvents.airRod, SoundCategory.PLAYERS, 0.1F, 0.25F);
for(int i = 0; i < 5; i++)