Merge remote-tracking branch 'origin/1.12' into 1.12
This commit is contained in:
commit
d5834a34ba
|
@ -94,14 +94,16 @@ public class ItemSacrificialDagger extends ItemEnum<ItemSacrificialDagger.Dagger
|
||||||
return super.onItemRightClick(world, player, hand);
|
return super.onItemRightClick(world, player, hand);
|
||||||
|
|
||||||
if (evt.shouldDrainHealth) {
|
if (evt.shouldDrainHealth) {
|
||||||
|
DamageSourceBloodMagic damageSrc = DamageSourceBloodMagic.INSTANCE;
|
||||||
player.hurtResistantTime = 0;
|
player.hurtResistantTime = 0;
|
||||||
player.attackEntityFrom(DamageSourceBloodMagic.INSTANCE, 0.001F);
|
float playerHealth = player.getHealth();
|
||||||
player.setHealth(Math.max(player.getHealth() - 2, 0.0001f));
|
if (Math.ceil(player.getHealth() - 2) <= 0) {
|
||||||
if (player.getHealth() <= 0.001f) {
|
player.attackEntityFrom(damageSrc, Float.MAX_VALUE);
|
||||||
player.onDeath(DamageSourceBloodMagic.INSTANCE);
|
} else {
|
||||||
player.setHealth(0);
|
float damageAmount = net.minecraftforge.common.ForgeHooks.onLivingDamage(player, damageSrc, 2.0F);
|
||||||
|
player.getCombatTracker().trackDamage(damageSrc, playerHealth, damageAmount);
|
||||||
|
player.setHealth(Math.max(player.getHealth() - 2, 0.001f));
|
||||||
}
|
}
|
||||||
// player.attackEntityFrom(BloodMagicAPI.getDamageSource(), 2.0F);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!evt.shouldFillAltar)
|
if (!evt.shouldFillAltar)
|
||||||
|
|
|
@ -204,7 +204,7 @@ public class TileDemonCrucible extends TileInventory implements ITickable, IDemo
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canInsertItem(int index, ItemStack stack, EnumFacing direction) {
|
public boolean canInsertItem(int index, ItemStack stack, EnumFacing direction) {
|
||||||
return !stack.isEmpty() && (stack.getItem() instanceof IDemonWillGem || stack.getItem() instanceof IDiscreteDemonWill);
|
return !stack.isEmpty() && inventory.get(0).isEmpty() && (stack.getItem() instanceof IDemonWillGem || stack.getItem() instanceof IDiscreteDemonWill);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue