Update Forge + mappings
This commit is contained in:
parent
b408234ab0
commit
d550513f0a
98 changed files with 313 additions and 296 deletions
|
@ -42,7 +42,7 @@ public class ItemSigilAir extends ItemSigilBase implements ISentientSwordEffectP
|
|||
player.motionY = vec.yCoord * wantedVelocity;
|
||||
player.motionZ = vec.zCoord * wantedVelocity;
|
||||
player.velocityChanged = true;
|
||||
world.playSound(null, player.posX, player.posY, player.posZ, SoundEvents.block_fire_extinguish, SoundCategory.BLOCKS, 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F);
|
||||
world.playSound(null, player.posX, player.posY, player.posZ, SoundEvents.BLOCK_FIRE_EXTINGUISH, SoundCategory.BLOCKS, 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F);
|
||||
|
||||
player.fallDistance = 0;
|
||||
|
||||
|
@ -56,7 +56,7 @@ public class ItemSigilAir extends ItemSigilBase implements ISentientSwordEffectP
|
|||
@Override
|
||||
public boolean applyOnHitEffect(EnumDemonWillType type, ItemStack swordStack, ItemStack providerStack, EntityLivingBase attacker, EntityLivingBase target)
|
||||
{
|
||||
target.addPotionEffect(new PotionEffect(MobEffects.levitation, 200, 0));
|
||||
target.addPotionEffect(new PotionEffect(MobEffects.LEVITATION, 200, 0));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ public class ItemSigilBloodLight extends ItemSigilBase
|
|||
@Override
|
||||
public ActionResult<ItemStack> onItemRightClick(ItemStack stack, World world, EntityPlayer player, EnumHand hand)
|
||||
{
|
||||
RayTraceResult mop = this.getMovingObjectPositionFromPlayer(world, player, false);
|
||||
RayTraceResult mop = this.rayTrace(world, player, false);
|
||||
|
||||
if (getCooldownRemainder(stack) > 0)
|
||||
return super.onItemRightClick(stack, world, player, hand);
|
||||
|
|
|
@ -35,7 +35,7 @@ public class ItemSigilDivination extends ItemSigilBase implements IAltarReader
|
|||
{
|
||||
super.onItemRightClick(stack, world, player, hand);
|
||||
|
||||
RayTraceResult position = getMovingObjectPositionFromPlayer(world, player, false);
|
||||
RayTraceResult position = rayTrace(world, player, false);
|
||||
|
||||
if (position == null)
|
||||
{
|
||||
|
|
|
@ -19,7 +19,7 @@ public class ItemSigilElementalAffinity extends ItemSigilToggleableBase
|
|||
{
|
||||
player.fallDistance = 0;
|
||||
player.extinguish();
|
||||
player.addPotionEffect(new PotionEffect(MobEffects.fireResistance, 2, 1, true, false));
|
||||
player.addPotionEffect(new PotionEffect(MobEffects.waterBreathing, 2, 0, true, false));
|
||||
player.addPotionEffect(new PotionEffect(MobEffects.FIRE_RESISTANCE, 2, 1, true, false));
|
||||
player.addPotionEffect(new PotionEffect(MobEffects.WATER_BREATHING, 2, 0, true, false));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,6 +17,6 @@ public class ItemSigilFastMiner extends ItemSigilToggleableBase
|
|||
@Override
|
||||
public void onSigilUpdate(ItemStack stack, World world, EntityPlayer player, int itemSlot, boolean isSelected)
|
||||
{
|
||||
player.addPotionEffect(new PotionEffect(MobEffects.digSpeed, 2, 0, true, false));
|
||||
player.addPotionEffect(new PotionEffect(MobEffects.HASTE, 2, 0, true, false));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,31 +31,31 @@ public class ItemSigilLava extends ItemSigilBase
|
|||
{
|
||||
if (!world.isRemote && !isUnusable(stack))
|
||||
{
|
||||
RayTraceResult movingobjectposition = this.getMovingObjectPositionFromPlayer(world, player, false);
|
||||
RayTraceResult rayTrace = this.rayTrace(world, player, false);
|
||||
|
||||
if (movingobjectposition != null)
|
||||
if (rayTrace != null)
|
||||
{
|
||||
ActionResult<ItemStack> ret = ForgeEventFactory.onBucketUse(player, world, stack, movingobjectposition);
|
||||
ActionResult<ItemStack> ret = ForgeEventFactory.onBucketUse(player, world, stack, rayTrace);
|
||||
if (ret != null)
|
||||
return ret;
|
||||
|
||||
if (movingobjectposition.typeOfHit == RayTraceResult.Type.BLOCK)
|
||||
if (rayTrace.typeOfHit == RayTraceResult.Type.BLOCK)
|
||||
{
|
||||
BlockPos blockpos = movingobjectposition.getBlockPos();
|
||||
BlockPos blockpos = rayTrace.getBlockPos();
|
||||
|
||||
if (!world.isBlockModifiable(player, blockpos))
|
||||
{
|
||||
return super.onItemRightClick(stack, world, player, hand);
|
||||
}
|
||||
|
||||
if (!player.canPlayerEdit(blockpos.offset(movingobjectposition.sideHit), movingobjectposition.sideHit, stack))
|
||||
if (!player.canPlayerEdit(blockpos.offset(rayTrace.sideHit), rayTrace.sideHit, stack))
|
||||
{
|
||||
return super.onItemRightClick(stack, world, player, hand);
|
||||
}
|
||||
|
||||
BlockPos blockpos1 = blockpos.offset(movingobjectposition.sideHit);
|
||||
BlockPos blockpos1 = blockpos.offset(rayTrace.sideHit);
|
||||
|
||||
if (!player.canPlayerEdit(blockpos1, movingobjectposition.sideHit, stack))
|
||||
if (!player.canPlayerEdit(blockpos1, rayTrace.sideHit, stack))
|
||||
{
|
||||
return super.onItemRightClick(stack, world, player, hand);
|
||||
}
|
||||
|
@ -106,12 +106,12 @@ public class ItemSigilLava extends ItemSigilBase
|
|||
if (!world.isAirBlock(blockPos) && world.getBlockState(blockPos).getBlock().getMaterial(world.getBlockState(blockPos)).isSolid())
|
||||
{
|
||||
return false;
|
||||
} else if ((world.getBlockState(blockPos).getBlock() == Blocks.lava || world.getBlockState(blockPos).getBlock() == Blocks.flowing_lava) && world.getBlockState(blockPos).getBlock().getMetaFromState(world.getBlockState(blockPos)) == 0)
|
||||
} else if ((world.getBlockState(blockPos).getBlock() == Blocks.LAVA || world.getBlockState(blockPos).getBlock() == Blocks.FLOWING_LAVA) && world.getBlockState(blockPos).getBlock().getMetaFromState(world.getBlockState(blockPos)) == 0)
|
||||
{
|
||||
return false;
|
||||
} else
|
||||
{
|
||||
world.setBlockState(blockPos, Blocks.flowing_lava.getBlockState().getBaseState(), 3);
|
||||
world.setBlockState(blockPos, Blocks.FLOWING_LAVA.getBlockState().getBaseState(), 3);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,9 +35,9 @@ public class ItemSigilSeer extends ItemSigilBase implements IAltarReader
|
|||
if (!world.isRemote)
|
||||
{
|
||||
super.onItemRightClick(stack, world, player, hand);
|
||||
RayTraceResult position = getMovingObjectPositionFromPlayer(world, player, false);
|
||||
RayTraceResult rayTrace = rayTrace(world, player, false);
|
||||
|
||||
if (position == null)
|
||||
if (rayTrace == null)
|
||||
{
|
||||
int currentEssence = NetworkHelper.getSoulNetwork(getOwnerUUID(stack)).getCurrentEssence();
|
||||
|
||||
|
@ -48,10 +48,10 @@ public class ItemSigilSeer extends ItemSigilBase implements IAltarReader
|
|||
ChatUtil.sendNoSpam(player, toSend.toArray(new ITextComponent[toSend.size()]));
|
||||
} else
|
||||
{
|
||||
if (position.typeOfHit == RayTraceResult.Type.BLOCK)
|
||||
if (rayTrace.typeOfHit == RayTraceResult.Type.BLOCK)
|
||||
{
|
||||
|
||||
TileEntity tile = world.getTileEntity(position.getBlockPos());
|
||||
TileEntity tile = world.getTileEntity(rayTrace.getBlockPos());
|
||||
|
||||
if (tile != null && tile instanceof IBloodAltar)
|
||||
{
|
||||
|
|
|
@ -29,29 +29,29 @@ public class ItemSigilVoid extends ItemSigilBase
|
|||
{
|
||||
if (!world.isRemote && !isUnusable(stack))
|
||||
{
|
||||
RayTraceResult movingobjectposition = this.getMovingObjectPositionFromPlayer(world, player, true);
|
||||
RayTraceResult rayTrace = this.rayTrace(world, player, true);
|
||||
|
||||
if (movingobjectposition != null)
|
||||
if (rayTrace != null)
|
||||
{
|
||||
ActionResult<ItemStack> ret = ForgeEventFactory.onBucketUse(player, world, stack, movingobjectposition);
|
||||
ActionResult<ItemStack> ret = ForgeEventFactory.onBucketUse(player, world, stack, rayTrace);
|
||||
if (ret != null)
|
||||
return ret;
|
||||
|
||||
if (movingobjectposition.typeOfHit == RayTraceResult.Type.BLOCK)
|
||||
if (rayTrace.typeOfHit == RayTraceResult.Type.BLOCK)
|
||||
{
|
||||
BlockPos blockpos = movingobjectposition.getBlockPos();
|
||||
BlockPos blockpos = rayTrace.getBlockPos();
|
||||
|
||||
if (!world.isBlockModifiable(player, blockpos))
|
||||
{
|
||||
return super.onItemRightClick(stack, world, player, hand);
|
||||
}
|
||||
|
||||
if (!player.canPlayerEdit(blockpos.offset(movingobjectposition.sideHit), movingobjectposition.sideHit, stack))
|
||||
if (!player.canPlayerEdit(blockpos.offset(rayTrace.sideHit), rayTrace.sideHit, stack))
|
||||
{
|
||||
return super.onItemRightClick(stack, world, player, hand);
|
||||
}
|
||||
|
||||
if (!player.canPlayerEdit(blockpos, movingobjectposition.sideHit, stack))
|
||||
if (!player.canPlayerEdit(blockpos, rayTrace.sideHit, stack))
|
||||
{
|
||||
return super.onItemRightClick(stack, world, player, hand);
|
||||
}
|
||||
|
|
|
@ -34,27 +34,27 @@ public class ItemSigilWater extends ItemSigilBase
|
|||
{
|
||||
if (!world.isRemote && !isUnusable(stack))
|
||||
{
|
||||
RayTraceResult movingobjectposition = this.getMovingObjectPositionFromPlayer(world, player, false);
|
||||
RayTraceResult rayTrace = this.rayTrace(world, player, false);
|
||||
|
||||
if (movingobjectposition != null)
|
||||
if (rayTrace != null)
|
||||
{
|
||||
ActionResult<ItemStack> ret = net.minecraftforge.event.ForgeEventFactory.onBucketUse(player, world, stack, movingobjectposition);
|
||||
ActionResult<ItemStack> ret = net.minecraftforge.event.ForgeEventFactory.onBucketUse(player, world, stack, rayTrace);
|
||||
if (ret != null)
|
||||
return ret;
|
||||
|
||||
if (movingobjectposition.typeOfHit == RayTraceResult.Type.BLOCK)
|
||||
if (rayTrace.typeOfHit == RayTraceResult.Type.BLOCK)
|
||||
{
|
||||
BlockPos blockpos = movingobjectposition.getBlockPos();
|
||||
BlockPos blockpos = rayTrace.getBlockPos();
|
||||
|
||||
if (!world.isBlockModifiable(player, blockpos))
|
||||
return super.onItemRightClick(stack, world, player, hand);
|
||||
|
||||
if (!player.canPlayerEdit(blockpos.offset(movingobjectposition.sideHit), movingobjectposition.sideHit, stack))
|
||||
if (!player.canPlayerEdit(blockpos.offset(rayTrace.sideHit), rayTrace.sideHit, stack))
|
||||
return super.onItemRightClick(stack, world, player, hand);
|
||||
|
||||
BlockPos blockpos1 = blockpos.offset(movingobjectposition.sideHit);
|
||||
BlockPos blockpos1 = blockpos.offset(rayTrace.sideHit);
|
||||
|
||||
if (!player.canPlayerEdit(blockpos1, movingobjectposition.sideHit, stack))
|
||||
if (!player.canPlayerEdit(blockpos1, rayTrace.sideHit, stack))
|
||||
return super.onItemRightClick(stack, world, player, hand);
|
||||
|
||||
if (this.canPlaceWater(world, blockpos1) && NetworkHelper.getSoulNetwork(player).syphonAndDamage(player, getLpUsed()) && this.tryPlaceWater(world, blockpos1))
|
||||
|
@ -90,9 +90,9 @@ public class ItemSigilWater extends ItemSigilBase
|
|||
return EnumActionResult.FAIL;
|
||||
}
|
||||
|
||||
if (world.getBlockState(blockPos).getBlock() == Blocks.cauldron && NetworkHelper.getSoulNetwork(player).syphonAndDamage(player, getLpUsed()))
|
||||
if (world.getBlockState(blockPos).getBlock() == Blocks.CAULDRON && NetworkHelper.getSoulNetwork(player).syphonAndDamage(player, getLpUsed()))
|
||||
{
|
||||
world.setBlockState(blockPos, Blocks.cauldron.getDefaultState().withProperty(BlockCauldron.LEVEL, 3));
|
||||
world.setBlockState(blockPos, Blocks.CAULDRON.getDefaultState().withProperty(BlockCauldron.LEVEL, 3));
|
||||
return EnumActionResult.SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -103,7 +103,7 @@ public class ItemSigilWater extends ItemSigilBase
|
|||
{
|
||||
if (!world.isAirBlock(blockPos) && world.getBlockState(blockPos).getBlock().getMaterial(world.getBlockState(blockPos)).isSolid())
|
||||
return false;
|
||||
else if ((world.getBlockState(blockPos).getBlock() == Blocks.water || world.getBlockState(blockPos).getBlock() == Blocks.flowing_water) && world.getBlockState(blockPos).getBlock().getMetaFromState(world.getBlockState(blockPos)) == 0)
|
||||
else if ((world.getBlockState(blockPos).getBlock() == Blocks.WATER || world.getBlockState(blockPos).getBlock() == Blocks.FLOWING_WATER) && world.getBlockState(blockPos).getBlock().getMetaFromState(world.getBlockState(blockPos)) == 0)
|
||||
return false;
|
||||
else
|
||||
return true;
|
||||
|
@ -125,7 +125,7 @@ public class ItemSigilWater extends ItemSigilBase
|
|||
int i = pos.getX();
|
||||
int j = pos.getY();
|
||||
int k = pos.getZ();
|
||||
worldIn.playSound((EntityPlayer) null, i, j, k, SoundEvents.block_fire_extinguish, SoundCategory.BLOCKS, 0.5F, 2.6F + (worldIn.rand.nextFloat() - worldIn.rand.nextFloat()) * 0.8F);
|
||||
worldIn.playSound(null, i, j, k, SoundEvents.BLOCK_FIRE_EXTINGUISH, SoundCategory.BLOCKS, 0.5F, 2.6F + (worldIn.rand.nextFloat() - worldIn.rand.nextFloat()) * 0.8F);
|
||||
|
||||
for (int l = 0; l < 8; ++l)
|
||||
worldIn.spawnParticle(EnumParticleTypes.SMOKE_LARGE, (double) i + Math.random(), (double) j + Math.random(), (double) k + Math.random(), 0.0D, 0.0D, 0.0D, 0);
|
||||
|
@ -134,7 +134,7 @@ public class ItemSigilWater extends ItemSigilBase
|
|||
if (!worldIn.isRemote && notSolid && !material.isLiquid())
|
||||
worldIn.destroyBlock(pos, true);
|
||||
|
||||
worldIn.setBlockState(pos, Blocks.flowing_water.getDefaultState(), 3);
|
||||
worldIn.setBlockState(pos, Blocks.FLOWING_WATER.getDefaultState(), 3);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue