diff --git a/.gitignore b/.gitignore index 837742d..5f0f16a 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,4 @@ eclipse run build.bat runClient.bat +runServer.bat diff --git a/src/main/java/mod/acgaming/spackenmobs/entities/EntityFriedrichLiechtenstein.java b/src/main/java/mod/acgaming/spackenmobs/entities/EntityFriedrichLiechtenstein.java index 2e07f34..c7d2fcf 100644 --- a/src/main/java/mod/acgaming/spackenmobs/entities/EntityFriedrichLiechtenstein.java +++ b/src/main/java/mod/acgaming/spackenmobs/entities/EntityFriedrichLiechtenstein.java @@ -13,10 +13,7 @@ import net.minecraft.init.Items; import net.minecraft.init.SoundEvents; import net.minecraft.inventory.EntityEquipmentSlot; import net.minecraft.item.ItemStack; -import net.minecraft.util.DamageSource; -import net.minecraft.util.EnumHand; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.SoundEvent; +import net.minecraft.util.*; import net.minecraft.util.math.BlockPos; import net.minecraft.village.MerchantRecipe; import net.minecraft.village.MerchantRecipeList; @@ -29,6 +26,7 @@ public class EntityFriedrichLiechtenstein extends EntityCreature implements IMer super(worldIn); setSize(0.6F, 1.8F); setItemStackToSlot(EntityEquipmentSlot.MAINHAND, new ItemStack(ModItems.AHOJ_BRAUSE)); + setItemStackToSlot(EntityEquipmentSlot.OFFHAND, new ItemStack(ModItems.AHOJ_BRAUSE_DRINK)); } @Override @@ -60,6 +58,13 @@ public class EntityFriedrichLiechtenstein extends EntityCreature implements IMer { player.playSound(ModSoundEvents.ENTITY_FRIEDRICH_DEATH, 1.0F, 1.0F); player.playSound(SoundEvents.ENTITY_COW_MILK, 1.0F, 1.0F); + for (int i = 0; i < 7; ++i) + { + double d0 = this.rand.nextGaussian() * 0.02D; + double d1 = this.rand.nextGaussian() * 0.02D; + double d2 = this.rand.nextGaussian() * 0.02D; + this.world.spawnParticle(EnumParticleTypes.VILLAGER_HAPPY, this.posX + this.rand.nextFloat() * this.width * 2.0F - this.width, this.posY + 0.5D + this.rand.nextFloat() * this.height, this.posZ + this.rand.nextFloat() * this.width * 2.0F - this.width, d0, d1, d2); + } itemstack.shrink(1); if (itemstack.isEmpty()) diff --git a/src/main/java/mod/acgaming/spackenmobs/entities/EntityJens.java b/src/main/java/mod/acgaming/spackenmobs/entities/EntityJens.java index 907e388..9b88813 100644 --- a/src/main/java/mod/acgaming/spackenmobs/entities/EntityJens.java +++ b/src/main/java/mod/acgaming/spackenmobs/entities/EntityJens.java @@ -38,10 +38,9 @@ public class EntityJens extends EntityPig private static final Set TEMPTATION_ITEMS = Sets.newHashSet(ModItems.RAM); private static final Set FISH_ITEMS = Sets.newHashSet(Items.FISH); + public boolean digesting; public int digestTime; - @SideOnly(Side.CLIENT) - Minecraft MINECRAFT = Minecraft.getMinecraft(); public EntityJens(World worldIn) { @@ -93,8 +92,7 @@ public class EntityJens extends EntityPig double d0 = this.rand.nextGaussian() * 0.02D; double d1 = this.rand.nextGaussian() * 0.02D; double d2 = this.rand.nextGaussian() * 0.02D; - MINECRAFT.world.spawnParticle(EnumParticleTypes.HEART, this.posX + this.rand.nextFloat() * this.width * 2.0F - this.width, this.posY + 0.5D + this.rand.nextFloat() * this.height, - this.posZ + this.rand.nextFloat() * this.width * 2.0F - this.width, d0, d1, d2); + this.world.spawnParticle(EnumParticleTypes.HEART, this.posX + this.rand.nextFloat() * this.width * 2.0F - this.width, this.posY + 0.5D + this.rand.nextFloat() * this.height, this.posZ + this.rand.nextFloat() * this.width * 2.0F - this.width, d0, d1, d2); } this.addPotionEffect(new PotionEffect(MobEffects.NAUSEA, ModConfigs.Jens_digest_time * 20)); @@ -179,8 +177,7 @@ public class EntityJens extends EntityPig double d0 = this.rand.nextGaussian() * 0.02D; double d1 = this.rand.nextGaussian() * 0.02D; double d2 = this.rand.nextGaussian() * 0.02D; - MINECRAFT.world.spawnParticle(EnumParticleTypes.SMOKE_LARGE, this.posX + this.rand.nextFloat() * this.width * 2.0F - this.width, this.posY + 0.5D + this.rand.nextFloat() * this.height, - this.posZ + this.rand.nextFloat() * this.width * 2.0F - this.width, d0, d1, d2); + this.world.spawnParticle(EnumParticleTypes.SMOKE_LARGE, this.posX + this.rand.nextFloat() * this.width * 2.0F - this.width, this.posY + 0.5D + this.rand.nextFloat() * this.height, this.posZ + this.rand.nextFloat() * this.width * 2.0F - this.width, d0, d1, d2); } this.playSound(ModSoundEvents.ENTITY_JENS_POOP, 1.0F, (this.rand.nextFloat() - this.rand.nextFloat()) * 0.2F + 1.0F); this.dropItem(ModItems.SURSTROEMMING, 1);