Move config to annotation system
All old configs must be deleted for this to work properly. Since the rest
of the update is filled with world breaking changes, this should be fine.
Also some mapping updates
(cherry picked from commit d587a8c
)
This commit is contained in:
parent
a10b2ece9a
commit
d99cf77288
45 changed files with 320 additions and 561 deletions
|
@ -82,8 +82,8 @@ public class ItemBoundAxe extends ItemBoundTool implements IMeshProvider {
|
|||
if (MinecraftForge.EVENT_BUS.post(event) || event.getResult() == Event.Result.DENY)
|
||||
continue;
|
||||
|
||||
if (blockStack.getBlock().getBlockHardness(blockStack.getState(), world, blockPos) != -1.0F) {
|
||||
float strengthVsBlock = getStrVsBlock(stack, blockStack.getState());
|
||||
if (blockStack.getState().getBlockHardness(world, blockPos) != -1.0F) {
|
||||
float strengthVsBlock = getDestroySpeed(stack, blockStack.getState());
|
||||
|
||||
if (strengthVsBlock > 1.1F || blockStack.getBlock() instanceof BlockLeaves && world.canMineBlockBody(player, blockPos)) {
|
||||
if (silkTouch && blockStack.getBlock().canSilkHarvest(world, blockPos, world.getBlockState(blockPos), player))
|
||||
|
|
|
@ -60,11 +60,11 @@ public class ItemBoundPickaxe extends ItemBoundTool implements IMeshProvider {
|
|||
}
|
||||
|
||||
@Override
|
||||
public float getStrVsBlock(ItemStack stack, IBlockState state) {
|
||||
public float getDestroySpeed(ItemStack stack, IBlockState state) {
|
||||
if (!getActivated(stack))
|
||||
return 1.0F;
|
||||
|
||||
return state.getMaterial() != Material.IRON && state.getMaterial() != Material.ANVIL && state.getMaterial() != Material.ROCK ? super.getStrVsBlock(stack, state) : this.efficiencyOnProperMaterial;
|
||||
return state.getMaterial() != Material.IRON && state.getMaterial() != Material.ANVIL && state.getMaterial() != Material.ROCK ? super.getDestroySpeed(stack, state) : this.efficiency;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -97,7 +97,7 @@ public class ItemBoundPickaxe extends ItemBoundTool implements IMeshProvider {
|
|||
continue;
|
||||
|
||||
if (blockStack.getBlock() != null && blockStack.getBlock().getBlockHardness(blockStack.getState(), world, blockPos) != -1) {
|
||||
float strengthVsBlock = getStrVsBlock(stack, blockStack.getState());
|
||||
float strengthVsBlock = getDestroySpeed(stack, blockStack.getState());
|
||||
|
||||
if (strengthVsBlock > 1.1F && world.canMineBlockBody(player, blockPos)) {
|
||||
if (silkTouch && blockStack.getBlock().canSilkHarvest(world, blockPos, world.getBlockState(blockPos), player))
|
||||
|
|
|
@ -83,7 +83,7 @@ public class ItemBoundShovel extends ItemBoundTool implements IMeshProvider {
|
|||
continue;
|
||||
|
||||
if (blockStack.getBlock() != null && blockStack.getBlock().getBlockHardness(blockStack.getState(), world, blockPos) != -1) {
|
||||
float strengthVsBlock = getStrVsBlock(stack, blockStack.getState());
|
||||
float strengthVsBlock = getDestroySpeed(stack, blockStack.getState());
|
||||
|
||||
if (strengthVsBlock > 1.1F && world.canMineBlockBody(player, blockPos)) {
|
||||
if (silkTouch && blockStack.getBlock().canSilkHarvest(world, blockPos, world.getBlockState(blockPos), player))
|
||||
|
|
|
@ -63,8 +63,8 @@ public class ItemBoundTool extends ItemTool implements IBindable, IActivatable {
|
|||
}
|
||||
|
||||
@Override
|
||||
public float getStrVsBlock(ItemStack stack, IBlockState state) {
|
||||
return getActivated(stack) ? toolMaterial.getEfficiencyOnProperMaterial() : 1.0F;
|
||||
public float getDestroySpeed(ItemStack stack, IBlockState state) {
|
||||
return getActivated(stack) ? toolMaterial.getEfficiency() : 1.0F;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -98,7 +98,7 @@ public class ItemSacrificialDagger extends Item implements IMeshProvider {
|
|||
return new ActionResult<ItemStack>(EnumActionResult.SUCCESS, stack);
|
||||
}
|
||||
|
||||
int lpAdded = ConfigHandler.sacrificialDaggerConversion * ConfigHandler.sacrificialDaggerDamage;
|
||||
int lpAdded = ConfigHandler.values.sacrificialDaggerConversion * 2;
|
||||
|
||||
RayTraceResult rayTrace = rayTrace(world, player, false);
|
||||
if (rayTrace != null && rayTrace.typeOfHit == RayTraceResult.Type.BLOCK) {
|
||||
|
@ -109,14 +109,14 @@ public class ItemSacrificialDagger extends Item implements IMeshProvider {
|
|||
}
|
||||
|
||||
if (!player.capabilities.isCreativeMode) {
|
||||
SacrificeKnifeUsedEvent evt = new SacrificeKnifeUsedEvent(player, true, true, ConfigHandler.sacrificialDaggerDamage, lpAdded);
|
||||
SacrificeKnifeUsedEvent evt = new SacrificeKnifeUsedEvent(player, true, true, 2, lpAdded);
|
||||
if (MinecraftForge.EVENT_BUS.post(evt))
|
||||
return super.onItemRightClick(world, player, hand);
|
||||
|
||||
if (evt.shouldDrainHealth) {
|
||||
player.hurtResistantTime = 0;
|
||||
player.attackEntityFrom(BloodMagicAPI.damageSource, 0.001F);
|
||||
player.setHealth(Math.max(player.getHealth() - ConfigHandler.sacrificialDaggerDamage, 0.0001f));
|
||||
player.setHealth(Math.max(player.getHealth() - 2, 0.0001f));
|
||||
if (player.getHealth() <= 0.001f) {
|
||||
player.onDeath(BloodMagicAPI.damageSource);
|
||||
player.setHealth(0);
|
||||
|
|
|
@ -82,8 +82,8 @@ public class ItemSentientAxe extends ItemAxe implements IDemonWillWeapon, IMeshP
|
|||
}
|
||||
|
||||
@Override
|
||||
public float getStrVsBlock(ItemStack stack, IBlockState state) {
|
||||
float value = super.getStrVsBlock(stack, state);
|
||||
public float getDestroySpeed(ItemStack stack, IBlockState state) {
|
||||
float value = super.getDestroySpeed(stack, state);
|
||||
if (value > 1) {
|
||||
return (float) (value + getDigSpeedOfSword(stack));
|
||||
} else {
|
||||
|
|
|
@ -264,13 +264,12 @@ public class ItemSentientBow extends ItemBow implements IMultiWillTool, ISentien
|
|||
|
||||
float newArrowVelocity = velocity * getVelocityOfArrow(stack);
|
||||
EntitySentientArrow entityArrow = new EntitySentientArrow(world, user, type, amount);
|
||||
entityArrow.setAim(user, user.rotationPitch, user.rotationYaw, 0.0F, newArrowVelocity, 1.0F);
|
||||
|
||||
double d0 = target.posX - user.posX;
|
||||
double d1 = target.getEntityBoundingBox().minY + (double) (target.height / 3.0F) - entityArrow.posY;
|
||||
double d2 = target.posZ - user.posZ;
|
||||
double d3 = (double) MathHelper.sqrt(d0 * d0 + d2 * d2);
|
||||
entityArrow.setThrowableHeading(d0, d1 + d3 * 0.05, d2, newArrowVelocity, 0);
|
||||
entityArrow.shoot(d0, d1 + d3 * 0.05, d2, newArrowVelocity, 0);
|
||||
|
||||
if (newArrowVelocity == 0) {
|
||||
world.playSound(null, user.getPosition(), SoundEvents.BLOCK_FIRE_EXTINGUISH, SoundCategory.NEUTRAL, 0.4F, 1.0F);
|
||||
|
@ -334,7 +333,7 @@ public class ItemSentientBow extends ItemBow implements IMultiWillTool, ISentien
|
|||
|
||||
float newArrowVelocity = arrowVelocity * getVelocityOfArrow(stack);
|
||||
EntitySentientArrow entityArrow = new EntitySentientArrow(world, entityLiving, type, amount);
|
||||
entityArrow.setAim(player, player.rotationPitch, player.rotationYaw, 0.0F, newArrowVelocity, 1.0F);
|
||||
entityArrow.shoot(player, player.rotationPitch, player.rotationYaw, 0.0F, newArrowVelocity, 1.0F);
|
||||
|
||||
if (newArrowVelocity == 0) {
|
||||
world.playSound(null, player.getPosition(), SoundEvents.BLOCK_FIRE_EXTINGUISH, SoundCategory.NEUTRAL, 0.4F, 1.0F);
|
||||
|
|
|
@ -82,8 +82,8 @@ public class ItemSentientPickaxe extends ItemPickaxe implements IDemonWillWeapon
|
|||
}
|
||||
|
||||
@Override
|
||||
public float getStrVsBlock(ItemStack stack, IBlockState state) {
|
||||
float value = super.getStrVsBlock(stack, state);
|
||||
public float getDestroySpeed(ItemStack stack, IBlockState state) {
|
||||
float value = super.getDestroySpeed(stack, state);
|
||||
if (value > 1) {
|
||||
return (float) (value + getDigSpeedOfSword(stack));
|
||||
} else {
|
||||
|
|
|
@ -82,8 +82,8 @@ public class ItemSentientShovel extends ItemSpade implements IDemonWillWeapon, I
|
|||
}
|
||||
|
||||
@Override
|
||||
public float getStrVsBlock(ItemStack stack, IBlockState state) {
|
||||
float value = super.getStrVsBlock(stack, state);
|
||||
public float getDestroySpeed(ItemStack stack, IBlockState state) {
|
||||
float value = super.getDestroySpeed(stack, state);
|
||||
if (value > 1) {
|
||||
return (float) (value + getDigSpeedOfSword(stack));
|
||||
} else {
|
||||
|
|
|
@ -44,7 +44,7 @@ public class ItemSoulSnare extends Item implements IVariantProvider {
|
|||
|
||||
if (!worldIn.isRemote) {
|
||||
EntitySoulSnare snare = new EntitySoulSnare(worldIn, playerIn);
|
||||
snare.setHeadingFromThrower(playerIn, playerIn.rotationPitch, playerIn.rotationYaw, 0.0F, 1.5F, 1.0F);
|
||||
snare.shoot(playerIn, playerIn.rotationPitch, playerIn.rotationYaw, 0.0F, 1.5F, 1.0F);
|
||||
worldIn.spawnEntity(snare);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue