Final adjustments, 2 additional traits, 1 trait rewritten. Liquids + textures included. German and english translation added.

This commit is contained in:
Robert Sosnitzka
2016-07-18 00:16:46 +02:00
parent 77e86d4281
commit 302ef6cccb
28 changed files with 717 additions and 380 deletions

View File

@@ -4,6 +4,7 @@ import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.monster.EntityMob;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.SoundEvents;
import net.minecraft.item.ItemStack;
import net.minecraft.util.text.TextFormatting;
import net.minecraft.world.World;
@@ -27,6 +28,7 @@ public class TraitHollow extends AbstractTrait {
int time = (int) player.getEntityWorld().getWorldTime();
if (random.nextFloat() <= 0.2 || (random.nextFloat() <= 0.2 && isNight(time))) {
((EntityLiving) target).setNoAI(true);
target.playSound(SoundEvents.ENTITY_ENDERMEN_TELEPORT, 1.0F, 1.0F);
if (target.getMaxHealth() < 200) {
target.setHealth(target.getMaxHealth() * (1.8f - random.nextFloat() * 0.4f));
}
@@ -38,7 +40,7 @@ public class TraitHollow extends AbstractTrait {
World w = event.getEntity().getEntityWorld();
if (event.getSource().getEntity() instanceof EntityPlayer) {
EntityPlayer player = (EntityPlayer) event.getSource().getEntity();
if (!w.isRemote && random.nextFloat() <= 0.2 && event.getEntity() instanceof EntityMob && TinkerUtil.hasTrait(TagUtil.getTagSafe(player.getHeldItemMainhand()), identifier)) {
if (!w.isRemote && random.nextFloat() <= 0.9 && event.getEntity() instanceof EntityMob && TinkerUtil.hasTrait(TagUtil.getTagSafe(player.getHeldItemMainhand()), identifier)) {
event.getDrops().clear();
}
}