Adapt code and re-add missing changes

This commit is contained in:
ACGaming 2020-08-29 20:42:50 +02:00
parent 484236b477
commit 0ad2241949
47 changed files with 3927 additions and 3395 deletions

1
.gitignore vendored
View file

@ -21,3 +21,4 @@ build
eclipse eclipse
run run
build.bat build.bat
runClient.bat

View file

@ -11,10 +11,11 @@ import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
@Mod(modid = "spackenmobs", version = "RC1", acceptedMinecraftVersions = "[1.12.2]") @Mod(modid = "spackenmobs", version = "RC3", acceptedMinecraftVersions = "[1.12.2]")
public class Spackenmobs { public class Spackenmobs
{
public static final String MODID = "spackenmobs"; public static final String MODID = "spackenmobs";
public static final String VERSION = "RC1"; public static final String VERSION = "RC3";
public static final CreativeTabs SPACKENMOBS_TAB = new SpackenmobsTab(); public static final CreativeTabs SPACKENMOBS_TAB = new SpackenmobsTab();
@ -23,22 +24,26 @@ public class Spackenmobs {
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
@EventHandler @EventHandler
public void preInitClient(FMLPreInitializationEvent event) { public void preInitClient(FMLPreInitializationEvent event)
{
ModEntities.initModels(); ModEntities.initModels();
} }
@EventHandler @EventHandler
public void preInit(FMLPreInitializationEvent event) { public void preInit(FMLPreInitializationEvent event)
{
} }
@EventHandler @EventHandler
public void init(FMLInitializationEvent event) { public void init(FMLInitializationEvent event)
{
} }
@EventHandler @EventHandler
public void postInit(FMLPostInitializationEvent event) { public void postInit(FMLPostInitializationEvent event)
{
} }
} }

View file

@ -6,14 +6,17 @@ import net.minecraft.item.ItemStack;
import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
public class SpackenmobsTab extends CreativeTabs { public class SpackenmobsTab extends CreativeTabs
public SpackenmobsTab() { {
public SpackenmobsTab()
{
super(Spackenmobs.MODID); super(Spackenmobs.MODID);
} }
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
@Override @Override
public ItemStack getTabIconItem() { public ItemStack getTabIconItem()
{
return new ItemStack(ModItems.RAM); return new ItemStack(ModItems.RAM);
} }
} }

View file

@ -5,7 +5,8 @@ import net.minecraft.entity.ai.EntityAIBase;
import net.minecraft.init.Blocks; import net.minecraft.init.Blocks;
// Thanks to Akrivus! // Thanks to Akrivus!
public class EntityAIDance extends EntityAIBase { public class EntityAIDance extends EntityAIBase
{
private final EntityJens jens; private final EntityJens jens;
private final int searchRadius; private final int searchRadius;
@ -14,27 +15,34 @@ public class EntityAIDance extends EntityAIBase {
private int danceStage = 0; private int danceStage = 0;
public EntityAIDance(EntityJens jens, int searchRadius) { public EntityAIDance(EntityJens jens, int searchRadius)
{
this.jens = jens; this.jens = jens;
this.searchRadius = searchRadius; this.searchRadius = searchRadius;
} }
@Override @Override
public void resetTask() { public void resetTask()
{
this.lastDanceMoveTime = 0; this.lastDanceMoveTime = 0;
this.danceStage = 0; this.danceStage = 0;
} }
@Override @Override
public boolean shouldContinueExecuting() { public boolean shouldContinueExecuting()
{
return shouldExecute(); return shouldExecute();
} }
@Override @Override
public boolean shouldExecute() { public boolean shouldExecute()
for(int x = -this.searchRadius; x <= this.searchRadius; x++) { {
for(int y = -2; y <= 2; y++) { for (int x = -this.searchRadius; x <= this.searchRadius; x++)
for(int z = -this.searchRadius; z <= this.searchRadius; z++) { {
for (int y = -2; y <= 2; y++)
{
for (int z = -this.searchRadius; z <= this.searchRadius; z++)
{
if (this.jens.world.getBlockState(this.jens.getPosition().add(x, y, z)).getBlock() == Blocks.JUKEBOX if (this.jens.world.getBlockState(this.jens.getPosition().add(x, y, z)).getBlock() == Blocks.JUKEBOX
&& this.jens.world.getBlockState(this.jens.getPosition().add(x, y, z)).getValue(BlockJukebox.HAS_RECORD)) && this.jens.world.getBlockState(this.jens.getPosition().add(x, y, z)).getValue(BlockJukebox.HAS_RECORD))
return true; return true;
@ -45,14 +53,18 @@ public class EntityAIDance extends EntityAIBase {
} }
@Override @Override
public void startExecuting() { public void startExecuting()
{
this.danceStage = 1; this.danceStage = 1;
} }
@Override @Override
public void updateTask() { public void updateTask()
if(this.lastDanceMoveTime <= 0) { {
switch(this.danceStage) { if (this.lastDanceMoveTime <= 0)
{
switch (this.danceStage)
{
case 1: case 1:
this.danceStage = this.jens.world.rand.nextBoolean() ? 1 : 2; this.danceStage = this.jens.world.rand.nextBoolean() ? 1 : 2;
this.jens.motionY = 0.42D; this.jens.motionY = 0.42D;

View file

@ -8,25 +8,30 @@ import net.minecraft.world.World;
import java.util.List; import java.util.List;
public class EntityAIEatDroppedFish extends EntityAIBase { public class EntityAIEatDroppedFish extends EntityAIBase
double searchDistance = 10.0D; {
private final EntityJens jens; private final EntityJens jens;
private final World world; private final World world;
double searchDistance = 10.0D;
public EntityAIEatDroppedFish(EntityJens jens) { public EntityAIEatDroppedFish(EntityJens jens)
{
this.jens = jens; this.jens = jens;
this.world = jens.world; this.world = jens.world;
} }
public EntityItem getNearbyFood() { public EntityItem getNearbyFood()
{
List<EntityItem> items = getItems(); List<EntityItem> items = getItems();
for(EntityItem item : items) { for (EntityItem item : items)
{
return item; return item;
} }
return null; return null;
} }
List<EntityItem> getItems() { List<EntityItem> getItems()
{
return this.world.getEntitiesWithinAABB(EntityItem.class, return this.world.getEntitiesWithinAABB(EntityItem.class,
new AxisAlignedBB(this.jens.posX - this.searchDistance, this.jens.posY - this.searchDistance, new AxisAlignedBB(this.jens.posX - this.searchDistance, this.jens.posY - this.searchDistance,
this.jens.posZ - this.searchDistance, this.jens.posX + this.searchDistance, this.jens.posZ - this.searchDistance, this.jens.posX + this.searchDistance,
@ -34,18 +39,23 @@ public class EntityAIEatDroppedFish extends EntityAIBase {
} }
@Override @Override
public boolean shouldExecute() { public boolean shouldExecute()
{
EntityItem getNearbyFood = getNearbyFood(); EntityItem getNearbyFood = getNearbyFood();
if (getNearbyFood != null && !this.jens.isChild() && !this.jens.digesting if (getNearbyFood != null && !this.jens.isChild() && !this.jens.digesting
&& this.jens.isFishItem(getNearbyFood.getItem())) { && this.jens.isFishItem(getNearbyFood.getItem()))
{
execute(this.jens, getNearbyFood); execute(this.jens, getNearbyFood);
} }
return false; return false;
} }
public boolean execute(EntityJens jens, EntityItem item) { public boolean execute(EntityJens jens, EntityItem item)
if(jens.getNavigator().tryMoveToXYZ(item.posX, item.posY, item.posZ, 1.25D)) { {
if(jens.getDistance(item) < 1.0F) { if (jens.getNavigator().tryMoveToXYZ(item.posX, item.posY, item.posZ, 1.25D))
{
if (jens.getDistance(item) < 1.0F)
{
eatItem(item); eatItem(item);
jens.digestFish(); jens.digestFish();
} }
@ -53,10 +63,12 @@ public class EntityAIEatDroppedFish extends EntityAIBase {
return true; return true;
} }
public void eatItem(EntityItem item) { public void eatItem(EntityItem item)
{
ItemStack stack = item.getItem(); ItemStack stack = item.getItem();
stack.setCount(stack.getCount() - 1); stack.setCount(stack.getCount() - 1);
if(stack.getCount() == 0) { if (stack.getCount() == 0)
{
item.setDead(); item.setDead();
} }
} }

View file

@ -6,23 +6,28 @@ import net.minecraft.util.DamageSource;
import net.minecraft.util.SoundEvent; import net.minecraft.util.SoundEvent;
import net.minecraft.world.World; import net.minecraft.world.World;
public class EntityApoRed extends EntitySkeleton { public class EntityApoRed extends EntitySkeleton
public EntityApoRed(World worldIn) { {
public EntityApoRed(World worldIn)
{
super(worldIn); super(worldIn);
} }
@Override @Override
protected SoundEvent getAmbientSound() { protected SoundEvent getAmbientSound()
{
return ModSoundEvents.ENTITY_APORED_AMBIENT; return ModSoundEvents.ENTITY_APORED_AMBIENT;
} }
@Override @Override
protected SoundEvent getHurtSound(DamageSource damageSourceIn) { protected SoundEvent getHurtSound(DamageSource damageSourceIn)
{
return ModSoundEvents.ENTITY_APORED_HURT; return ModSoundEvents.ENTITY_APORED_HURT;
} }
@Override @Override
protected SoundEvent getDeathSound() { protected SoundEvent getDeathSound()
{
return ModSoundEvents.ENTITY_APORED_DEATH; return ModSoundEvents.ENTITY_APORED_DEATH;
} }
} }

View file

@ -31,7 +31,8 @@ import net.minecraftforge.fml.relauncher.SideOnly;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import java.util.Collection; import java.util.Collection;
public class EntityBakaMitaiCreeper extends EntityCreeper { public class EntityBakaMitaiCreeper extends EntityCreeper
{
private static final DataParameter<Integer> STATE = EntityDataManager.createKey(EntityBakaMitaiCreeper.class, DataSerializers.VARINT); private static final DataParameter<Integer> STATE = EntityDataManager.createKey(EntityBakaMitaiCreeper.class, DataSerializers.VARINT);
private static final DataParameter<Boolean> POWERED = EntityDataManager.createKey(EntityBakaMitaiCreeper.class, DataSerializers.BOOLEAN); private static final DataParameter<Boolean> POWERED = EntityDataManager.createKey(EntityBakaMitaiCreeper.class, DataSerializers.BOOLEAN);
private static final DataParameter<Boolean> IGNITED = EntityDataManager.createKey(EntityBakaMitaiCreeper.class, DataSerializers.BOOLEAN); private static final DataParameter<Boolean> IGNITED = EntityDataManager.createKey(EntityBakaMitaiCreeper.class, DataSerializers.BOOLEAN);
@ -41,41 +42,48 @@ public class EntityBakaMitaiCreeper extends EntityCreeper {
private int explosionRadius = 12; private int explosionRadius = 12;
private int droppedSkulls; private int droppedSkulls;
public EntityBakaMitaiCreeper(World worldIn) { public EntityBakaMitaiCreeper(World worldIn)
{
super(worldIn); super(worldIn);
this.setSize(0.6F, 1.7F); this.setSize(0.6F, 1.7F);
} }
@Override @Override
public boolean ableToCauseSkullDrop() { public boolean ableToCauseSkullDrop()
{
return this.droppedSkulls < 1 && this.world.getGameRules().getBoolean("doMobLoot"); return this.droppedSkulls < 1 && this.world.getGameRules().getBoolean("doMobLoot");
} }
@Override @Override
protected void applyEntityAttributes() { protected void applyEntityAttributes()
{
super.applyEntityAttributes(); super.applyEntityAttributes();
this.getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).setBaseValue(0.25D); this.getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).setBaseValue(0.25D);
} }
@Override @Override
public boolean attackEntityAsMob(Entity entityIn) { public boolean attackEntityAsMob(Entity entityIn)
{
return true; return true;
} }
@Override @Override
protected void entityInit() { protected void entityInit()
{
super.entityInit(); super.entityInit();
this.dataManager.register(STATE, -1); this.dataManager.register(STATE, -1);
this.dataManager.register(POWERED, false); this.dataManager.register(POWERED, false);
this.dataManager.register(IGNITED, false); this.dataManager.register(IGNITED, false);
} }
private void explode() { private void explode()
if(!this.world.isRemote) { {
if (!this.world.isRemote)
{
boolean flag = net.minecraftforge.event.ForgeEventFactory.getMobGriefingEvent(this.world, this); boolean flag = net.minecraftforge.event.ForgeEventFactory.getMobGriefingEvent(this.world, this);
float f = this.getPowered() ? 2.0F : 1.0F; float f = this.getPowered() ? 2.0F : 1.0F;
this.dead = true; this.dead = true;
this.world.playSound(null, getPosition(), ModSoundEvents.ENTITY_SMAVACREEPER_BLOW /*TODO sound missing?*/, getSoundCategory(), 1.0F, 1.0F); this.world.playSound(null, getPosition(), ModSoundEvents.ENTITY_BAKAMITAICREEPER_BLOW, getSoundCategory(), 1.0F, 1.0F);
this.world.createExplosion(this, this.posX, this.posY, this.posZ, this.explosionRadius * f, flag); this.world.createExplosion(this, this.posX, this.posY, this.posZ, this.explosionRadius * f, flag);
this.setDead(); this.setDead();
this.spawnLingeringCloud(); this.spawnLingeringCloud();
@ -83,74 +91,88 @@ public class EntityBakaMitaiCreeper extends EntityCreeper {
} }
@Override @Override
public void fall(float distance, float damageMultiplier) { public void fall(float distance, float damageMultiplier)
{
super.fall(distance, damageMultiplier); super.fall(distance, damageMultiplier);
this.timeSinceIgnited = (int) (this.timeSinceIgnited + distance * 1.5F); this.timeSinceIgnited = (int) (this.timeSinceIgnited + distance * 1.5F);
if(this.timeSinceIgnited > this.fuseTime - 5) { if (this.timeSinceIgnited > this.fuseTime - 5)
{
this.timeSinceIgnited = this.fuseTime - 5; this.timeSinceIgnited = this.fuseTime - 5;
} }
} }
@Override @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public float getCreeperFlashIntensity(float p_70831_1_) { public float getCreeperFlashIntensity(float p_70831_1_)
{
return (this.lastActiveTime + (this.timeSinceIgnited - this.lastActiveTime) * p_70831_1_) / (this.fuseTime - 2); return (this.lastActiveTime + (this.timeSinceIgnited - this.lastActiveTime) * p_70831_1_) / (this.fuseTime - 2);
} }
@Override @Override
public int getCreeperState() { public int getCreeperState()
{
return this.dataManager.get(STATE); return this.dataManager.get(STATE);
} }
@Override @Override
public void setCreeperState(int state) { public void setCreeperState(int state)
{
this.dataManager.set(STATE, state); this.dataManager.set(STATE, state);
} }
@Override @Override
protected SoundEvent getDeathSound() { protected SoundEvent getDeathSound()
{
return SoundEvents.ENTITY_CREEPER_DEATH; return SoundEvents.ENTITY_CREEPER_DEATH;
} }
@Override @Override
protected SoundEvent getHurtSound(DamageSource damageSourceIn) { protected SoundEvent getHurtSound(DamageSource damageSourceIn)
{
return SoundEvents.ENTITY_CREEPER_HURT; return SoundEvents.ENTITY_CREEPER_HURT;
} }
@Override @Override
@Nullable @Nullable
protected ResourceLocation getLootTable() { protected ResourceLocation getLootTable()
{
return LootTableList.ENTITIES_CREEPER; return LootTableList.ENTITIES_CREEPER;
} }
@Override @Override
public int getMaxFallHeight() { public int getMaxFallHeight()
{
return this.getAttackTarget() == null ? 3 : 3 + (int) (this.getHealth() - 1.0F); return this.getAttackTarget() == null ? 3 : 3 + (int) (this.getHealth() - 1.0F);
} }
@Override @Override
public boolean getPowered() { public boolean getPowered()
{
return this.dataManager.get(POWERED); return this.dataManager.get(POWERED);
} }
@Override @Override
public boolean hasIgnited() { public boolean hasIgnited()
{
return this.dataManager.get(IGNITED); return this.dataManager.get(IGNITED);
} }
@Override @Override
public void ignite() { public void ignite()
{
this.dataManager.set(IGNITED, true); this.dataManager.set(IGNITED, true);
} }
@Override @Override
public void incrementDroppedSkulls() { public void incrementDroppedSkulls()
{
++this.droppedSkulls; ++this.droppedSkulls;
} }
@Override @Override
protected void initEntityAI() { protected void initEntityAI()
{
this.tasks.addTask(1, new EntityAISwimming(this)); this.tasks.addTask(1, new EntityAISwimming(this));
this.tasks.addTask(2, new EntityAICreeperSwell(this)); this.tasks.addTask(2, new EntityAICreeperSwell(this));
this.tasks.addTask(3, new EntityAIAvoidEntity<>(this, EntityOcelot.class, 6.0F, 1.0D, 1.2D)); this.tasks.addTask(3, new EntityAIAvoidEntity<>(this, EntityOcelot.class, 6.0F, 1.0D, 1.2D));
@ -163,17 +185,21 @@ public class EntityBakaMitaiCreeper extends EntityCreeper {
} }
@Override @Override
public void onDeath(DamageSource cause) { public void onDeath(DamageSource cause)
{
super.onDeath(cause); super.onDeath(cause);
if(this.world.getGameRules().getBoolean("doMobLoot")) { if (this.world.getGameRules().getBoolean("doMobLoot"))
if(cause.getTrueSource() instanceof EntitySkeleton) { {
if (cause.getTrueSource() instanceof EntitySkeleton)
{
int i = Item.getIdFromItem(Items.RECORD_13); int i = Item.getIdFromItem(Items.RECORD_13);
int j = Item.getIdFromItem(Items.RECORD_WAIT); int j = Item.getIdFromItem(Items.RECORD_WAIT);
int k = i + this.rand.nextInt(j - i + 1); int k = i + this.rand.nextInt(j - i + 1);
this.dropItem(Item.getItemById(k), 1); this.dropItem(Item.getItemById(k), 1);
} else if (cause.getTrueSource() instanceof EntityBakaMitaiCreeper && cause.getTrueSource() != this && ((EntityBakaMitaiCreeper) cause.getTrueSource()).getPowered() } else if (cause.getTrueSource() instanceof EntityBakaMitaiCreeper && cause.getTrueSource() != this && ((EntityBakaMitaiCreeper) cause.getTrueSource()).getPowered()
&& ((EntityBakaMitaiCreeper)cause.getTrueSource()).ableToCauseSkullDrop()) { && ((EntityBakaMitaiCreeper) cause.getTrueSource()).ableToCauseSkullDrop())
{
((EntityBakaMitaiCreeper) cause.getTrueSource()).incrementDroppedSkulls(); ((EntityBakaMitaiCreeper) cause.getTrueSource()).incrementDroppedSkulls();
this.entityDropItem(new ItemStack(Items.SKULL, 1, 4), 0.0F); this.entityDropItem(new ItemStack(Items.SKULL, 1, 4), 0.0F);
} }
@ -181,33 +207,40 @@ public class EntityBakaMitaiCreeper extends EntityCreeper {
} }
@Override @Override
public void onStruckByLightning(EntityLightningBolt lightningBolt) { public void onStruckByLightning(EntityLightningBolt lightningBolt)
{
super.onStruckByLightning(lightningBolt); super.onStruckByLightning(lightningBolt);
this.dataManager.set(POWERED, true); this.dataManager.set(POWERED, true);
} }
@Override @Override
public void onUpdate() { public void onUpdate()
if(this.isEntityAlive()) { {
if (this.isEntityAlive())
{
this.lastActiveTime = this.timeSinceIgnited; this.lastActiveTime = this.timeSinceIgnited;
if(this.hasIgnited()) { if (this.hasIgnited())
{
this.setCreeperState(1); this.setCreeperState(1);
} }
int i = this.getCreeperState(); int i = this.getCreeperState();
if(i > 0 && this.timeSinceIgnited == 0) { if (i > 0 && this.timeSinceIgnited == 0)
this.playSound(ModSoundEvents.ENTITY_SMAVACREEPER_FUSE /*TODO sound missing?*/, 1.0F, 1.0F); {
this.playSound(ModSoundEvents.ENTITY_BAKAMITAICREEPER_FUSE, 1.0F, 1.0F);
} }
this.timeSinceIgnited += i; this.timeSinceIgnited += i;
if(this.timeSinceIgnited < 0) { if (this.timeSinceIgnited < 0)
{
this.timeSinceIgnited = 0; this.timeSinceIgnited = 0;
} }
if(this.timeSinceIgnited >= this.fuseTime) { if (this.timeSinceIgnited >= this.fuseTime)
{
this.timeSinceIgnited = this.fuseTime; this.timeSinceIgnited = this.fuseTime;
this.explode(); this.explode();
} }
@ -217,14 +250,17 @@ public class EntityBakaMitaiCreeper extends EntityCreeper {
} }
@Override @Override
protected boolean processInteract(EntityPlayer player, EnumHand hand) { protected boolean processInteract(EntityPlayer player, EnumHand hand)
{
ItemStack itemstack = player.getHeldItem(hand); ItemStack itemstack = player.getHeldItem(hand);
if(itemstack.getItem() == Items.FLINT_AND_STEEL) { if (itemstack.getItem() == Items.FLINT_AND_STEEL)
{
this.world.playSound(player, this.posX, this.posY, this.posZ, SoundEvents.ITEM_FLINTANDSTEEL_USE, this.getSoundCategory(), 1.0F, this.rand.nextFloat() * 0.4F + 0.8F); this.world.playSound(player, this.posX, this.posY, this.posZ, SoundEvents.ITEM_FLINTANDSTEEL_USE, this.getSoundCategory(), 1.0F, this.rand.nextFloat() * 0.4F + 0.8F);
player.swingArm(hand); player.swingArm(hand);
if(!this.world.isRemote) { if (!this.world.isRemote)
{
this.ignite(); this.ignite();
itemstack.damageItem(1, player); itemstack.damageItem(1, player);
return true; return true;
@ -235,27 +271,33 @@ public class EntityBakaMitaiCreeper extends EntityCreeper {
} }
@Override @Override
public void readEntityFromNBT(NBTTagCompound compound) { public void readEntityFromNBT(NBTTagCompound compound)
{
super.readEntityFromNBT(compound); super.readEntityFromNBT(compound);
this.dataManager.set(POWERED, compound.getBoolean("powered")); this.dataManager.set(POWERED, compound.getBoolean("powered"));
if(compound.hasKey("Fuse", 99)) { if (compound.hasKey("Fuse", 99))
{
this.fuseTime = compound.getShort("Fuse"); this.fuseTime = compound.getShort("Fuse");
} }
if(compound.hasKey("ExplosionRadius", 99)) { if (compound.hasKey("ExplosionRadius", 99))
{
this.explosionRadius = compound.getByte("ExplosionRadius"); this.explosionRadius = compound.getByte("ExplosionRadius");
} }
if(compound.getBoolean("ignited")) { if (compound.getBoolean("ignited"))
{
this.ignite(); this.ignite();
} }
} }
private void spawnLingeringCloud() { private void spawnLingeringCloud()
{
Collection<PotionEffect> collection = this.getActivePotionEffects(); Collection<PotionEffect> collection = this.getActivePotionEffects();
if(!collection.isEmpty()) { if (!collection.isEmpty())
{
EntityAreaEffectCloud entityareaeffectcloud = new EntityAreaEffectCloud(this.world, this.posX, this.posY, this.posZ); EntityAreaEffectCloud entityareaeffectcloud = new EntityAreaEffectCloud(this.world, this.posX, this.posY, this.posZ);
entityareaeffectcloud.setRadius(2.5F); entityareaeffectcloud.setRadius(2.5F);
entityareaeffectcloud.setRadiusOnUse(-0.5F); entityareaeffectcloud.setRadiusOnUse(-0.5F);
@ -263,7 +305,8 @@ public class EntityBakaMitaiCreeper extends EntityCreeper {
entityareaeffectcloud.setDuration(entityareaeffectcloud.getDuration() / 2); entityareaeffectcloud.setDuration(entityareaeffectcloud.getDuration() / 2);
entityareaeffectcloud.setRadiusPerTick(-entityareaeffectcloud.getRadius() / entityareaeffectcloud.getDuration()); entityareaeffectcloud.setRadiusPerTick(-entityareaeffectcloud.getRadius() / entityareaeffectcloud.getDuration());
for(PotionEffect potioneffect : collection) { for (PotionEffect potioneffect : collection)
{
entityareaeffectcloud.addEffect(new PotionEffect(potioneffect)); entityareaeffectcloud.addEffect(new PotionEffect(potioneffect));
} }
@ -272,10 +315,12 @@ public class EntityBakaMitaiCreeper extends EntityCreeper {
} }
@Override @Override
public void writeEntityToNBT(NBTTagCompound compound) { public void writeEntityToNBT(NBTTagCompound compound)
{
super.writeEntityToNBT(compound); super.writeEntityToNBT(compound);
if(this.dataManager.get(POWERED)) { if (this.dataManager.get(POWERED))
{
compound.setBoolean("powered", true); compound.setBoolean("powered", true);
} }

View file

@ -27,7 +27,8 @@ import net.minecraft.world.storage.loot.LootTableList;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import java.util.UUID; import java.util.UUID;
public class EntityDrachenlord extends EntityZombie { public class EntityDrachenlord extends EntityZombie
{
private static final UUID ATTACK_SPEED_BOOST_MODIFIER_UUID = UUID private static final UUID ATTACK_SPEED_BOOST_MODIFIER_UUID = UUID
.fromString("49455A49-7EC5-45BA-B886-3B90B23A1718"); .fromString("49455A49-7EC5-45BA-B886-3B90B23A1718");
private static final AttributeModifier ATTACK_SPEED_BOOST_MODIFIER = (new AttributeModifier( private static final AttributeModifier ATTACK_SPEED_BOOST_MODIFIER = (new AttributeModifier(
@ -36,28 +37,33 @@ public class EntityDrachenlord extends EntityZombie {
private int randomSoundDelay; private int randomSoundDelay;
private UUID angerTargetUUID; private UUID angerTargetUUID;
public EntityDrachenlord(World worldIn) { public EntityDrachenlord(World worldIn)
{
super(worldIn); super(worldIn);
this.isImmuneToFire = true; this.isImmuneToFire = true;
} }
@Override @Override
public void setRevengeTarget(@Nullable EntityLivingBase livingBase) { public void setRevengeTarget(@Nullable EntityLivingBase livingBase)
{
super.setRevengeTarget(livingBase); super.setRevengeTarget(livingBase);
if(livingBase != null) { if (livingBase != null)
{
this.angerTargetUUID = livingBase.getUniqueID(); this.angerTargetUUID = livingBase.getUniqueID();
} }
} }
@Override @Override
protected void applyEntityAI() { protected void applyEntityAI()
{
this.targetTasks.addTask(1, new EntityDrachenlord.AIHurtByAggressor(this)); this.targetTasks.addTask(1, new EntityDrachenlord.AIHurtByAggressor(this));
this.targetTasks.addTask(2, new EntityDrachenlord.AITargetAggressor(this)); this.targetTasks.addTask(2, new EntityDrachenlord.AITargetAggressor(this));
} }
@Override @Override
protected void applyEntityAttributes() { protected void applyEntityAttributes()
{
super.applyEntityAttributes(); super.applyEntityAttributes();
this.getEntityAttribute(SPAWN_REINFORCEMENTS_CHANCE).setBaseValue(0.0D); this.getEntityAttribute(SPAWN_REINFORCEMENTS_CHANCE).setBaseValue(0.0D);
this.getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).setBaseValue(0.23000000417232513D); this.getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).setBaseValue(0.23000000417232513D);
@ -65,24 +71,30 @@ public class EntityDrachenlord extends EntityZombie {
} }
@Override @Override
protected void updateAITasks() { protected void updateAITasks()
{
IAttributeInstance iattributeinstance = this.getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED); IAttributeInstance iattributeinstance = this.getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED);
if(this.isAngry()) { if (this.isAngry())
if(!this.isChild() && !iattributeinstance.hasModifier(ATTACK_SPEED_BOOST_MODIFIER)) { {
if (!this.isChild() && !iattributeinstance.hasModifier(ATTACK_SPEED_BOOST_MODIFIER))
{
iattributeinstance.applyModifier(ATTACK_SPEED_BOOST_MODIFIER); iattributeinstance.applyModifier(ATTACK_SPEED_BOOST_MODIFIER);
} }
--this.angerLevel; --this.angerLevel;
}else if(iattributeinstance.hasModifier(ATTACK_SPEED_BOOST_MODIFIER)) { } else if (iattributeinstance.hasModifier(ATTACK_SPEED_BOOST_MODIFIER))
{
iattributeinstance.removeModifier(ATTACK_SPEED_BOOST_MODIFIER); iattributeinstance.removeModifier(ATTACK_SPEED_BOOST_MODIFIER);
} }
if(this.randomSoundDelay > 0 && --this.randomSoundDelay == 0) { if (this.randomSoundDelay > 0 && --this.randomSoundDelay == 0)
{
this.playSound(ModSoundEvents.ENTITY_DRACHENLORD_ANGRY, this.getSoundVolume() * 2.0F, 1.0F); this.playSound(ModSoundEvents.ENTITY_DRACHENLORD_ANGRY, this.getSoundVolume() * 2.0F, 1.0F);
} }
if(this.angerLevel > 0 && this.angerTargetUUID != null && this.getRevengeTarget() == null) { if (this.angerLevel > 0 && this.angerTargetUUID != null && this.getRevengeTarget() == null)
{
EntityPlayer entityplayer = this.world.getPlayerEntityByUUID(this.angerTargetUUID); EntityPlayer entityplayer = this.world.getPlayerEntityByUUID(this.angerTargetUUID);
this.setRevengeTarget(entityplayer); this.setRevengeTarget(entityplayer);
this.attackingPlayer = entityplayer; this.attackingPlayer = entityplayer;
@ -93,41 +105,49 @@ public class EntityDrachenlord extends EntityZombie {
} }
@Override @Override
public boolean getCanSpawnHere() { public boolean getCanSpawnHere()
{
return this.world.getDifficulty() != EnumDifficulty.PEACEFUL; return this.world.getDifficulty() != EnumDifficulty.PEACEFUL;
} }
@Override @Override
public boolean isNotColliding() { public boolean isNotColliding()
{
return this.world.checkNoEntityCollision(this.getEntityBoundingBox(), this) return this.world.checkNoEntityCollision(this.getEntityBoundingBox(), this)
&& this.world.getCollisionBoxes(this, this.getEntityBoundingBox()).isEmpty() && this.world.getCollisionBoxes(this, this.getEntityBoundingBox()).isEmpty()
&& !this.world.containsAnyLiquid(this.getEntityBoundingBox()); && !this.world.containsAnyLiquid(this.getEntityBoundingBox());
} }
@Override @Override
public void writeEntityToNBT(NBTTagCompound compound) { public void writeEntityToNBT(NBTTagCompound compound)
{
super.writeEntityToNBT(compound); super.writeEntityToNBT(compound);
compound.setShort("Anger", (short) this.angerLevel); compound.setShort("Anger", (short) this.angerLevel);
if(this.angerTargetUUID != null) { if (this.angerTargetUUID != null)
{
compound.setString("HurtBy", this.angerTargetUUID.toString()); compound.setString("HurtBy", this.angerTargetUUID.toString());
}else { } else
{
compound.setString("HurtBy", ""); compound.setString("HurtBy", "");
} }
} }
@Override @Override
public void readEntityFromNBT(NBTTagCompound compound) { public void readEntityFromNBT(NBTTagCompound compound)
{
super.readEntityFromNBT(compound); super.readEntityFromNBT(compound);
this.angerLevel = compound.getShort("Anger"); this.angerLevel = compound.getShort("Anger");
String s = compound.getString("HurtBy"); String s = compound.getString("HurtBy");
if(!s.isEmpty()) { if (!s.isEmpty())
{
this.angerTargetUUID = UUID.fromString(s); this.angerTargetUUID = UUID.fromString(s);
EntityPlayer entityplayer = this.world.getPlayerEntityByUUID(this.angerTargetUUID); EntityPlayer entityplayer = this.world.getPlayerEntityByUUID(this.angerTargetUUID);
this.setRevengeTarget(entityplayer); this.setRevengeTarget(entityplayer);
if(entityplayer != null) { if (entityplayer != null)
{
this.attackingPlayer = entityplayer; this.attackingPlayer = entityplayer;
this.recentlyHit = this.getRevengeTimer(); this.recentlyHit = this.getRevengeTimer();
} }
@ -135,13 +155,17 @@ public class EntityDrachenlord extends EntityZombie {
} }
@Override @Override
public boolean attackEntityFrom(DamageSource source, float amount) { public boolean attackEntityFrom(DamageSource source, float amount)
if(this.isEntityInvulnerable(source)) { {
if (this.isEntityInvulnerable(source))
{
return false; return false;
}else { } else
{
Entity entity = source.getTrueSource(); Entity entity = source.getTrueSource();
if(entity instanceof EntityPlayer) { if (entity instanceof EntityPlayer)
{
this.becomeAngryAt(entity); this.becomeAngryAt(entity);
} }
@ -149,82 +173,100 @@ public class EntityDrachenlord extends EntityZombie {
} }
} }
private void becomeAngryAt(Entity p_70835_1_) { private void becomeAngryAt(Entity p_70835_1_)
{
this.angerLevel = 400 + this.rand.nextInt(400); this.angerLevel = 400 + this.rand.nextInt(400);
this.randomSoundDelay = this.rand.nextInt(40); this.randomSoundDelay = this.rand.nextInt(40);
if(p_70835_1_ instanceof EntityLivingBase) { if (p_70835_1_ instanceof EntityLivingBase)
{
this.setRevengeTarget((EntityLivingBase) p_70835_1_); this.setRevengeTarget((EntityLivingBase) p_70835_1_);
} }
} }
public boolean isAngry() { public boolean isAngry()
{
return this.angerLevel > 0; return this.angerLevel > 0;
} }
@Override @Override
protected SoundEvent getAmbientSound() { protected SoundEvent getAmbientSound()
{
return ModSoundEvents.ENTITY_DRACHENLORD_AMBIENT; return ModSoundEvents.ENTITY_DRACHENLORD_AMBIENT;
} }
@Override @Override
protected SoundEvent getHurtSound(DamageSource damageSourceIn) { protected SoundEvent getHurtSound(DamageSource damageSourceIn)
{
return ModSoundEvents.ENTITY_DRACHENLORD_HURT; return ModSoundEvents.ENTITY_DRACHENLORD_HURT;
} }
@Override @Override
protected SoundEvent getDeathSound() { protected SoundEvent getDeathSound()
{
return ModSoundEvents.ENTITY_DRACHENLORD_DEATH; return ModSoundEvents.ENTITY_DRACHENLORD_DEATH;
} }
@Override @Override
@Nullable @Nullable
protected ResourceLocation getLootTable() { protected ResourceLocation getLootTable()
{
return LootTableList.ENTITIES_ZOMBIE_PIGMAN; return LootTableList.ENTITIES_ZOMBIE_PIGMAN;
} }
@Override @Override
public boolean processInteract(EntityPlayer player, EnumHand hand) { public boolean processInteract(EntityPlayer player, EnumHand hand)
{
return false; return false;
} }
@Override @Override
protected void setEquipmentBasedOnDifficulty(DifficultyInstance difficulty) { protected void setEquipmentBasedOnDifficulty(DifficultyInstance difficulty)
{
this.setItemStackToSlot(EntityEquipmentSlot.MAINHAND, new ItemStack(Items.GOLDEN_AXE)); this.setItemStackToSlot(EntityEquipmentSlot.MAINHAND, new ItemStack(Items.GOLDEN_AXE));
} }
@Override @Override
protected ItemStack getSkullDrop() { protected ItemStack getSkullDrop()
{
return ItemStack.EMPTY; return ItemStack.EMPTY;
} }
@Override @Override
public boolean isPreventingPlayerRest(EntityPlayer playerIn) { public boolean isPreventingPlayerRest(EntityPlayer playerIn)
{
return this.isAngry(); return this.isAngry();
} }
static class AIHurtByAggressor extends EntityAIHurtByTarget { static class AIHurtByAggressor extends EntityAIHurtByTarget
public AIHurtByAggressor(EntityDrachenlord p_i45828_1_) { {
public AIHurtByAggressor(EntityDrachenlord p_i45828_1_)
{
super(p_i45828_1_, true); super(p_i45828_1_, true);
} }
@Override @Override
protected void setEntityAttackTarget(EntityCreature creatureIn, EntityLivingBase entityLivingBaseIn) { protected void setEntityAttackTarget(EntityCreature creatureIn, EntityLivingBase entityLivingBaseIn)
{
super.setEntityAttackTarget(creatureIn, entityLivingBaseIn); super.setEntityAttackTarget(creatureIn, entityLivingBaseIn);
if(creatureIn instanceof EntityDrachenlord) { if (creatureIn instanceof EntityDrachenlord)
{
((EntityDrachenlord) creatureIn).becomeAngryAt(entityLivingBaseIn); ((EntityDrachenlord) creatureIn).becomeAngryAt(entityLivingBaseIn);
} }
} }
} }
static class AITargetAggressor extends EntityAINearestAttackableTarget<EntityPlayer> { static class AITargetAggressor extends EntityAINearestAttackableTarget<EntityPlayer>
public AITargetAggressor(EntityDrachenlord p_i45829_1_) { {
public AITargetAggressor(EntityDrachenlord p_i45829_1_)
{
super(p_i45829_1_, EntityPlayer.class, true); super(p_i45829_1_, EntityPlayer.class, true);
} }
@Override @Override
public boolean shouldExecute() { public boolean shouldExecute()
{
return ((EntityDrachenlord) this.taskOwner).isAngry() && super.shouldExecute(); return ((EntityDrachenlord) this.taskOwner).isAngry() && super.shouldExecute();
} }
} }

View file

@ -18,10 +18,12 @@ import net.minecraft.world.World;
import java.util.Set; import java.util.Set;
public class EntityHolzstammhuhn extends EntityChicken { public class EntityHolzstammhuhn extends EntityChicken
{
private static final Set<Item> TEMPTATION_ITEMS = Sets.newHashSet(Items.STICK); private static final Set<Item> TEMPTATION_ITEMS = Sets.newHashSet(Items.STICK);
public EntityHolzstammhuhn(World worldIn) { public EntityHolzstammhuhn(World worldIn)
{
super(worldIn); super(worldIn);
this.setSize(0.4F, 0.7F); this.setSize(0.4F, 0.7F);
this.timeUntilNextEgg = this.rand.nextInt(6000) + 6000; this.timeUntilNextEgg = this.rand.nextInt(6000) + 6000;
@ -29,7 +31,8 @@ public class EntityHolzstammhuhn extends EntityChicken {
} }
@Override @Override
protected void initEntityAI() { protected void initEntityAI()
{
this.tasks.addTask(0, new EntityAISwimming(this)); this.tasks.addTask(0, new EntityAISwimming(this));
this.tasks.addTask(1, new EntityAIPanic(this, 1.4D)); this.tasks.addTask(1, new EntityAIPanic(this, 1.4D));
this.tasks.addTask(2, new EntityAIMate(this, 1.0D)); this.tasks.addTask(2, new EntityAIMate(this, 1.0D));
@ -41,32 +44,38 @@ public class EntityHolzstammhuhn extends EntityChicken {
} }
@Override @Override
public boolean isBreedingItem(ItemStack stack) { public boolean isBreedingItem(ItemStack stack)
{
return TEMPTATION_ITEMS.contains(stack.getItem()); return TEMPTATION_ITEMS.contains(stack.getItem());
} }
@Override @Override
protected SoundEvent getAmbientSound() { protected SoundEvent getAmbientSound()
{
return SoundEvents.BLOCK_WOOD_PLACE; return SoundEvents.BLOCK_WOOD_PLACE;
} }
@Override @Override
protected SoundEvent getHurtSound(DamageSource damageSourceIn) { protected SoundEvent getHurtSound(DamageSource damageSourceIn)
{
return SoundEvents.BLOCK_WOOD_HIT; return SoundEvents.BLOCK_WOOD_HIT;
} }
@Override @Override
protected SoundEvent getDeathSound() { protected SoundEvent getDeathSound()
{
return SoundEvents.BLOCK_WOOD_BREAK; return SoundEvents.BLOCK_WOOD_BREAK;
} }
@Override @Override
protected void playStepSound(BlockPos pos, Block blockIn) { protected void playStepSound(BlockPos pos, Block blockIn)
{
this.playSound(SoundEvents.BLOCK_WOOD_STEP, 0.15F, 1.0F); this.playSound(SoundEvents.BLOCK_WOOD_STEP, 0.15F, 1.0F);
} }
@Override @Override
public EntityHolzstammhuhn createChild(EntityAgeable ageable) { public EntityHolzstammhuhn createChild(EntityAgeable ageable)
{
return new EntityHolzstammhuhn(this.world); return new EntityHolzstammhuhn(this.world);
} }
} }

View file

@ -6,39 +6,47 @@ import net.minecraft.util.DamageSource;
import net.minecraft.util.SoundEvent; import net.minecraft.util.SoundEvent;
import net.minecraft.world.World; import net.minecraft.world.World;
public class EntityIslamist extends EntityCreeper { public class EntityIslamist extends EntityCreeper
{
private int lastActiveTime; private int lastActiveTime;
private int timeSinceIgnited; private int timeSinceIgnited;
private int fuseTime = 30; private final int fuseTime = 30;
private int explosionRadius = 6; private final int explosionRadius = 6;
public EntityIslamist(World worldIn) { public EntityIslamist(World worldIn)
{
super(worldIn); super(worldIn);
this.setSize(0.6F, 1.7F); this.setSize(0.6F, 1.7F);
} }
@Override @Override
public void onUpdate() { public void onUpdate()
if(this.isEntityAlive()) { {
if (this.isEntityAlive())
{
this.lastActiveTime = this.timeSinceIgnited; this.lastActiveTime = this.timeSinceIgnited;
if(this.hasIgnited()) { if (this.hasIgnited())
{
this.setCreeperState(1); this.setCreeperState(1);
} }
int i = this.getCreeperState(); int i = this.getCreeperState();
if(i > 0 && this.timeSinceIgnited == 0) { if (i > 0 && this.timeSinceIgnited == 0)
{
this.playSound(ModSoundEvents.ENTITY_ISLAMIST_FUSE, 1.0F, 0.5F); this.playSound(ModSoundEvents.ENTITY_ISLAMIST_FUSE, 1.0F, 0.5F);
} }
this.timeSinceIgnited += i; this.timeSinceIgnited += i;
if(this.timeSinceIgnited < 0) { if (this.timeSinceIgnited < 0)
{
this.timeSinceIgnited = 0; this.timeSinceIgnited = 0;
} }
if(this.timeSinceIgnited >= this.fuseTime) { if (this.timeSinceIgnited >= this.fuseTime)
{
this.timeSinceIgnited = this.fuseTime; this.timeSinceIgnited = this.fuseTime;
this.explode(); this.explode();
} }
@ -47,8 +55,10 @@ public class EntityIslamist extends EntityCreeper {
super.onUpdate(); super.onUpdate();
} }
private void explode() { private void explode()
if(!this.world.isRemote) { {
if (!this.world.isRemote)
{
boolean flag = net.minecraftforge.event.ForgeEventFactory.getMobGriefingEvent(this.world, this); boolean flag = net.minecraftforge.event.ForgeEventFactory.getMobGriefingEvent(this.world, this);
float f = this.getPowered() ? 2.0F : 1.0F; float f = this.getPowered() ? 2.0F : 1.0F;
this.dead = true; this.dead = true;
@ -60,12 +70,14 @@ public class EntityIslamist extends EntityCreeper {
} }
@Override @Override
protected SoundEvent getHurtSound(DamageSource damageSourceIn) { protected SoundEvent getHurtSound(DamageSource damageSourceIn)
{
return ModSoundEvents.ENTITY_ISLAMIST_HURT; return ModSoundEvents.ENTITY_ISLAMIST_HURT;
} }
@Override @Override
protected SoundEvent getAmbientSound() { protected SoundEvent getAmbientSound()
{
return ModSoundEvents.ENTITY_ISLAMIST_AMBIENT; return ModSoundEvents.ENTITY_ISLAMIST_AMBIENT;
} }
} }

View file

@ -28,7 +28,8 @@ import net.minecraftforge.fml.relauncher.SideOnly;
import java.util.Set; import java.util.Set;
public class EntityJens extends EntityPig { public class EntityJens extends EntityPig
{
private static final DataParameter<Boolean> SADDLED = EntityDataManager.createKey(EntityJens.class, DataSerializers.BOOLEAN); private static final DataParameter<Boolean> SADDLED = EntityDataManager.createKey(EntityJens.class, DataSerializers.BOOLEAN);
private static final DataParameter<Boolean> DIGESTING = EntityDataManager.createKey(EntityJens.class, DataSerializers.BOOLEAN); private static final DataParameter<Boolean> DIGESTING = EntityDataManager.createKey(EntityJens.class, DataSerializers.BOOLEAN);
@ -42,36 +43,43 @@ public class EntityJens extends EntityPig {
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
Minecraft MINECRAFT = Minecraft.getMinecraft(); Minecraft MINECRAFT = Minecraft.getMinecraft();
public EntityJens(World worldIn) { public EntityJens(World worldIn)
{
super(worldIn); super(worldIn);
setSize(0.6F, 2.2F); setSize(0.6F, 2.2F);
} }
@Override @Override
protected void applyEntityAttributes() { protected void applyEntityAttributes()
{
super.applyEntityAttributes(); super.applyEntityAttributes();
this.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).setBaseValue(20.0D); this.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).setBaseValue(20.0D);
this.getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).setBaseValue(0.25D); this.getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).setBaseValue(0.25D);
} }
@Override @Override
public boolean canBeSteered() { public boolean canBeSteered()
{
Entity entity = this.getControllingPassenger(); Entity entity = this.getControllingPassenger();
if(!(entity instanceof EntityPlayer)) { if (!(entity instanceof EntityPlayer))
{
return false; return false;
}else { } else
{
EntityPlayer entityplayer = (EntityPlayer) entity; EntityPlayer entityplayer = (EntityPlayer) entity;
return entityplayer.getHeldItemMainhand().getItem() == ModItems.RAM_ON_A_STICK || entityplayer.getHeldItemOffhand().getItem() == ModItems.RAM_ON_A_STICK; return entityplayer.getHeldItemMainhand().getItem() == ModItems.RAM_ON_A_STICK || entityplayer.getHeldItemOffhand().getItem() == ModItems.RAM_ON_A_STICK;
} }
} }
@Override @Override
public EntityJens createChild(EntityAgeable ageable) { public EntityJens createChild(EntityAgeable ageable)
{
return new EntityJens(this.world); return new EntityJens(this.world);
} }
public void digestFish() { public void digestFish()
{
this.playSound(ModSoundEvents.ENTITY_JENS_EAT, 1.0F, 1.0F); this.playSound(ModSoundEvents.ENTITY_JENS_EAT, 1.0F, 1.0F);
this.digesting = true; this.digesting = true;
@ -80,7 +88,8 @@ public class EntityJens extends EntityPig {
this.digestTime = (ModConfigs.Jens_digest_time * 20); this.digestTime = (ModConfigs.Jens_digest_time * 20);
this.dataManager.set(DIGEST_TIME, this.digestTime); this.dataManager.set(DIGEST_TIME, this.digestTime);
for(int i = 0; i < 7; ++i) { for (int i = 0; i < 7; ++i)
{
double d0 = this.rand.nextGaussian() * 0.02D; double d0 = this.rand.nextGaussian() * 0.02D;
double d1 = this.rand.nextGaussian() * 0.02D; double d1 = this.rand.nextGaussian() * 0.02D;
double d2 = this.rand.nextGaussian() * 0.02D; double d2 = this.rand.nextGaussian() * 0.02D;
@ -92,7 +101,8 @@ public class EntityJens extends EntityPig {
} }
@Override @Override
protected void entityInit() { protected void entityInit()
{
super.entityInit(); super.entityInit();
this.dataManager.register(SADDLED, false); this.dataManager.register(SADDLED, false);
this.dataManager.register(DIGESTING, false); this.dataManager.register(DIGESTING, false);
@ -101,27 +111,32 @@ public class EntityJens extends EntityPig {
} }
@Override @Override
protected SoundEvent getAmbientSound() { protected SoundEvent getAmbientSound()
{
return ModSoundEvents.ENTITY_JENS_AMBIENT; return ModSoundEvents.ENTITY_JENS_AMBIENT;
} }
@Override @Override
protected SoundEvent getDeathSound() { protected SoundEvent getDeathSound()
{
return ModSoundEvents.ENTITY_JENS_DEATH; return ModSoundEvents.ENTITY_JENS_DEATH;
} }
@Override @Override
protected SoundEvent getHurtSound(DamageSource damageSourceIn) { protected SoundEvent getHurtSound(DamageSource damageSourceIn)
{
return ModSoundEvents.ENTITY_JENS_HURT; return ModSoundEvents.ENTITY_JENS_HURT;
} }
@Override @Override
protected ResourceLocation getLootTable() { protected ResourceLocation getLootTable()
{
return ModLootTableList.ENTITIES_JENS; return ModLootTableList.ENTITIES_JENS;
} }
@Override @Override
protected void initEntityAI() { protected void initEntityAI()
{
this.tasks.addTask(0, new EntityAISwimming(this)); this.tasks.addTask(0, new EntityAISwimming(this));
this.tasks.addTask(1, new EntityAIPanic(this, 1.25D)); this.tasks.addTask(1, new EntityAIPanic(this, 1.25D));
this.tasks.addTask(2, new EntityAIDance(this, ModConfigs.Jens_search_distance)); this.tasks.addTask(2, new EntityAIDance(this, ModConfigs.Jens_search_distance));
@ -136,25 +151,31 @@ public class EntityJens extends EntityPig {
} }
@Override @Override
public boolean isBreedingItem(ItemStack stack) { public boolean isBreedingItem(ItemStack stack)
{
return TEMPTATION_ITEMS.contains(stack.getItem()); return TEMPTATION_ITEMS.contains(stack.getItem());
} }
public boolean isFishItem(ItemStack stack) { public boolean isFishItem(ItemStack stack)
{
return FISH_ITEMS.contains(stack.getItem()); return FISH_ITEMS.contains(stack.getItem());
} }
@Override @Override
public void onLivingUpdate() { public void onLivingUpdate()
{
super.onLivingUpdate(); super.onLivingUpdate();
if(!this.world.isRemote && this.digesting && this.digestTime > 0) { if (!this.world.isRemote && this.digesting && this.digestTime > 0)
{
this.digestTime--; this.digestTime--;
this.dataManager.set(DIGEST_TIME, this.digestTime); this.dataManager.set(DIGEST_TIME, this.digestTime);
} }
if(!this.world.isRemote && this.digesting && this.digestTime <= 0) { if (!this.world.isRemote && this.digesting && this.digestTime <= 0)
for(int i = 0; i < 7; ++i) { {
for (int i = 0; i < 7; ++i)
{
double d0 = this.rand.nextGaussian() * 0.02D; double d0 = this.rand.nextGaussian() * 0.02D;
double d1 = this.rand.nextGaussian() * 0.02D; double d1 = this.rand.nextGaussian() * 0.02D;
double d2 = this.rand.nextGaussian() * 0.02D; double d2 = this.rand.nextGaussian() * 0.02D;
@ -174,36 +195,46 @@ public class EntityJens extends EntityPig {
} }
@Override @Override
public boolean processInteract(EntityPlayer player, EnumHand hand) { public boolean processInteract(EntityPlayer player, EnumHand hand)
if(!super.processInteract(player, hand)) { {
if (!super.processInteract(player, hand))
{
ItemStack itemstack = player.getHeldItem(hand); ItemStack itemstack = player.getHeldItem(hand);
if(itemstack.getItem() == Items.FISH && !this.isChild() && !this.digesting) { if (itemstack.getItem() == Items.FISH && !this.isChild() && !this.digesting)
{
itemstack.shrink(1); itemstack.shrink(1);
digestFish(); digestFish();
return true; return true;
}else if(itemstack.getItem() == Items.NAME_TAG) { } else if (itemstack.getItem() == Items.NAME_TAG)
{
itemstack.interactWithEntity(player, this, hand); itemstack.interactWithEntity(player, this, hand);
return true; return true;
}else if(this.getSaddled() && !this.isBeingRidden()) { } else if (this.getSaddled() && !this.isBeingRidden())
if(!this.world.isRemote) { {
if (!this.world.isRemote)
{
player.startRiding(this); player.startRiding(this);
} }
return true; return true;
}else if(itemstack.getItem() == Items.SADDLE) { } else if (itemstack.getItem() == Items.SADDLE)
{
itemstack.interactWithEntity(player, this, hand); itemstack.interactWithEntity(player, this, hand);
this.setCustomNameTag("Reitbarer Jens"); this.setCustomNameTag("Reitbarer Jens");
this.setAlwaysRenderNameTag(true); this.setAlwaysRenderNameTag(true);
return true; return true;
}else { } else
{
return false; return false;
} }
}else { } else
{
return true; return true;
} }
} }
@Override @Override
public void readEntityFromNBT(NBTTagCompound compound) { public void readEntityFromNBT(NBTTagCompound compound)
{
super.readEntityFromNBT(compound); super.readEntityFromNBT(compound);
this.setSaddled(compound.getBoolean("Saddle")); this.setSaddled(compound.getBoolean("Saddle"));
this.digesting = compound.getBoolean("Digesting"); this.digesting = compound.getBoolean("Digesting");
@ -211,7 +242,8 @@ public class EntityJens extends EntityPig {
} }
@Override @Override
public void writeEntityToNBT(NBTTagCompound compound) { public void writeEntityToNBT(NBTTagCompound compound)
{
super.writeEntityToNBT(compound); super.writeEntityToNBT(compound);
compound.setBoolean("Saddle", this.getSaddled()); compound.setBoolean("Saddle", this.getSaddled());
compound.setBoolean("Digesting", this.digesting); compound.setBoolean("Digesting", this.digesting);

View file

@ -6,24 +6,29 @@ import net.minecraft.util.DamageSource;
import net.minecraft.util.SoundEvent; import net.minecraft.util.SoundEvent;
import net.minecraft.world.World; import net.minecraft.world.World;
public class EntityMarcellDAvis extends EntityZombie { public class EntityMarcellDAvis extends EntityZombie
public EntityMarcellDAvis(World worldIn) { {
public EntityMarcellDAvis(World worldIn)
{
super(worldIn); super(worldIn);
this.setSize(0.6F, 1.95F); this.setSize(0.6F, 1.95F);
} }
@Override @Override
protected SoundEvent getAmbientSound() { protected SoundEvent getAmbientSound()
{
return ModSoundEvents.ENTITY_MARCELLDAVIS_AMBIENT; return ModSoundEvents.ENTITY_MARCELLDAVIS_AMBIENT;
} }
@Override @Override
protected SoundEvent getHurtSound(DamageSource damageSourceIn) { protected SoundEvent getHurtSound(DamageSource damageSourceIn)
{
return ModSoundEvents.ENTITY_MARCELLDAVIS_HURT; return ModSoundEvents.ENTITY_MARCELLDAVIS_HURT;
} }
@Override @Override
protected SoundEvent getDeathSound() { protected SoundEvent getDeathSound()
{
return ModSoundEvents.ENTITY_MARCELLDAVIS_DEATH; return ModSoundEvents.ENTITY_MARCELLDAVIS_DEATH;
} }
} }

View file

@ -6,24 +6,29 @@ import net.minecraft.util.DamageSource;
import net.minecraft.util.SoundEvent; import net.minecraft.util.SoundEvent;
import net.minecraft.world.World; import net.minecraft.world.World;
public class EntityMrBean extends EntityZombie { public class EntityMrBean extends EntityZombie
public EntityMrBean(World worldIn) { {
public EntityMrBean(World worldIn)
{
super(worldIn); super(worldIn);
this.setSize(0.6F, 1.95F); this.setSize(0.6F, 1.95F);
} }
@Override @Override
protected SoundEvent getAmbientSound() { protected SoundEvent getAmbientSound()
{
return ModSoundEvents.ENTITY_MRBEAN_AMBIENT; return ModSoundEvents.ENTITY_MRBEAN_AMBIENT;
} }
@Override @Override
protected SoundEvent getHurtSound(DamageSource damageSourceIn) { protected SoundEvent getHurtSound(DamageSource damageSourceIn)
{
return ModSoundEvents.ENTITY_MRBEAN_HURT; return ModSoundEvents.ENTITY_MRBEAN_HURT;
} }
@Override @Override
protected SoundEvent getDeathSound() { protected SoundEvent getDeathSound()
{
return ModSoundEvents.ENTITY_MRBEAN_DEATH; return ModSoundEvents.ENTITY_MRBEAN_DEATH;
} }
} }

View file

@ -36,7 +36,8 @@ import javax.annotation.Nullable;
import java.util.List; import java.util.List;
import java.util.UUID; import java.util.UUID;
public class EntitySchalker extends EntityGolem implements IMob { public class EntitySchalker extends EntityGolem implements IMob
{
public static final EnumDyeColor DEFAULT_COLOR = EnumDyeColor.PURPLE; public static final EnumDyeColor DEFAULT_COLOR = EnumDyeColor.PURPLE;
protected static final DataParameter<EnumFacing> ATTACHED_FACE = EntityDataManager protected static final DataParameter<EnumFacing> ATTACHED_FACE = EntityDataManager
.createKey(EntitySchalker.class, DataSerializers.FACING); .createKey(EntitySchalker.class, DataSerializers.FACING);
@ -54,7 +55,8 @@ public class EntitySchalker extends EntityGolem implements IMob {
private BlockPos currentAttachmentPosition; private BlockPos currentAttachmentPosition;
private int clientSideTeleportInterpolation; private int clientSideTeleportInterpolation;
public EntitySchalker(World worldIn) { public EntitySchalker(World worldIn)
{
super(worldIn); super(worldIn);
this.setSize(1.0F, 1.0F); this.setSize(1.0F, 1.0F);
this.prevRenderYawOffset = 180.0F; this.prevRenderYawOffset = 180.0F;
@ -66,7 +68,8 @@ public class EntitySchalker extends EntityGolem implements IMob {
@Override @Override
@Nullable @Nullable
public IEntityLivingData onInitialSpawn(DifficultyInstance difficulty, @Nullable IEntityLivingData livingdata) { public IEntityLivingData onInitialSpawn(DifficultyInstance difficulty, @Nullable IEntityLivingData livingdata)
{
this.renderYawOffset = 180.0F; this.renderYawOffset = 180.0F;
this.prevRenderYawOffset = 180.0F; this.prevRenderYawOffset = 180.0F;
this.rotationYaw = 180.0F; this.rotationYaw = 180.0F;
@ -77,7 +80,8 @@ public class EntitySchalker extends EntityGolem implements IMob {
} }
@Override @Override
protected void initEntityAI() { protected void initEntityAI()
{
this.tasks.addTask(1, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F)); this.tasks.addTask(1, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
this.tasks.addTask(4, new EntitySchalker.AIAttack()); this.tasks.addTask(4, new EntitySchalker.AIAttack());
this.tasks.addTask(7, new EntitySchalker.AIPeek()); this.tasks.addTask(7, new EntitySchalker.AIPeek());
@ -88,39 +92,47 @@ public class EntitySchalker extends EntityGolem implements IMob {
} }
@Override @Override
protected boolean canTriggerWalking() { protected boolean canTriggerWalking()
{
return false; return false;
} }
@Override @Override
public SoundCategory getSoundCategory() { public SoundCategory getSoundCategory()
{
return SoundCategory.HOSTILE; return SoundCategory.HOSTILE;
} }
@Override @Override
protected SoundEvent getAmbientSound() { protected SoundEvent getAmbientSound()
{
return ModSoundEvents.ENTITY_SCHALKER_AMBIENT; return ModSoundEvents.ENTITY_SCHALKER_AMBIENT;
} }
@Override @Override
public void playLivingSound() { public void playLivingSound()
if(!this.isClosed()) { {
if (!this.isClosed())
{
super.playLivingSound(); super.playLivingSound();
} }
} }
@Override @Override
protected SoundEvent getDeathSound() { protected SoundEvent getDeathSound()
{
return ModSoundEvents.ENTITY_SCHALKER_DEATH; return ModSoundEvents.ENTITY_SCHALKER_DEATH;
} }
@Override @Override
protected SoundEvent getHurtSound(DamageSource damageSourceIn) { protected SoundEvent getHurtSound(DamageSource damageSourceIn)
{
return this.isClosed() ? SoundEvents.ENTITY_SHULKER_HURT_CLOSED : SoundEvents.ENTITY_SHULKER_HURT; return this.isClosed() ? SoundEvents.ENTITY_SHULKER_HURT_CLOSED : SoundEvents.ENTITY_SHULKER_HURT;
} }
@Override @Override
protected void entityInit() { protected void entityInit()
{
super.entityInit(); super.entityInit();
this.dataManager.register(ATTACHED_FACE, EnumFacing.DOWN); this.dataManager.register(ATTACHED_FACE, EnumFacing.DOWN);
this.dataManager.register(ATTACHED_BLOCK_POS, Optional.absent()); this.dataManager.register(ATTACHED_BLOCK_POS, Optional.absent());
@ -129,42 +141,49 @@ public class EntitySchalker extends EntityGolem implements IMob {
} }
@Override @Override
protected void applyEntityAttributes() { protected void applyEntityAttributes()
{
super.applyEntityAttributes(); super.applyEntityAttributes();
this.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).setBaseValue(30.0D); this.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).setBaseValue(30.0D);
} }
@Override @Override
protected EntityBodyHelper createBodyHelper() { protected EntityBodyHelper createBodyHelper()
{
return new BodyHelper(this); return new BodyHelper(this);
} }
@Override @Override
public void readEntityFromNBT(NBTTagCompound compound) { public void readEntityFromNBT(NBTTagCompound compound)
{
super.readEntityFromNBT(compound); super.readEntityFromNBT(compound);
this.dataManager.set(ATTACHED_FACE, EnumFacing.getFront(compound.getByte("AttachFace"))); this.dataManager.set(ATTACHED_FACE, EnumFacing.getFront(compound.getByte("AttachFace")));
this.dataManager.set(PEEK_TICK, compound.getByte("Peek")); this.dataManager.set(PEEK_TICK, compound.getByte("Peek"));
this.dataManager.set(COLOR, compound.getByte("Color")); this.dataManager.set(COLOR, compound.getByte("Color"));
if(compound.hasKey("APX")) { if (compound.hasKey("APX"))
{
int i = compound.getInteger("APX"); int i = compound.getInteger("APX");
int j = compound.getInteger("APY"); int j = compound.getInteger("APY");
int k = compound.getInteger("APZ"); int k = compound.getInteger("APZ");
this.dataManager.set(ATTACHED_BLOCK_POS, Optional.of(new BlockPos(i, j, k))); this.dataManager.set(ATTACHED_BLOCK_POS, Optional.of(new BlockPos(i, j, k)));
}else { } else
{
this.dataManager.set(ATTACHED_BLOCK_POS, Optional.absent()); this.dataManager.set(ATTACHED_BLOCK_POS, Optional.absent());
} }
} }
@Override @Override
public void writeEntityToNBT(NBTTagCompound compound) { public void writeEntityToNBT(NBTTagCompound compound)
{
super.writeEntityToNBT(compound); super.writeEntityToNBT(compound);
compound.setByte("AttachFace", (byte) this.dataManager.get(ATTACHED_FACE).getIndex()); compound.setByte("AttachFace", (byte) this.dataManager.get(ATTACHED_FACE).getIndex());
compound.setByte("Peek", this.dataManager.get(PEEK_TICK)); compound.setByte("Peek", this.dataManager.get(PEEK_TICK));
compound.setByte("Color", this.dataManager.get(COLOR)); compound.setByte("Color", this.dataManager.get(COLOR));
BlockPos blockpos = this.getAttachmentPos(); BlockPos blockpos = this.getAttachmentPos();
if(blockpos != null) { if (blockpos != null)
{
compound.setInteger("APX", blockpos.getX()); compound.setInteger("APX", blockpos.getX());
compound.setInteger("APY", blockpos.getY()); compound.setInteger("APY", blockpos.getY());
compound.setInteger("APZ", blockpos.getZ()); compound.setInteger("APZ", blockpos.getZ());
@ -172,72 +191,89 @@ public class EntitySchalker extends EntityGolem implements IMob {
} }
@Override @Override
public void onUpdate() { public void onUpdate()
{
super.onUpdate(); super.onUpdate();
BlockPos blockpos = this.dataManager.get(ATTACHED_BLOCK_POS).orNull(); BlockPos blockpos = this.dataManager.get(ATTACHED_BLOCK_POS).orNull();
if(blockpos == null && !this.world.isRemote) { if (blockpos == null && !this.world.isRemote)
{
blockpos = new BlockPos(this); blockpos = new BlockPos(this);
this.dataManager.set(ATTACHED_BLOCK_POS, Optional.of(blockpos)); this.dataManager.set(ATTACHED_BLOCK_POS, Optional.of(blockpos));
} }
if(this.isRiding()) { if (this.isRiding())
{
blockpos = null; blockpos = null;
float f = this.getRidingEntity().rotationYaw; float f = this.getRidingEntity().rotationYaw;
this.rotationYaw = f; this.rotationYaw = f;
this.renderYawOffset = f; this.renderYawOffset = f;
this.prevRenderYawOffset = f; this.prevRenderYawOffset = f;
this.clientSideTeleportInterpolation = 0; this.clientSideTeleportInterpolation = 0;
}else if(!this.world.isRemote) { } else if (!this.world.isRemote)
{
IBlockState iblockstate = this.world.getBlockState(blockpos); IBlockState iblockstate = this.world.getBlockState(blockpos);
if(iblockstate.getMaterial() != Material.AIR) { if (iblockstate.getMaterial() != Material.AIR)
if(iblockstate.getBlock() == Blocks.PISTON_EXTENSION) { {
if (iblockstate.getBlock() == Blocks.PISTON_EXTENSION)
{
EnumFacing enumfacing = iblockstate.getValue(BlockDirectional.FACING); EnumFacing enumfacing = iblockstate.getValue(BlockDirectional.FACING);
if(this.world.isAirBlock(blockpos.offset(enumfacing))) { if (this.world.isAirBlock(blockpos.offset(enumfacing)))
{
blockpos = blockpos.offset(enumfacing); blockpos = blockpos.offset(enumfacing);
this.dataManager.set(ATTACHED_BLOCK_POS, Optional.of(blockpos)); this.dataManager.set(ATTACHED_BLOCK_POS, Optional.of(blockpos));
}else { } else
{
this.tryTeleportToNewPosition(); this.tryTeleportToNewPosition();
} }
}else if(iblockstate.getBlock() == Blocks.PISTON_HEAD) { } else if (iblockstate.getBlock() == Blocks.PISTON_HEAD)
{
EnumFacing enumfacing3 = iblockstate.getValue(BlockDirectional.FACING); EnumFacing enumfacing3 = iblockstate.getValue(BlockDirectional.FACING);
if(this.world.isAirBlock(blockpos.offset(enumfacing3))) { if (this.world.isAirBlock(blockpos.offset(enumfacing3)))
{
blockpos = blockpos.offset(enumfacing3); blockpos = blockpos.offset(enumfacing3);
this.dataManager.set(ATTACHED_BLOCK_POS, Optional.of(blockpos)); this.dataManager.set(ATTACHED_BLOCK_POS, Optional.of(blockpos));
}else { } else
{
this.tryTeleportToNewPosition(); this.tryTeleportToNewPosition();
} }
}else { } else
{
this.tryTeleportToNewPosition(); this.tryTeleportToNewPosition();
} }
} }
BlockPos blockpos1 = blockpos.offset(this.getAttachmentFacing()); BlockPos blockpos1 = blockpos.offset(this.getAttachmentFacing());
if(!this.world.isBlockNormalCube(blockpos1, false)) { if (!this.world.isBlockNormalCube(blockpos1, false))
{
boolean flag = false; boolean flag = false;
for(EnumFacing enumfacing1 : EnumFacing.values()) { for (EnumFacing enumfacing1 : EnumFacing.values())
{
blockpos1 = blockpos.offset(enumfacing1); blockpos1 = blockpos.offset(enumfacing1);
if(this.world.isBlockNormalCube(blockpos1, false)) { if (this.world.isBlockNormalCube(blockpos1, false))
{
this.dataManager.set(ATTACHED_FACE, enumfacing1); this.dataManager.set(ATTACHED_FACE, enumfacing1);
flag = true; flag = true;
break; break;
} }
} }
if(!flag) { if (!flag)
{
this.tryTeleportToNewPosition(); this.tryTeleportToNewPosition();
} }
} }
BlockPos blockpos2 = blockpos.offset(this.getAttachmentFacing().getOpposite()); BlockPos blockpos2 = blockpos.offset(this.getAttachmentFacing().getOpposite());
if(this.world.isBlockNormalCube(blockpos2, false)) { if (this.world.isBlockNormalCube(blockpos2, false))
{
this.tryTeleportToNewPosition(); this.tryTeleportToNewPosition();
} }
} }
@ -245,17 +281,23 @@ public class EntitySchalker extends EntityGolem implements IMob {
float f1 = this.getPeekTick() * 0.01F; float f1 = this.getPeekTick() * 0.01F;
this.prevPeekAmount = this.peekAmount; this.prevPeekAmount = this.peekAmount;
if(this.peekAmount > f1) { if (this.peekAmount > f1)
{
this.peekAmount = MathHelper.clamp(this.peekAmount - 0.05F, f1, 1.0F); this.peekAmount = MathHelper.clamp(this.peekAmount - 0.05F, f1, 1.0F);
}else if(this.peekAmount < f1) { } else if (this.peekAmount < f1)
{
this.peekAmount = MathHelper.clamp(this.peekAmount + 0.05F, 0.0F, f1); this.peekAmount = MathHelper.clamp(this.peekAmount + 0.05F, 0.0F, f1);
} }
if(blockpos != null) { if (blockpos != null)
if(this.world.isRemote) { {
if(this.clientSideTeleportInterpolation > 0 && this.currentAttachmentPosition != null) { if (this.world.isRemote)
{
if (this.clientSideTeleportInterpolation > 0 && this.currentAttachmentPosition != null)
{
--this.clientSideTeleportInterpolation; --this.clientSideTeleportInterpolation;
}else { } else
{
this.currentAttachmentPosition = blockpos; this.currentAttachmentPosition = blockpos;
} }
} }
@ -285,7 +327,8 @@ public class EntitySchalker extends EntityGolem implements IMob {
double d2 = 0.0D; double d2 = 0.0D;
EnumFacing enumfacing2 = this.getAttachmentFacing(); EnumFacing enumfacing2 = this.getAttachmentFacing();
switch(enumfacing2) { switch (enumfacing2)
{
case DOWN: case DOWN:
this.setEntityBoundingBox(new AxisAlignedBB(this.posX - 0.5D, this.posY, this.posZ - 0.5D, this.setEntityBoundingBox(new AxisAlignedBB(this.posX - 0.5D, this.posY, this.posZ - 0.5D,
this.posX + 0.5D, this.posY + 1.0D + d3, this.posZ + 0.5D)); this.posX + 0.5D, this.posY + 1.0D + d3, this.posZ + 0.5D));
@ -317,12 +360,16 @@ public class EntitySchalker extends EntityGolem implements IMob {
d0 = -d5; d0 = -d5;
} }
if(d5 > 0.0D) { if (d5 > 0.0D)
{
List<Entity> list = this.world.getEntitiesWithinAABBExcludingEntity(this, this.getEntityBoundingBox()); List<Entity> list = this.world.getEntitiesWithinAABBExcludingEntity(this, this.getEntityBoundingBox());
if(!list.isEmpty()) { if (!list.isEmpty())
for(Entity entity : list) { {
if(!(entity instanceof EntitySchalker) && !entity.noClip) { for (Entity entity : list)
{
if (!(entity instanceof EntitySchalker) && !entity.noClip)
{
entity.move(MoverType.SHULKER, d0, d1, d2); entity.move(MoverType.SHULKER, d0, d1, d2);
} }
} }
@ -332,23 +379,29 @@ public class EntitySchalker extends EntityGolem implements IMob {
} }
@Override @Override
public void move(MoverType type, double x, double y, double z) { public void move(MoverType type, double x, double y, double z)
if(type == MoverType.SHULKER_BOX) { {
if (type == MoverType.SHULKER_BOX)
{
this.tryTeleportToNewPosition(); this.tryTeleportToNewPosition();
}else { } else
{
super.move(type, x, y, z); super.move(type, x, y, z);
} }
} }
@Override @Override
public void setPosition(double x, double y, double z) { public void setPosition(double x, double y, double z)
{
super.setPosition(x, y, z); super.setPosition(x, y, z);
if(this.dataManager != null && this.ticksExisted != 0) { if (this.dataManager != null && this.ticksExisted != 0)
{
Optional<BlockPos> optional = this.dataManager.get(ATTACHED_BLOCK_POS); Optional<BlockPos> optional = this.dataManager.get(ATTACHED_BLOCK_POS);
Optional<BlockPos> optional1 = Optional.of(new BlockPos(x, y, z)); Optional<BlockPos> optional1 = Optional.of(new BlockPos(x, y, z));
if(!optional1.equals(optional)) { if (!optional1.equals(optional))
{
this.dataManager.set(ATTACHED_BLOCK_POS, optional1); this.dataManager.set(ATTACHED_BLOCK_POS, optional1);
this.dataManager.set(PEEK_TICK, (byte) 0); this.dataManager.set(PEEK_TICK, (byte) 0);
this.isAirBorne = true; this.isAirBorne = true;
@ -356,27 +409,34 @@ public class EntitySchalker extends EntityGolem implements IMob {
} }
} }
protected boolean tryTeleportToNewPosition() { protected boolean tryTeleportToNewPosition()
if(!this.isAIDisabled() && this.isEntityAlive()) { {
if (!this.isAIDisabled() && this.isEntityAlive())
{
BlockPos blockpos = new BlockPos(this); BlockPos blockpos = new BlockPos(this);
for(int i = 0; i < 5; ++i) { for (int i = 0; i < 5; ++i)
{
BlockPos blockpos1 = blockpos.add(8 - this.rand.nextInt(17), 8 - this.rand.nextInt(17), BlockPos blockpos1 = blockpos.add(8 - this.rand.nextInt(17), 8 - this.rand.nextInt(17),
8 - this.rand.nextInt(17)); 8 - this.rand.nextInt(17));
if (blockpos1.getY() > 0 && this.world.isAirBlock(blockpos1) && this.world.isInsideWorldBorder(this) if (blockpos1.getY() > 0 && this.world.isAirBlock(blockpos1) && this.world.isInsideWorldBorder(this)
&& this.world.getCollisionBoxes(this, new AxisAlignedBB(blockpos1)).isEmpty()) { && this.world.getCollisionBoxes(this, new AxisAlignedBB(blockpos1)).isEmpty())
{
boolean flag = false; boolean flag = false;
for(EnumFacing enumfacing : EnumFacing.values()) { for (EnumFacing enumfacing : EnumFacing.values())
if(this.world.isBlockNormalCube(blockpos1.offset(enumfacing), false)) { {
if (this.world.isBlockNormalCube(blockpos1.offset(enumfacing), false))
{
this.dataManager.set(ATTACHED_FACE, enumfacing); this.dataManager.set(ATTACHED_FACE, enumfacing);
flag = true; flag = true;
break; break;
} }
} }
if(flag) { if (flag)
{
net.minecraftforge.event.entity.living.EnderTeleportEvent event = new net.minecraftforge.event.entity.living.EnderTeleportEvent( net.minecraftforge.event.entity.living.EnderTeleportEvent event = new net.minecraftforge.event.entity.living.EnderTeleportEvent(
this, blockpos1.getX(), blockpos1.getY(), blockpos1.getZ(), 0); this, blockpos1.getX(), blockpos1.getY(), blockpos1.getZ(), 0);
if (net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(event)) if (net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(event))
@ -384,7 +444,8 @@ public class EntitySchalker extends EntityGolem implements IMob {
blockpos1 = new BlockPos(event.getTargetX(), event.getTargetY(), event.getTargetZ()); blockpos1 = new BlockPos(event.getTargetX(), event.getTargetY(), event.getTargetZ());
} }
if(flag) { if (flag)
{
this.playSound(SoundEvents.ENTITY_SHULKER_TELEPORT, 1.0F, 1.0F); this.playSound(SoundEvents.ENTITY_SHULKER_TELEPORT, 1.0F, 1.0F);
this.dataManager.set(ATTACHED_BLOCK_POS, Optional.of(blockpos1)); this.dataManager.set(ATTACHED_BLOCK_POS, Optional.of(blockpos1));
this.dataManager.set(PEEK_TICK, (byte) 0); this.dataManager.set(PEEK_TICK, (byte) 0);
@ -395,13 +456,15 @@ public class EntitySchalker extends EntityGolem implements IMob {
} }
return false; return false;
}else { } else
{
return true; return true;
} }
} }
@Override @Override
public void onLivingUpdate() { public void onLivingUpdate()
{
super.onLivingUpdate(); super.onLivingUpdate();
this.motionX = 0.0D; this.motionX = 0.0D;
this.motionY = 0.0D; this.motionY = 0.0D;
@ -412,14 +475,19 @@ public class EntitySchalker extends EntityGolem implements IMob {
} }
@Override @Override
public void notifyDataManagerChange(DataParameter<?> key) { public void notifyDataManagerChange(DataParameter<?> key)
if(ATTACHED_BLOCK_POS.equals(key) && this.world.isRemote && !this.isRiding()) { {
if (ATTACHED_BLOCK_POS.equals(key) && this.world.isRemote && !this.isRiding())
{
BlockPos blockpos = this.getAttachmentPos(); BlockPos blockpos = this.getAttachmentPos();
if(blockpos != null) { if (blockpos != null)
if(this.currentAttachmentPosition == null) { {
if (this.currentAttachmentPosition == null)
{
this.currentAttachmentPosition = blockpos; this.currentAttachmentPosition = blockpos;
}else { } else
{
this.clientSideTeleportInterpolation = 6; this.clientSideTeleportInterpolation = 6;
} }
@ -441,62 +509,78 @@ public class EntitySchalker extends EntityGolem implements IMob {
@Override @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void setPositionAndRotationDirect(double x, double y, double z, float yaw, float pitch, public void setPositionAndRotationDirect(double x, double y, double z, float yaw, float pitch,
int posRotationIncrements, boolean teleport) { int posRotationIncrements, boolean teleport)
{
this.newPosRotationIncrements = 0; this.newPosRotationIncrements = 0;
} }
@Override @Override
public boolean attackEntityFrom(DamageSource source, float amount) { public boolean attackEntityFrom(DamageSource source, float amount)
if(this.isClosed()) { {
if (this.isClosed())
{
Entity entity = source.getImmediateSource(); Entity entity = source.getImmediateSource();
if(entity instanceof EntityArrow) { if (entity instanceof EntityArrow)
{
return false; return false;
} }
} }
if(super.attackEntityFrom(source, amount)) { if (super.attackEntityFrom(source, amount))
if(this.getHealth() < this.getMaxHealth() * 0.5D && this.rand.nextInt(4) == 0) { {
if (this.getHealth() < this.getMaxHealth() * 0.5D && this.rand.nextInt(4) == 0)
{
this.tryTeleportToNewPosition(); this.tryTeleportToNewPosition();
} }
return true; return true;
}else { } else
{
return false; return false;
} }
} }
private boolean isClosed() { private boolean isClosed()
{
return this.getPeekTick() == 0; return this.getPeekTick() == 0;
} }
@Override @Override
@Nullable @Nullable
public AxisAlignedBB getCollisionBoundingBox() { public AxisAlignedBB getCollisionBoundingBox()
{
return this.isEntityAlive() ? this.getEntityBoundingBox() : null; return this.isEntityAlive() ? this.getEntityBoundingBox() : null;
} }
public EnumFacing getAttachmentFacing() { public EnumFacing getAttachmentFacing()
{
return this.dataManager.get(ATTACHED_FACE); return this.dataManager.get(ATTACHED_FACE);
} }
@Nullable @Nullable
public BlockPos getAttachmentPos() { public BlockPos getAttachmentPos()
{
return this.dataManager.get(ATTACHED_BLOCK_POS).orNull(); return this.dataManager.get(ATTACHED_BLOCK_POS).orNull();
} }
public int getPeekTick() { public int getPeekTick()
{
return this.dataManager.get(PEEK_TICK); return this.dataManager.get(PEEK_TICK);
} }
public void updateArmorModifier(int p_184691_1_) { public void updateArmorModifier(int p_184691_1_)
if(!this.world.isRemote) { {
if (!this.world.isRemote)
{
this.getEntityAttribute(SharedMonsterAttributes.ARMOR).removeModifier(COVERED_ARMOR_BONUS_MODIFIER); this.getEntityAttribute(SharedMonsterAttributes.ARMOR).removeModifier(COVERED_ARMOR_BONUS_MODIFIER);
if(p_184691_1_ == 0) { if (p_184691_1_ == 0)
{
this.getEntityAttribute(SharedMonsterAttributes.ARMOR).applyModifier(COVERED_ARMOR_BONUS_MODIFIER); this.getEntityAttribute(SharedMonsterAttributes.ARMOR).applyModifier(COVERED_ARMOR_BONUS_MODIFIER);
this.playSound(SoundEvents.ENTITY_SHULKER_CLOSE, 1.0F, 1.0F); this.playSound(SoundEvents.ENTITY_SHULKER_CLOSE, 1.0F, 1.0F);
}else { } else
{
this.playSound(ModSoundEvents.ENTITY_SCHALKER_OPEN, 1.0F, 1.0F); this.playSound(ModSoundEvents.ENTITY_SCHALKER_OPEN, 1.0F, 1.0F);
} }
} }
@ -505,82 +589,101 @@ public class EntitySchalker extends EntityGolem implements IMob {
} }
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public float getClientPeekAmount(float p_184688_1_) { public float getClientPeekAmount(float p_184688_1_)
{
return this.prevPeekAmount + (this.peekAmount - this.prevPeekAmount) * p_184688_1_; return this.prevPeekAmount + (this.peekAmount - this.prevPeekAmount) * p_184688_1_;
} }
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public int getClientTeleportInterp() { public int getClientTeleportInterp()
{
return this.clientSideTeleportInterpolation; return this.clientSideTeleportInterpolation;
} }
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public BlockPos getOldAttachPos() { public BlockPos getOldAttachPos()
{
return this.currentAttachmentPosition; return this.currentAttachmentPosition;
} }
@Override @Override
public float getEyeHeight() { public float getEyeHeight()
{
return 0.5F; return 0.5F;
} }
@Override @Override
public int getVerticalFaceSpeed() { public int getVerticalFaceSpeed()
{
return 180; return 180;
} }
@Override @Override
public int getHorizontalFaceSpeed() { public int getHorizontalFaceSpeed()
{
return 180; return 180;
} }
@Override @Override
public void applyEntityCollision(Entity entityIn) { public void applyEntityCollision(Entity entityIn)
{
} }
@Override @Override
public float getCollisionBorderSize() { public float getCollisionBorderSize()
{
return 0.0F; return 0.0F;
} }
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public boolean isAttachedToBlock() { public boolean isAttachedToBlock()
{
return this.currentAttachmentPosition != null && this.getAttachmentPos() != null; return this.currentAttachmentPosition != null && this.getAttachmentPos() != null;
} }
@Override @Override
@Nullable @Nullable
protected ResourceLocation getLootTable() { protected ResourceLocation getLootTable()
{
return LootTableList.ENTITIES_SHULKER; return LootTableList.ENTITIES_SHULKER;
} }
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public EnumDyeColor getColor() { public EnumDyeColor getColor()
{
return EnumDyeColor.byMetadata(this.dataManager.get(COLOR)); return EnumDyeColor.byMetadata(this.dataManager.get(COLOR));
} }
static class AIDefenseAttack extends EntityAINearestAttackableTarget<EntityLivingBase> { static class AIDefenseAttack extends EntityAINearestAttackableTarget<EntityLivingBase>
public AIDefenseAttack(EntitySchalker schalker) { {
super(schalker, EntityLivingBase.class, 10, true, false, new Predicate<EntityLivingBase>() { public AIDefenseAttack(EntitySchalker schalker)
{
super(schalker, EntityLivingBase.class, 10, true, false, new Predicate<EntityLivingBase>()
{
@Override @Override
public boolean apply(@Nullable EntityLivingBase p_apply_1_) { public boolean apply(@Nullable EntityLivingBase p_apply_1_)
{
return p_apply_1_ instanceof IMob; return p_apply_1_ instanceof IMob;
} }
}); });
} }
@Override @Override
public boolean shouldExecute() { public boolean shouldExecute()
{
return this.taskOwner.getTeam() != null && super.shouldExecute(); return this.taskOwner.getTeam() != null && super.shouldExecute();
} }
@Override @Override
protected AxisAlignedBB getTargetableArea(double targetDistance) { protected AxisAlignedBB getTargetableArea(double targetDistance)
{
EnumFacing enumfacing = ((EntitySchalker) this.taskOwner).getAttachmentFacing(); EnumFacing enumfacing = ((EntitySchalker) this.taskOwner).getAttachmentFacing();
if(enumfacing.getAxis() == EnumFacing.Axis.X) { if (enumfacing.getAxis() == EnumFacing.Axis.X)
{
return this.taskOwner.getEntityBoundingBox().grow(4.0D, targetDistance, targetDistance); return this.taskOwner.getEntityBoundingBox().grow(4.0D, targetDistance, targetDistance);
}else { } else
{
return enumfacing.getAxis() == EnumFacing.Axis.Z return enumfacing.getAxis() == EnumFacing.Axis.Z
? this.taskOwner.getEntityBoundingBox().grow(targetDistance, targetDistance, 4.0D) ? this.taskOwner.getEntityBoundingBox().grow(targetDistance, targetDistance, 4.0D)
: this.taskOwner.getEntityBoundingBox().grow(targetDistance, 4.0D, targetDistance); : this.taskOwner.getEntityBoundingBox().grow(targetDistance, 4.0D, targetDistance);
@ -588,45 +691,69 @@ public class EntitySchalker extends EntityGolem implements IMob {
} }
} }
class AIAttack extends EntityAIBase { static class BodyHelper extends EntityBodyHelper
{
public BodyHelper(EntityLivingBase theEntity)
{
super(theEntity);
}
@Override
public void updateRenderAngles()
{
}
}
class AIAttack extends EntityAIBase
{
private int attackTime; private int attackTime;
public AIAttack() { public AIAttack()
{
this.setMutexBits(3); this.setMutexBits(3);
} }
@Override @Override
public boolean shouldExecute() { public boolean shouldExecute()
{
EntityLivingBase entitylivingbase = EntitySchalker.this.getAttackTarget(); EntityLivingBase entitylivingbase = EntitySchalker.this.getAttackTarget();
if(entitylivingbase != null && entitylivingbase.isEntityAlive()) { if (entitylivingbase != null && entitylivingbase.isEntityAlive())
{
return EntitySchalker.this.world.getDifficulty() != EnumDifficulty.PEACEFUL; return EntitySchalker.this.world.getDifficulty() != EnumDifficulty.PEACEFUL;
}else { } else
{
return false; return false;
} }
} }
@Override @Override
public void startExecuting() { public void startExecuting()
{
this.attackTime = 20; this.attackTime = 20;
EntitySchalker.this.updateArmorModifier(100); EntitySchalker.this.updateArmorModifier(100);
} }
@Override @Override
public void resetTask() { public void resetTask()
{
EntitySchalker.this.updateArmorModifier(0); EntitySchalker.this.updateArmorModifier(0);
} }
@Override @Override
public void updateTask() { public void updateTask()
if(EntitySchalker.this.world.getDifficulty() != EnumDifficulty.PEACEFUL) { {
if (EntitySchalker.this.world.getDifficulty() != EnumDifficulty.PEACEFUL)
{
--this.attackTime; --this.attackTime;
EntityLivingBase entitylivingbase = EntitySchalker.this.getAttackTarget(); EntityLivingBase entitylivingbase = EntitySchalker.this.getAttackTarget();
EntitySchalker.this.getLookHelper().setLookPositionWithEntity(entitylivingbase, 180.0F, 180.0F); EntitySchalker.this.getLookHelper().setLookPositionWithEntity(entitylivingbase, 180.0F, 180.0F);
double d0 = EntitySchalker.this.getDistanceSq(entitylivingbase); double d0 = EntitySchalker.this.getDistanceSq(entitylivingbase);
if(d0 < 400.0D) { if (d0 < 400.0D)
if(this.attackTime <= 0) { {
if (this.attackTime <= 0)
{
this.attackTime = 20 + EntitySchalker.this.rand.nextInt(10) * 20 / 2; this.attackTime = 20 + EntitySchalker.this.rand.nextInt(10) * 20 / 2;
EntityShulkerBullet entityshulkerbullet = new EntityShulkerBullet( EntityShulkerBullet entityshulkerbullet = new EntityShulkerBullet(
EntitySchalker.this.world, EntitySchalker.this.world,
@ -638,7 +765,8 @@ public class EntitySchalker extends EntityGolem implements IMob {
(EntitySchalker.this.rand.nextFloat() - EntitySchalker.this.rand.nextFloat()) * 0.2F (EntitySchalker.this.rand.nextFloat() - EntitySchalker.this.rand.nextFloat()) * 0.2F
+ 1.0F); + 1.0F);
} }
}else { } else
{
EntitySchalker.this.setAttackTarget(null); EntitySchalker.this.setAttackTarget(null);
} }
@ -647,23 +775,29 @@ public class EntitySchalker extends EntityGolem implements IMob {
} }
} }
class AIAttackNearest extends EntityAINearestAttackableTarget<EntityPlayer> { class AIAttackNearest extends EntityAINearestAttackableTarget<EntityPlayer>
public AIAttackNearest(EntitySchalker schalker) { {
public AIAttackNearest(EntitySchalker schalker)
{
super(schalker, EntityPlayer.class, true); super(schalker, EntityPlayer.class, true);
} }
@Override @Override
public boolean shouldExecute() { public boolean shouldExecute()
{
return EntitySchalker.this.world.getDifficulty() != EnumDifficulty.PEACEFUL && super.shouldExecute(); return EntitySchalker.this.world.getDifficulty() != EnumDifficulty.PEACEFUL && super.shouldExecute();
} }
@Override @Override
protected AxisAlignedBB getTargetableArea(double targetDistance) { protected AxisAlignedBB getTargetableArea(double targetDistance)
{
EnumFacing enumfacing = ((EntitySchalker) this.taskOwner).getAttachmentFacing(); EnumFacing enumfacing = ((EntitySchalker) this.taskOwner).getAttachmentFacing();
if(enumfacing.getAxis() == EnumFacing.Axis.X) { if (enumfacing.getAxis() == EnumFacing.Axis.X)
{
return this.taskOwner.getEntityBoundingBox().grow(4.0D, targetDistance, targetDistance); return this.taskOwner.getEntityBoundingBox().grow(4.0D, targetDistance, targetDistance);
}else { } else
{
return enumfacing.getAxis() == EnumFacing.Axis.Z return enumfacing.getAxis() == EnumFacing.Axis.Z
? this.taskOwner.getEntityBoundingBox().grow(targetDistance, targetDistance, 4.0D) ? this.taskOwner.getEntityBoundingBox().grow(targetDistance, targetDistance, 4.0D)
: this.taskOwner.getEntityBoundingBox().grow(targetDistance, 4.0D, targetDistance); : this.taskOwner.getEntityBoundingBox().grow(targetDistance, 4.0D, targetDistance);
@ -671,48 +805,46 @@ public class EntitySchalker extends EntityGolem implements IMob {
} }
} }
class AIPeek extends EntityAIBase { class AIPeek extends EntityAIBase
{
private int peekTime; private int peekTime;
private AIPeek() { private AIPeek()
{
} }
@Override @Override
public boolean shouldExecute() { public boolean shouldExecute()
{
return EntitySchalker.this.getAttackTarget() == null && EntitySchalker.this.rand.nextInt(40) == 0; return EntitySchalker.this.getAttackTarget() == null && EntitySchalker.this.rand.nextInt(40) == 0;
} }
@Override @Override
public boolean shouldContinueExecuting() { public boolean shouldContinueExecuting()
{
return EntitySchalker.this.getAttackTarget() == null && this.peekTime > 0; return EntitySchalker.this.getAttackTarget() == null && this.peekTime > 0;
} }
@Override @Override
public void startExecuting() { public void startExecuting()
{
this.peekTime = 20 * (1 + EntitySchalker.this.rand.nextInt(3)); this.peekTime = 20 * (1 + EntitySchalker.this.rand.nextInt(3));
EntitySchalker.this.updateArmorModifier(30); EntitySchalker.this.updateArmorModifier(30);
} }
@Override @Override
public void resetTask() { public void resetTask()
if(EntitySchalker.this.getAttackTarget() == null) { {
if (EntitySchalker.this.getAttackTarget() == null)
{
EntitySchalker.this.updateArmorModifier(0); EntitySchalker.this.updateArmorModifier(0);
} }
} }
@Override @Override
public void updateTask() { public void updateTask()
{
--this.peekTime; --this.peekTime;
} }
} }
static class BodyHelper extends EntityBodyHelper {
public BodyHelper(EntityLivingBase theEntity) {
super(theEntity);
}
@Override
public void updateRenderAngles() {
}
}
} }

View file

@ -7,40 +7,48 @@ import net.minecraft.util.DamageSource;
import net.minecraft.util.SoundEvent; import net.minecraft.util.SoundEvent;
import net.minecraft.world.World; import net.minecraft.world.World;
public class EntitySmavaCreeper extends EntityCreeper { public class EntitySmavaCreeper extends EntityCreeper
{
private int lastActiveTime; private int lastActiveTime;
private int timeSinceIgnited; private int timeSinceIgnited;
private int fuseTime = 20; private final int fuseTime = 20;
private int explosionRadius = 6; private final int explosionRadius = 6;
public EntitySmavaCreeper(World worldIn) { public EntitySmavaCreeper(World worldIn)
{
super(worldIn); super(worldIn);
setSize(0.6F, 1.7F); setSize(0.6F, 1.7F);
getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).setBaseValue(0.5D); getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).setBaseValue(0.5D);
} }
@Override @Override
public void onUpdate() { public void onUpdate()
if(this.isEntityAlive()) { {
if (this.isEntityAlive())
{
this.lastActiveTime = this.timeSinceIgnited; this.lastActiveTime = this.timeSinceIgnited;
if(this.hasIgnited()) { if (this.hasIgnited())
{
this.setCreeperState(1); this.setCreeperState(1);
} }
int i = this.getCreeperState(); int i = this.getCreeperState();
if(i > 0 && this.timeSinceIgnited == 0) { if (i > 0 && this.timeSinceIgnited == 0)
{
this.playSound(ModSoundEvents.ENTITY_SMAVACREEPER_FUSE, 1.0F, 1.0F); this.playSound(ModSoundEvents.ENTITY_SMAVACREEPER_FUSE, 1.0F, 1.0F);
} }
this.timeSinceIgnited += i; this.timeSinceIgnited += i;
if(this.timeSinceIgnited < 0) { if (this.timeSinceIgnited < 0)
{
this.timeSinceIgnited = 0; this.timeSinceIgnited = 0;
} }
if(this.timeSinceIgnited >= this.fuseTime) { if (this.timeSinceIgnited >= this.fuseTime)
{
this.timeSinceIgnited = this.fuseTime; this.timeSinceIgnited = this.fuseTime;
this.explode(); this.explode();
} }
@ -49,8 +57,10 @@ public class EntitySmavaCreeper extends EntityCreeper {
super.onUpdate(); super.onUpdate();
} }
private void explode() { private void explode()
if(!this.world.isRemote) { {
if (!this.world.isRemote)
{
boolean flag = net.minecraftforge.event.ForgeEventFactory.getMobGriefingEvent(this.world, this); boolean flag = net.minecraftforge.event.ForgeEventFactory.getMobGriefingEvent(this.world, this);
float f = this.getPowered() ? 2.0F : 1.0F; float f = this.getPowered() ? 2.0F : 1.0F;
this.dead = true; this.dead = true;
@ -62,12 +72,14 @@ public class EntitySmavaCreeper extends EntityCreeper {
} }
@Override @Override
protected SoundEvent getHurtSound(DamageSource damageSourceIn) { protected SoundEvent getHurtSound(DamageSource damageSourceIn)
{
return ModSoundEvents.ENTITY_SMAVACREEPER_HURT; return ModSoundEvents.ENTITY_SMAVACREEPER_HURT;
} }
@Override @Override
protected SoundEvent getAmbientSound() { protected SoundEvent getAmbientSound()
{
return ModSoundEvents.ENTITY_SMAVACREEPER_AMBIENT; return ModSoundEvents.ENTITY_SMAVACREEPER_AMBIENT;
} }
} }

View file

@ -1,36 +1,34 @@
package mod.acgaming.spackenmobs.entities; package mod.acgaming.spackenmobs.entities;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityAgeable; import net.minecraft.entity.EntityAgeable;
import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.ai.EntityAIAvoidEntity;
import net.minecraft.entity.monster.EntityCreeper; import net.minecraft.entity.monster.EntityCreeper;
import net.minecraft.entity.monster.EntityGhast; import net.minecraft.entity.monster.EntityGhast;
import net.minecraft.entity.passive.AbstractHorse; import net.minecraft.entity.passive.AbstractHorse;
import net.minecraft.entity.passive.EntityAnimal; import net.minecraft.entity.passive.EntityAnimal;
import net.minecraft.entity.passive.EntityLlama;
import net.minecraft.entity.passive.EntityWolf; import net.minecraft.entity.passive.EntityWolf;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.network.datasync.DataParameter;
import net.minecraft.network.datasync.DataSerializers;
import net.minecraft.network.datasync.EntityDataManager;
import net.minecraft.world.World; import net.minecraft.world.World;
import java.util.UUID; import java.util.UUID;
public class EntityWolfMZTE extends EntityWolf { public class EntityWolfMZTE extends EntityWolf
public EntityWolfMZTE(World worldIn) { {
public EntityWolfMZTE(World worldIn)
{
super(worldIn); super(worldIn);
this.setSize(0.6F, 0.85F); this.setSize(0.6F, 0.85F);
this.setTamed(false); this.setTamed(false);
} }
@Override @Override
public EntityWolfMZTE createChild(EntityAgeable ageable) { public EntityWolfMZTE createChild(EntityAgeable ageable)
{
EntityWolfMZTE entitywolfmzte = new EntityWolfMZTE(this.world); EntityWolfMZTE entitywolfmzte = new EntityWolfMZTE(this.world);
UUID uuid = this.getOwnerId(); UUID uuid = this.getOwnerId();
if(uuid != null) { if (uuid != null)
{
entitywolfmzte.setOwnerId(uuid); entitywolfmzte.setOwnerId(uuid);
entitywolfmzte.setTamed(true); entitywolfmzte.setTamed(true);
} }
@ -39,44 +37,59 @@ public class EntityWolfMZTE extends EntityWolf {
} }
@Override @Override
public boolean canMateWith(EntityAnimal otherAnimal) { public boolean canMateWith(EntityAnimal otherAnimal)
if(otherAnimal == this) { {
if (otherAnimal == this)
{
return false; return false;
}else if(!this.isTamed()) { } else if (!this.isTamed())
{
return false; return false;
}else if(!(otherAnimal instanceof EntityWolfMZTE)) { } else if (!(otherAnimal instanceof EntityWolfMZTE))
{
return false; return false;
}else { } else
{
EntityWolfMZTE entitywolfmzte = (EntityWolfMZTE) otherAnimal; EntityWolfMZTE entitywolfmzte = (EntityWolfMZTE) otherAnimal;
if(!entitywolfmzte.isTamed()) { if (!entitywolfmzte.isTamed())
{
return false; return false;
}else if(entitywolfmzte.isSitting()) { } else if (entitywolfmzte.isSitting())
{
return false; return false;
}else { } else
{
return this.isInLove() && entitywolfmzte.isInLove(); return this.isInLove() && entitywolfmzte.isInLove();
} }
} }
} }
@Override @Override
public boolean shouldAttackEntity(EntityLivingBase target, EntityLivingBase owner) { public boolean shouldAttackEntity(EntityLivingBase target, EntityLivingBase owner)
if(!(target instanceof EntityCreeper) && !(target instanceof EntityGhast)) { {
if(target instanceof EntityWolfMZTE) { if (!(target instanceof EntityCreeper) && !(target instanceof EntityGhast))
{
if (target instanceof EntityWolfMZTE)
{
EntityWolfMZTE entitywolfmzte = (EntityWolfMZTE) target; EntityWolfMZTE entitywolfmzte = (EntityWolfMZTE) target;
if(entitywolfmzte.isTamed() && entitywolfmzte.getOwner() == owner) { if (entitywolfmzte.isTamed() && entitywolfmzte.getOwner() == owner)
{
return false; return false;
} }
} }
if (target instanceof EntityPlayer && owner instanceof EntityPlayer if (target instanceof EntityPlayer && owner instanceof EntityPlayer
&& !((EntityPlayer)owner).canAttackPlayer((EntityPlayer)target)) { && !((EntityPlayer) owner).canAttackPlayer((EntityPlayer) target))
{
return false; return false;
}else { } else
{
return !(target instanceof AbstractHorse) || !((AbstractHorse) target).isTame(); return !(target instanceof AbstractHorse) || !((AbstractHorse) target).isTame();
} }
}else { } else
{
return false; return false;
} }
} }

View file

@ -8,12 +8,16 @@ import net.minecraft.potion.PotionEffect;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.TickEvent.PlayerTickEvent; import net.minecraftforge.fml.common.gameevent.TickEvent.PlayerTickEvent;
public class SurstroemmingSmellsBadEvent { public class SurstroemmingSmellsBadEvent
{
@SubscribeEvent @SubscribeEvent
public void onEvent(PlayerTickEvent event) { public void onEvent(PlayerTickEvent event)
if(event.player != null) { {
if (event.player != null)
{
EntityPlayer player = event.player; EntityPlayer player = event.player;
if(player.inventory.hasItemStack(new ItemStack(ModItems.SURSTROEMMING))) { if (player.inventory.hasItemStack(new ItemStack(ModItems.SURSTROEMMING)))
{
player.addPotionEffect(new PotionEffect(MobEffects.NAUSEA, 100)); player.addPotionEffect(new PotionEffect(MobEffects.NAUSEA, 100));
} }
} }

View file

@ -8,19 +8,24 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.InputEvent.KeyInputEvent; import net.minecraftforge.fml.common.gameevent.InputEvent.KeyInputEvent;
import org.lwjgl.input.Keyboard; import org.lwjgl.input.Keyboard;
public class TauntDrachenlordEvent { public class TauntDrachenlordEvent
public static AxisAlignedBB getBoundingBox(double x, double y, double z, int hRadius, int vRadius) { {
public static AxisAlignedBB getBoundingBox(double x, double y, double z, int hRadius, int vRadius)
{
return new AxisAlignedBB(x - hRadius, y - vRadius, z - hRadius, x + hRadius, y + vRadius, z + hRadius); return new AxisAlignedBB(x - hRadius, y - vRadius, z - hRadius, x + hRadius, y + vRadius, z + hRadius);
} }
public static void makeAngry(EntityPlayer player, EntityDrachenlord drache) { public static void makeAngry(EntityPlayer player, EntityDrachenlord drache)
{
drache.attackEntityFrom(DamageSource.causePlayerDamage(player), 0); drache.attackEntityFrom(DamageSource.causePlayerDamage(player), 0);
} }
@SubscribeEvent @SubscribeEvent
public void onKeyPress(KeyInputEvent event, EntityDrachenlord drache, EntityPlayer player) { public void onKeyPress(KeyInputEvent event, EntityDrachenlord drache, EntityPlayer player)
{
final int aggroRange = 64; final int aggroRange = 64;
if(Keyboard.isKeyDown(Keyboard.KEY_J)) { if (Keyboard.isKeyDown(Keyboard.KEY_J))
{
} }
} }

View file

@ -8,15 +8,18 @@ import net.minecraftforge.client.model.ModelLoader;
import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
public class ItemBase extends Item { public class ItemBase extends Item
public ItemBase(String name, CreativeTabs tab) { {
public ItemBase(String name, CreativeTabs tab)
{
setRegistryName(name); setRegistryName(name);
setUnlocalizedName(Spackenmobs.MODID + "." + name); setUnlocalizedName(Spackenmobs.MODID + "." + name);
setCreativeTab(tab); setCreativeTab(tab);
} }
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void initModel() { public void initModel()
{
ModelLoader.setCustomModelResourceLocation(this, 0, new ModelResourceLocation(getRegistryName(), "inventory")); ModelLoader.setCustomModelResourceLocation(this, 0, new ModelResourceLocation(getRegistryName(), "inventory"));
} }
} }

View file

@ -2,8 +2,10 @@ package mod.acgaming.spackenmobs.items;
import net.minecraft.potion.Potion; import net.minecraft.potion.Potion;
public class ItemPotion extends Potion { public class ItemPotion extends Potion
public ItemPotion(String name, boolean isBadPotion, int color, int iconIndexX, int iconIndexY) { {
public ItemPotion(String name, boolean isBadPotion, int color, int iconIndexX, int iconIndexY)
{
super(isBadPotion, color); super(isBadPotion, color);
setPotionName("effect." + name); setPotionName("effect." + name);
setIconIndex(iconIndexX, iconIndexY); setIconIndex(iconIndexX, iconIndexY);

View file

@ -9,14 +9,18 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
// Thanks to Vazkii! // Thanks to Vazkii!
public class BiomeHelper { public class BiomeHelper
{
public static Biome[] getBiomesWithMonster(Class<? extends Entity> clazz) { public static Biome[] getBiomesWithMonster(Class<? extends Entity> clazz)
{
List<Biome> biomes = new ArrayList<>(); List<Biome> biomes = new ArrayList<>();
for(Biome b : Biome.REGISTRY) { for (Biome b : Biome.REGISTRY)
{
List<SpawnListEntry> spawnList = b.getSpawnableList(EnumCreatureType.MONSTER); List<SpawnListEntry> spawnList = b.getSpawnableList(EnumCreatureType.MONSTER);
for (SpawnListEntry e : spawnList) for (SpawnListEntry e : spawnList)
if(e.entityClass == clazz) { if (e.entityClass == clazz)
{
biomes.add(b); biomes.add(b);
break; break;
} }
@ -24,12 +28,15 @@ public class BiomeHelper {
return biomes.toArray(new Biome[0]); return biomes.toArray(new Biome[0]);
} }
public static Biome[] getBiomesWithCreature(Class<? extends Entity> clazz) { public static Biome[] getBiomesWithCreature(Class<? extends Entity> clazz)
{
List<Biome> biomes = new ArrayList<>(); List<Biome> biomes = new ArrayList<>();
for(Biome b : Biome.REGISTRY) { for (Biome b : Biome.REGISTRY)
{
List<SpawnListEntry> spawnList = b.getSpawnableList(EnumCreatureType.CREATURE); List<SpawnListEntry> spawnList = b.getSpawnableList(EnumCreatureType.CREATURE);
for (SpawnListEntry e : spawnList) for (SpawnListEntry e : spawnList)
if(e.entityClass == clazz) { if (e.entityClass == clazz)
{
biomes.add(b); biomes.add(b);
break; break;
} }

View file

@ -10,7 +10,8 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
@Config(modid = "spackenmobs") @Config(modid = "spackenmobs")
@LangKey("spackenmobs.config.title") @LangKey("spackenmobs.config.title")
public class ModConfigs { public class ModConfigs
{
@Name("Allow ApoRed to spawn?") @Name("Allow ApoRed to spawn?")
public static boolean ApoRed_spawn = true; public static boolean ApoRed_spawn = true;
@Name("Allow Baka Mitai Creeper to spawn?") @Name("Allow Baka Mitai Creeper to spawn?")
@ -105,10 +106,13 @@ public class ModConfigs {
public static int Jens_search_distance = 10; public static int Jens_search_distance = 10;
@EventBusSubscriber(modid = "spackenmobs") @EventBusSubscriber(modid = "spackenmobs")
private static class EventHandler { private static class EventHandler
{
@SubscribeEvent @SubscribeEvent
public void onConfigChanged(ConfigChangedEvent.OnConfigChangedEvent event) { public void onConfigChanged(ConfigChangedEvent.OnConfigChangedEvent event)
if(event.getModID().equals("spackenmobs")) { {
if (event.getModID().equals("spackenmobs"))
{
ConfigManager.sync("spackenmobs", Config.Type.INSTANCE); ConfigManager.sync("spackenmobs", Config.Type.INSTANCE);
} }
} }

View file

@ -4,8 +4,10 @@ import mod.acgaming.spackenmobs.entities.*;
import mod.acgaming.spackenmobs.render.*; import mod.acgaming.spackenmobs.render.*;
import net.minecraftforge.fml.client.registry.RenderingRegistry; import net.minecraftforge.fml.client.registry.RenderingRegistry;
public class ModEntities { public class ModEntities
public static void initModels() { {
public static void initModels()
{
RenderingRegistry.registerEntityRenderingHandler(EntityApoRed.class, RenderApoRed.FACTORY); RenderingRegistry.registerEntityRenderingHandler(EntityApoRed.class, RenderApoRed.FACTORY);
RenderingRegistry.registerEntityRenderingHandler(EntityDrachenlord.class, RenderDrachenlord.FACTORY); RenderingRegistry.registerEntityRenderingHandler(EntityDrachenlord.class, RenderDrachenlord.FACTORY);
RenderingRegistry.registerEntityRenderingHandler(EntityIslamist.class, RenderIslamist.FACTORY); RenderingRegistry.registerEntityRenderingHandler(EntityIslamist.class, RenderIslamist.FACTORY);

View file

@ -6,7 +6,8 @@ import net.minecraft.item.Item;
import net.minecraftforge.fml.common.registry.GameRegistry.ObjectHolder; import net.minecraftforge.fml.common.registry.GameRegistry.ObjectHolder;
@ObjectHolder(Spackenmobs.MODID) @ObjectHolder(Spackenmobs.MODID)
public class ModItems { public class ModItems
{
public static final Item RAM = new ItemBase("ram", Spackenmobs.SPACKENMOBS_TAB); public static final Item RAM = new ItemBase("ram", Spackenmobs.SPACKENMOBS_TAB);
public static final Item RAM_ON_A_STICK = new ItemBase("ram_on_a_stick", Spackenmobs.SPACKENMOBS_TAB); public static final Item RAM_ON_A_STICK = new ItemBase("ram_on_a_stick", Spackenmobs.SPACKENMOBS_TAB);
public static final Item SURSTROEMMING = new ItemBase("surstroemming", Spackenmobs.SPACKENMOBS_TAB); public static final Item SURSTROEMMING = new ItemBase("surstroemming", Spackenmobs.SPACKENMOBS_TAB);

View file

@ -9,33 +9,42 @@ import java.io.File;
import java.util.Collections; import java.util.Collections;
import java.util.Set; import java.util.Set;
public class ModLootTableList { public class ModLootTableList
private static final Set<ResourceLocation> LOOT_TABLES = Sets.<ResourceLocation>newHashSet(); {
private static final Set<ResourceLocation> LOOT_TABLES = Sets.newHashSet();
public static final ResourceLocation EMPTY = register("empty"); public static final ResourceLocation EMPTY = register("empty");
public static final ResourceLocation ENTITIES_JENS = register("entities/jens"); public static final ResourceLocation ENTITIES_JENS = register("entities/jens");
private static final Set<ResourceLocation> READ_ONLY_LOOT_TABLES = Collections.<ResourceLocation>unmodifiableSet(LOOT_TABLES); private static final Set<ResourceLocation> READ_ONLY_LOOT_TABLES = Collections.unmodifiableSet(LOOT_TABLES);
public static Set<ResourceLocation> getAll() { public static Set<ResourceLocation> getAll()
{
return READ_ONLY_LOOT_TABLES; return READ_ONLY_LOOT_TABLES;
} }
public static ResourceLocation register(ResourceLocation id) { public static ResourceLocation register(ResourceLocation id)
if(LOOT_TABLES.add(id)) { {
if (LOOT_TABLES.add(id))
{
return id; return id;
}else { } else
{
throw new IllegalArgumentException(id + " is already a registered built-in loot table"); throw new IllegalArgumentException(id + " is already a registered built-in loot table");
} }
} }
private static ResourceLocation register(String id) { private static ResourceLocation register(String id)
{
return register(new ResourceLocation("spackenmobs", id)); return register(new ResourceLocation("spackenmobs", id));
} }
public static boolean test() { public static boolean test()
LootTableManager loottablemanager = new LootTableManager((File)null); {
LootTableManager loottablemanager = new LootTableManager(null);
for(ResourceLocation resourcelocation : READ_ONLY_LOOT_TABLES) { for (ResourceLocation resourcelocation : READ_ONLY_LOOT_TABLES)
if(loottablemanager.getLootTableFromLocation(resourcelocation) == LootTable.EMPTY_LOOT_TABLE) { {
if (loottablemanager.getLootTableFromLocation(resourcelocation) == LootTable.EMPTY_LOOT_TABLE)
{
return false; return false;
} }
} }

View file

@ -6,6 +6,7 @@ import net.minecraft.potion.Potion;
import net.minecraftforge.fml.common.registry.GameRegistry.ObjectHolder; import net.minecraftforge.fml.common.registry.GameRegistry.ObjectHolder;
@ObjectHolder(Spackenmobs.MODID) @ObjectHolder(Spackenmobs.MODID)
public class ModPotions { public class ModPotions
{
public static final Potion SURSTROEMMING_DRINK = new ItemPotion("surstroemming_drink", true, 42, 0, 0); public static final Potion SURSTROEMMING_DRINK = new ItemPotion("surstroemming_drink", true, 42, 0, 0);
} }

View file

@ -6,74 +6,46 @@ import net.minecraft.util.SoundEvent;
import net.minecraftforge.fml.common.registry.GameRegistry.ObjectHolder; import net.minecraftforge.fml.common.registry.GameRegistry.ObjectHolder;
@ObjectHolder(Spackenmobs.MODID) @ObjectHolder(Spackenmobs.MODID)
public class ModSoundEvents { public class ModSoundEvents
public static final SoundEvent ENTITY_SMAVACREEPER_FUSE = new SoundEvent( {
new ResourceLocation("spackenmobs:entities.smava_creeper.fuse")); public static final SoundEvent ENTITY_SMAVACREEPER_FUSE = new SoundEvent(new ResourceLocation("spackenmobs:entities.smava_creeper.fuse"));
public static final SoundEvent ENTITY_SMAVACREEPER_BLOW = new SoundEvent( public static final SoundEvent ENTITY_SMAVACREEPER_BLOW = new SoundEvent(new ResourceLocation("spackenmobs:entities.smava_creeper.blow"));
new ResourceLocation("spackenmobs:entities.smava_creeper.blow")); public static final SoundEvent ENTITY_SMAVACREEPER_HURT = new SoundEvent(new ResourceLocation("spackenmobs:entities.smava_creeper.hurt"));
public static final SoundEvent ENTITY_SMAVACREEPER_HURT = new SoundEvent( public static final SoundEvent ENTITY_SMAVACREEPER_AMBIENT = new SoundEvent(new ResourceLocation("spackenmobs:entities.smava_creeper.ambient"));
new ResourceLocation("spackenmobs:entities.smava_creeper.hurt"));
public static final SoundEvent ENTITY_SMAVACREEPER_AMBIENT = new SoundEvent(
new ResourceLocation("spackenmobs:entities.smava_creeper.ambient"));
public static final SoundEvent ENTITY_MARCELLDAVIS_AMBIENT = new SoundEvent( public static final SoundEvent ENTITY_MARCELLDAVIS_AMBIENT = new SoundEvent(new ResourceLocation("spackenmobs:entities.marcell_davis.ambient"));
new ResourceLocation("spackenmobs:entities.marcell_davis.ambient")); public static final SoundEvent ENTITY_MARCELLDAVIS_HURT = new SoundEvent(new ResourceLocation("spackenmobs:entities.marcell_davis.hurt"));
public static final SoundEvent ENTITY_MARCELLDAVIS_HURT = new SoundEvent( public static final SoundEvent ENTITY_MARCELLDAVIS_DEATH = new SoundEvent(new ResourceLocation("spackenmobs:entities.marcell_davis.death"));
new ResourceLocation("spackenmobs:entities.marcell_davis.hurt"));
public static final SoundEvent ENTITY_MARCELLDAVIS_DEATH = new SoundEvent(
new ResourceLocation("spackenmobs:entities.marcell_davis.death"));
public static final SoundEvent ENTITY_ISLAMIST_FUSE = new SoundEvent( public static final SoundEvent ENTITY_ISLAMIST_FUSE = new SoundEvent(new ResourceLocation("spackenmobs:entities.islamist.fuse"));
new ResourceLocation("spackenmobs:entities.islamist.fuse")); public static final SoundEvent ENTITY_ISLAMIST_BLOW = new SoundEvent(new ResourceLocation("spackenmobs:entities.islamist.blow"));
public static final SoundEvent ENTITY_ISLAMIST_BLOW = new SoundEvent( public static final SoundEvent ENTITY_ISLAMIST_HURT = new SoundEvent(new ResourceLocation("spackenmobs:entities.islamist.hurt"));
new ResourceLocation("spackenmobs:entities.islamist.blow")); public static final SoundEvent ENTITY_ISLAMIST_AMBIENT = new SoundEvent(new ResourceLocation("spackenmobs:entities.islamist.ambient"));
public static final SoundEvent ENTITY_ISLAMIST_HURT = new SoundEvent(
new ResourceLocation("spackenmobs:entities.islamist.hurt"));
public static final SoundEvent ENTITY_ISLAMIST_AMBIENT = new SoundEvent(
new ResourceLocation("spackenmobs:entities.islamist.ambient"));
public static final SoundEvent ENTITY_APORED_AMBIENT = new SoundEvent( public static final SoundEvent ENTITY_APORED_AMBIENT = new SoundEvent(new ResourceLocation("spackenmobs:entities.apored.ambient"));
new ResourceLocation("spackenmobs:entities.apored.ambient")); public static final SoundEvent ENTITY_APORED_HURT = new SoundEvent(new ResourceLocation("spackenmobs:entities.apored.hurt"));
public static final SoundEvent ENTITY_APORED_HURT = new SoundEvent( public static final SoundEvent ENTITY_APORED_DEATH = new SoundEvent(new ResourceLocation("spackenmobs:entities.apored.death"));
new ResourceLocation("spackenmobs:entities.apored.hurt"));
public static final SoundEvent ENTITY_APORED_DEATH = new SoundEvent(
new ResourceLocation("spackenmobs:entities.apored.death"));
public static final SoundEvent ENTITY_MRBEAN_AMBIENT = new SoundEvent( public static final SoundEvent ENTITY_MRBEAN_AMBIENT = new SoundEvent(new ResourceLocation("spackenmobs:entities.mr_bean.ambient"));
new ResourceLocation("spackenmobs:entities.mr_bean.ambient")); public static final SoundEvent ENTITY_MRBEAN_HURT = new SoundEvent(new ResourceLocation("spackenmobs:entities.mr_bean.hurt"));
public static final SoundEvent ENTITY_MRBEAN_HURT = new SoundEvent( public static final SoundEvent ENTITY_MRBEAN_DEATH = new SoundEvent(new ResourceLocation("spackenmobs:entities.mr_bean.death"));
new ResourceLocation("spackenmobs:entities.mr_bean.hurt"));
public static final SoundEvent ENTITY_MRBEAN_DEATH = new SoundEvent(
new ResourceLocation("spackenmobs:entities.mr_bean.death"));
public static final SoundEvent ENTITY_DRACHENLORD_AMBIENT = new SoundEvent( public static final SoundEvent ENTITY_DRACHENLORD_AMBIENT = new SoundEvent(new ResourceLocation("spackenmobs:entities.drachenlord.ambient"));
new ResourceLocation("spackenmobs:entities.drachenlord.ambient")); public static final SoundEvent ENTITY_DRACHENLORD_HURT = new SoundEvent(new ResourceLocation("spackenmobs:entities.drachenlord.hurt"));
public static final SoundEvent ENTITY_DRACHENLORD_HURT = new SoundEvent( public static final SoundEvent ENTITY_DRACHENLORD_DEATH = new SoundEvent(new ResourceLocation("spackenmobs:entities.drachenlord.death"));
new ResourceLocation("spackenmobs:entities.drachenlord.hurt")); public static final SoundEvent ENTITY_DRACHENLORD_ANGRY = new SoundEvent(new ResourceLocation("spackenmobs:entities.drachenlord.angry"));
public static final SoundEvent ENTITY_DRACHENLORD_DEATH = new SoundEvent(
new ResourceLocation("spackenmobs:entities.drachenlord.death"));
public static final SoundEvent ENTITY_DRACHENLORD_ANGRY = new SoundEvent(
new ResourceLocation("spackenmobs:entities.drachenlord.angry"));
public static final SoundEvent ENTITY_SCHALKER_AMBIENT = new SoundEvent( public static final SoundEvent ENTITY_SCHALKER_AMBIENT = new SoundEvent(new ResourceLocation("spackenmobs:entities.schalker.ambient"));
new ResourceLocation("spackenmobs:entities.schalker.ambient")); public static final SoundEvent ENTITY_SCHALKER_DEATH = new SoundEvent(new ResourceLocation("spackenmobs:entities.schalker.death"));
public static final SoundEvent ENTITY_SCHALKER_HURT = new SoundEvent( public static final SoundEvent ENTITY_SCHALKER_OPEN = new SoundEvent(new ResourceLocation("spackenmobs:entities.schalker.open"));
new ResourceLocation("spackenmobs:entities.schalker.hurt")); public static final SoundEvent ENTITY_SCHALKER_SHOOT = new SoundEvent(new ResourceLocation("spackenmobs:entities.schalker.shoot"));
public static final SoundEvent ENTITY_SCHALKER_DEATH = new SoundEvent(
new ResourceLocation("spackenmobs:entities.schalker.death"));
public static final SoundEvent ENTITY_SCHALKER_OPEN = new SoundEvent(
new ResourceLocation("spackenmobs:entities.schalker.open"));
public static final SoundEvent ENTITY_SCHALKER_SHOOT = new SoundEvent(
new ResourceLocation("spackenmobs:entities.schalker.shoot"));
public static final SoundEvent ENTITY_JENS_AMBIENT = new SoundEvent( public static final SoundEvent ENTITY_JENS_AMBIENT = new SoundEvent(new ResourceLocation("spackenmobs:entities.jens.ambient"));
new ResourceLocation("spackenmobs:entities.jens.ambient")); public static final SoundEvent ENTITY_JENS_HURT = new SoundEvent(new ResourceLocation("spackenmobs:entities.jens.hurt"));
public static final SoundEvent ENTITY_JENS_HURT = new SoundEvent( public static final SoundEvent ENTITY_JENS_DEATH = new SoundEvent(new ResourceLocation("spackenmobs:entities.jens.death"));
new ResourceLocation("spackenmobs:entities.jens.hurt")); public static final SoundEvent ENTITY_JENS_EAT = new SoundEvent(new ResourceLocation("spackenmobs:entities.jens.eat"));
public static final SoundEvent ENTITY_JENS_DEATH = new SoundEvent( public static final SoundEvent ENTITY_JENS_POOP = new SoundEvent(new ResourceLocation("spackenmobs:entities.jens.poop"));
new ResourceLocation("spackenmobs:entities.jens.death"));
public static final SoundEvent ENTITY_JENS_EAT = new SoundEvent( public static final SoundEvent ENTITY_BAKAMITAICREEPER_FUSE = new SoundEvent(new ResourceLocation("spackenmobs:entities.bakamitai_creeper.fuse"));
new ResourceLocation("spackenmobs:entities.jens.eat")); public static final SoundEvent ENTITY_BAKAMITAICREEPER_BLOW = new SoundEvent(new ResourceLocation("spackenmobs:entities.bakamitai_creeper.blow"));
public static final SoundEvent ENTITY_JENS_POOP = new SoundEvent(
new ResourceLocation("spackenmobs:entities.jens.poop"));
} }

View file

@ -1,10 +1,23 @@
package mod.acgaming.spackenmobs.misc; package mod.acgaming.spackenmobs.misc;
import mod.acgaming.spackenmobs.Spackenmobs; import mod.acgaming.spackenmobs.Spackenmobs;
import mod.acgaming.spackenmobs.entities.*; import mod.acgaming.spackenmobs.entities.EntityApoRed;
import net.minecraft.creativetab.CreativeTabs; import mod.acgaming.spackenmobs.entities.EntityBakaMitaiCreeper;
import mod.acgaming.spackenmobs.entities.EntityDrachenlord;
import mod.acgaming.spackenmobs.entities.EntityHolzstammhuhn;
import mod.acgaming.spackenmobs.entities.EntityIslamist;
import mod.acgaming.spackenmobs.entities.EntityJens;
import mod.acgaming.spackenmobs.entities.EntityMarcellDAvis;
import mod.acgaming.spackenmobs.entities.EntityMrBean;
import mod.acgaming.spackenmobs.entities.EntitySchalker;
import mod.acgaming.spackenmobs.entities.EntitySmavaCreeper;
import mod.acgaming.spackenmobs.entities.EntityWolfMZTE;
import net.minecraft.entity.EnumCreatureType; import net.minecraft.entity.EnumCreatureType;
import net.minecraft.entity.monster.*; import net.minecraft.entity.monster.EntityCreeper;
import net.minecraft.entity.monster.EntityPigZombie;
import net.minecraft.entity.monster.EntityShulker;
import net.minecraft.entity.monster.EntitySkeleton;
import net.minecraft.entity.monster.EntityZombie;
import net.minecraft.entity.passive.EntityChicken; import net.minecraft.entity.passive.EntityChicken;
import net.minecraft.entity.passive.EntityPig; import net.minecraft.entity.passive.EntityPig;
import net.minecraft.entity.passive.EntityWolf; import net.minecraft.entity.passive.EntityWolf;
@ -18,124 +31,146 @@ import net.minecraftforge.fml.common.registry.EntityEntry;
import net.minecraftforge.fml.common.registry.EntityRegistry; import net.minecraftforge.fml.common.registry.EntityRegistry;
@EventBusSubscriber(modid = Spackenmobs.MODID) @EventBusSubscriber(modid = Spackenmobs.MODID)
public class RegHandler { public class RegHandler
{
@SubscribeEvent @SubscribeEvent
public static void registerItems(Register<Item> event) { public static void registerEntities(Register<EntityEntry> event)
final Item[] items = { {
new Item().setRegistryName(Spackenmobs.MODID, "ram").setUnlocalizedName(Spackenmobs.MODID + "." + "ram") int id = 1;
.setCreativeTab(CreativeTabs.MISC),
new Item().setRegistryName(Spackenmobs.MODID, "ram_on_a_stick") // Smava Creeper
.setUnlocalizedName(Spackenmobs.MODID + "." + "ram_on_a_stick") EntityRegistry.registerModEntity(new ResourceLocation("spackenmobs:smava_creeper"), EntitySmavaCreeper.class, "smava_creeper", id++, Spackenmobs.instance, 64, 1, true, 7649828, 11053224);
.setCreativeTab(CreativeTabs.MISC), if (ModConfigs.SmavaCreeper_spawn == true)
new Item().setRegistryName(Spackenmobs.MODID, "surstroemming") {
.setUnlocalizedName(Spackenmobs.MODID + "." + "surstroemming") EntityRegistry.addSpawn(EntitySmavaCreeper.class, ModConfigs.SmavaCreeper_weight, ModConfigs.SmavaCreeper_min, ModConfigs.SmavaCreeper_max, EnumCreatureType.MONSTER,
.setCreativeTab(CreativeTabs.MISC)}; BiomeHelper.getBiomesWithMonster(EntityCreeper.class));
}
// Marcell D'Avis
EntityRegistry.registerModEntity(new ResourceLocation("spackenmobs:marcell_davis"), EntityMarcellDAvis.class, "marcell_davis", id++, Spackenmobs.instance, 64, 1, true, 15759, 16777215);
if (ModConfigs.MarcellDAvis_spawn == true)
{
EntityRegistry.addSpawn(EntityMarcellDAvis.class, ModConfigs.MarcellDAvis_weight, ModConfigs.MarcellDAvis_min, ModConfigs.MarcellDAvis_max, EnumCreatureType.MONSTER,
BiomeHelper.getBiomesWithMonster(EntityZombie.class));
}
// Islamist
EntityRegistry.registerModEntity(new ResourceLocation("spackenmobs:islamist"), EntityIslamist.class, "islamist", id++, Spackenmobs.instance, 64, 1, true, 15263976, 15211548);
if (ModConfigs.Islamist_spawn == true)
{
EntityRegistry.addSpawn(EntityIslamist.class, ModConfigs.Islamist_weight, ModConfigs.Islamist_min, ModConfigs.Islamist_max, EnumCreatureType.MONSTER,
BiomeHelper.getBiomesWithMonster(EntityCreeper.class));
}
// ApoRed
EntityRegistry.registerModEntity(new ResourceLocation("spackenmobs:apored"), EntityApoRed.class, "apored", id++, Spackenmobs.instance, 64, 1, true, 2039583, 16711680);
if (ModConfigs.ApoRed_spawn == true)
{
EntityRegistry.addSpawn(EntityApoRed.class, ModConfigs.ApoRed_weight, ModConfigs.ApoRed_min, ModConfigs.ApoRed_max, EnumCreatureType.MONSTER,
BiomeHelper.getBiomesWithMonster(EntitySkeleton.class));
}
// Mr. Bean
EntityRegistry.registerModEntity(new ResourceLocation("spackenmobs:mr_bean"), EntityMrBean.class, "mr_bean", id++, Spackenmobs.instance, 64, 1, true, 4802350, 3220238);
if (ModConfigs.MrBean_spawn == true)
{
EntityRegistry.addSpawn(EntityMrBean.class, ModConfigs.MrBean_weight, ModConfigs.MrBean_min, ModConfigs.MrBean_max, EnumCreatureType.MONSTER,
BiomeHelper.getBiomesWithMonster(EntityZombie.class));
}
// Drachenlord
EntityRegistry.registerModEntity(new ResourceLocation("spackenmobs:drachenlord"), EntityDrachenlord.class, "drachenlord", id++, Spackenmobs.instance, 64, 1, true, 15256745, 8738878);
if (ModConfigs.Drachenlord_spawn == true)
{
EntityRegistry.addSpawn(EntityDrachenlord.class, ModConfigs.Drachenlord_weight, ModConfigs.Drachenlord_min, ModConfigs.Drachenlord_max, EnumCreatureType.MONSTER,
BiomeHelper.getBiomesWithMonster(EntityPigZombie.class));
}
// Schalker
EntityRegistry.registerModEntity(new ResourceLocation("spackenmobs:schalker"), EntitySchalker.class, "schalker", id++, Spackenmobs.instance, 64, 1, true, 24745, 16777215);
if (ModConfigs.Schalker_spawn == true)
{
EntityRegistry.addSpawn(EntitySchalker.class, ModConfigs.Schalker_weight, ModConfigs.Schalker_min, ModConfigs.Schalker_max, EnumCreatureType.MONSTER,
BiomeHelper.getBiomesWithMonster(EntityShulker.class));
}
// Jens
EntityRegistry.registerModEntity(new ResourceLocation("spackenmobs:jens"), EntityJens.class, "jens", id++, Spackenmobs.instance, 64, 1, true, 6704526, 6767911);
if (ModConfigs.Jens_spawn == true)
{
EntityRegistry.addSpawn(EntityJens.class, ModConfigs.Jens_weight, ModConfigs.Jens_min, ModConfigs.Jens_max, EnumCreatureType.CREATURE, BiomeHelper.getBiomesWithCreature(EntityPig.class));
}
// WolfMZTE
EntityRegistry.registerModEntity(new ResourceLocation("spackenmobs:wolfmzte"), EntityWolfMZTE.class, "wolfmzte", id++, Spackenmobs.instance, 64, 1, true, 16711680, 0);
if (ModConfigs.WolfMZTE_spawn == true)
{
EntityRegistry.addSpawn(EntityJens.class, ModConfigs.WolfMZTE_weight, ModConfigs.WolfMZTE_min, ModConfigs.WolfMZTE_max, EnumCreatureType.CREATURE,
BiomeHelper.getBiomesWithCreature(EntityWolf.class));
}
// Holzstammhuhn
EntityRegistry.registerModEntity(new ResourceLocation("spackenmobs:holzstammhuhn"), EntityHolzstammhuhn.class, "holzstammhuhn", id++, Spackenmobs.instance, 64, 1, true, 12096347, 5295899);
if (ModConfigs.Holzstammhuhn_spawn == true)
{
EntityRegistry.addSpawn(EntityJens.class, ModConfigs.Holzstammhuhn_weight, ModConfigs.Holzstammhuhn_min, ModConfigs.Holzstammhuhn_max, EnumCreatureType.CREATURE,
BiomeHelper.getBiomesWithCreature(EntityChicken.class));
}
// Baka Mitai Creeper
EntityRegistry.registerModEntity(new ResourceLocation("spackenmobs:bakamitai_creeper"), EntityBakaMitaiCreeper.class, "bakamitai_creeper", id++, Spackenmobs.instance, 64, 1, true, 826890, 0);
if (ModConfigs.BakaMitaiCreeper_spawn == true)
{
EntityRegistry.addSpawn(EntityBakaMitaiCreeper.class, ModConfigs.BakaMitaiCreeper_weight, ModConfigs.BakaMitaiCreeper_min, ModConfigs.BakaMitaiCreeper_max, EnumCreatureType.MONSTER,
BiomeHelper.getBiomesWithMonster(EntityCreeper.class));
}
}
@SubscribeEvent
public static void registerItems(Register<Item> event)
{
final Item[] items =
{
new Item().setRegistryName(Spackenmobs.MODID, "ram").setUnlocalizedName(Spackenmobs.MODID + "." + "ram").setCreativeTab(Spackenmobs.SPACKENMOBS_TAB),
new Item().setRegistryName(Spackenmobs.MODID, "ram_on_a_stick").setUnlocalizedName(Spackenmobs.MODID + "." + "ram_on_a_stick").setCreativeTab(Spackenmobs.SPACKENMOBS_TAB),
new Item().setRegistryName(Spackenmobs.MODID, "surstroemming").setUnlocalizedName(Spackenmobs.MODID + "." + "surstroemming").setCreativeTab(Spackenmobs.SPACKENMOBS_TAB)
};
event.getRegistry().registerAll(items); event.getRegistry().registerAll(items);
} }
@SubscribeEvent @SubscribeEvent
public static void registerEntities(Register<EntityEntry> event) { public static void registerSounds(Register<SoundEvent> event)
int id = 1; {
// Smava Creeper // Smava Creeper
EntityRegistry.registerModEntity(new ResourceLocation("spackenmobs:smava_creeper"), EntitySmavaCreeper.class, ModSoundEvents.ENTITY_SMAVACREEPER_FUSE.setRegistryName(new ResourceLocation("spackenmobs:entities.smava_creeper.fuse"));
"smava_creeper", id++, Spackenmobs.instance, 64, 1, true, 7649828, 11053224);
EntityRegistry.addSpawn(EntitySmavaCreeper.class, 25, 1, 4, EnumCreatureType.MONSTER,
BiomeHelper.getBiomesWithMonster(EntityCreeper.class));
// Marcell D'Avis
EntityRegistry.registerModEntity(new ResourceLocation("spackenmobs:marcell_davis"), EntityMarcellDAvis.class,
"marcell_davis", id++, Spackenmobs.instance, 64, 1, true, 15759, 16777215);
EntityRegistry.addSpawn(EntityMarcellDAvis.class, 50, 1, 4, EnumCreatureType.MONSTER,
BiomeHelper.getBiomesWithMonster(EntityZombie.class));
// Islamist
EntityRegistry.registerModEntity(new ResourceLocation("spackenmobs:islamist"), EntityIslamist.class, "islamist",
id++, Spackenmobs.instance, 64, 1, true, 15263976, 15211548);
EntityRegistry.addSpawn(EntityIslamist.class, 50, 1, 4, EnumCreatureType.MONSTER,
BiomeHelper.getBiomesWithMonster(EntityCreeper.class));
// ApoRed
EntityRegistry.registerModEntity(new ResourceLocation("spackenmobs:apored"), EntityApoRed.class, "apored", id++,
Spackenmobs.instance, 64, 1, true, 2039583, 16711680);
EntityRegistry.addSpawn(EntityApoRed.class, 50, 1, 4, EnumCreatureType.MONSTER,
BiomeHelper.getBiomesWithMonster(EntitySkeleton.class));
// Mr. Bean
EntityRegistry.registerModEntity(new ResourceLocation("spackenmobs:mr_bean"), EntityMrBean.class, "mr_bean",
id++, Spackenmobs.instance, 64, 1, true, 4802350, 3220238);
EntityRegistry.addSpawn(EntityMrBean.class, 50, 1, 4, EnumCreatureType.MONSTER,
BiomeHelper.getBiomesWithMonster(EntityZombie.class));
// Drachenlord
EntityRegistry.registerModEntity(new ResourceLocation("spackenmobs:drachenlord"), EntityDrachenlord.class,
"drachenlord", id++, Spackenmobs.instance, 64, 1, true, 15256745, 8738878);
EntityRegistry.addSpawn(EntityDrachenlord.class, 50, 1, 4, EnumCreatureType.MONSTER,
BiomeHelper.getBiomesWithMonster(EntityPigZombie.class));
// Schalker
EntityRegistry.registerModEntity(new ResourceLocation("spackenmobs:schalker"), EntitySchalker.class, "schalker",
id++, Spackenmobs.instance, 64, 1, true, 24745, 16777215);
EntityRegistry.addSpawn(EntitySchalker.class, 50, 1, 4, EnumCreatureType.MONSTER,
BiomeHelper.getBiomesWithMonster(EntityShulker.class));
// Jens
EntityRegistry.registerModEntity(new ResourceLocation("spackenmobs:jens"), EntityJens.class, "jens", id++,
Spackenmobs.instance, 64, 1, true, 6704526, 6767911);
EntityRegistry.addSpawn(EntityJens.class, 50, 1, 4, EnumCreatureType.CREATURE,
BiomeHelper.getBiomesWithCreature(EntityPig.class));
// WolfMZTE
EntityRegistry.registerModEntity(new ResourceLocation("spackenmobs:wolfmzte"), EntityWolfMZTE.class, "wolfmzte",
id++, Spackenmobs.instance, 64, 1, true, 16711680, 0);
EntityRegistry.addSpawn(EntityJens.class, 50, 1, 4, EnumCreatureType.CREATURE,
BiomeHelper.getBiomesWithCreature(EntityWolf.class));
// Holzstammhuhn
EntityRegistry.registerModEntity(new ResourceLocation("spackenmobs:holzstammhuhn"), EntityHolzstammhuhn.class,
"holzstammhuhn", id++, Spackenmobs.instance, 64, 1, true, 12096347, 5295899);
EntityRegistry.addSpawn(EntityJens.class, 50, 1, 4, EnumCreatureType.CREATURE,
BiomeHelper.getBiomesWithCreature(EntityChicken.class));
// LootTableList.register(EntityJens.LOOT);
}
@SubscribeEvent
public static void registerSounds(Register<SoundEvent> event) {
// Smava Creeper
ModSoundEvents.ENTITY_SMAVACREEPER_FUSE
.setRegistryName(new ResourceLocation("spackenmobs:entities.smava_creeper.fuse"));
event.getRegistry().register(ModSoundEvents.ENTITY_SMAVACREEPER_FUSE); event.getRegistry().register(ModSoundEvents.ENTITY_SMAVACREEPER_FUSE);
ModSoundEvents.ENTITY_SMAVACREEPER_BLOW ModSoundEvents.ENTITY_SMAVACREEPER_BLOW.setRegistryName(new ResourceLocation("spackenmobs:entities.smava_creeper.blow"));
.setRegistryName(new ResourceLocation("spackenmobs:entities.smava_creeper.blow"));
event.getRegistry().register(ModSoundEvents.ENTITY_SMAVACREEPER_BLOW); event.getRegistry().register(ModSoundEvents.ENTITY_SMAVACREEPER_BLOW);
ModSoundEvents.ENTITY_SMAVACREEPER_HURT ModSoundEvents.ENTITY_SMAVACREEPER_HURT.setRegistryName(new ResourceLocation("spackenmobs:entities.smava_creeper.hurt"));
.setRegistryName(new ResourceLocation("spackenmobs:entities.smava_creeper.hurt"));
event.getRegistry().register(ModSoundEvents.ENTITY_SMAVACREEPER_HURT); event.getRegistry().register(ModSoundEvents.ENTITY_SMAVACREEPER_HURT);
ModSoundEvents.ENTITY_SMAVACREEPER_AMBIENT ModSoundEvents.ENTITY_SMAVACREEPER_AMBIENT.setRegistryName(new ResourceLocation("spackenmobs:entities.smava_creeper.ambient"));
.setRegistryName(new ResourceLocation("spackenmobs:entities.smava_creeper.ambient"));
event.getRegistry().register(ModSoundEvents.ENTITY_SMAVACREEPER_AMBIENT); event.getRegistry().register(ModSoundEvents.ENTITY_SMAVACREEPER_AMBIENT);
// Islamist // Islamist
ModSoundEvents.ENTITY_ISLAMIST_FUSE.setRegistryName(new ResourceLocation("spackenmobs:entities.islamist.fuse")); ModSoundEvents.ENTITY_ISLAMIST_FUSE.setRegistryName(new ResourceLocation("spackenmobs:entities.islamist.fuse"));
event.getRegistry().register(ModSoundEvents.ENTITY_ISLAMIST_FUSE); event.getRegistry().register(ModSoundEvents.ENTITY_ISLAMIST_FUSE);
ModSoundEvents.ENTITY_ISLAMIST_BLOW.setRegistryName(new ResourceLocation("spackenmobs:entities.islamist.blow"));
event.getRegistry().register(ModSoundEvents.ENTITY_ISLAMIST_BLOW);
ModSoundEvents.ENTITY_ISLAMIST_HURT.setRegistryName(new ResourceLocation("spackenmobs:entities.islamist.hurt")); ModSoundEvents.ENTITY_ISLAMIST_HURT.setRegistryName(new ResourceLocation("spackenmobs:entities.islamist.hurt"));
event.getRegistry().register(ModSoundEvents.ENTITY_ISLAMIST_HURT); event.getRegistry().register(ModSoundEvents.ENTITY_ISLAMIST_HURT);
ModSoundEvents.ENTITY_ISLAMIST_AMBIENT.setRegistryName(new ResourceLocation("spackenmobs:entities.islamist.ambient"));
event.getRegistry().register(ModSoundEvents.ENTITY_ISLAMIST_AMBIENT);
// Marcell D'Avis // Marcell D'Avis
ModSoundEvents.ENTITY_MARCELLDAVIS_AMBIENT ModSoundEvents.ENTITY_MARCELLDAVIS_AMBIENT.setRegistryName(new ResourceLocation("spackenmobs:entities.marcell_davis.ambient"));
.setRegistryName(new ResourceLocation("spackenmobs:entities.marcell_davis.ambient"));
event.getRegistry().register(ModSoundEvents.ENTITY_MARCELLDAVIS_AMBIENT); event.getRegistry().register(ModSoundEvents.ENTITY_MARCELLDAVIS_AMBIENT);
ModSoundEvents.ENTITY_MARCELLDAVIS_HURT ModSoundEvents.ENTITY_MARCELLDAVIS_HURT.setRegistryName(new ResourceLocation("spackenmobs:entities.marcell_davis.hurt"));
.setRegistryName(new ResourceLocation("spackenmobs:entities.marcell_davis.hurt"));
event.getRegistry().register(ModSoundEvents.ENTITY_MARCELLDAVIS_HURT); event.getRegistry().register(ModSoundEvents.ENTITY_MARCELLDAVIS_HURT);
ModSoundEvents.ENTITY_MARCELLDAVIS_DEATH ModSoundEvents.ENTITY_MARCELLDAVIS_DEATH.setRegistryName(new ResourceLocation("spackenmobs:entities.marcell_davis.death"));
.setRegistryName(new ResourceLocation("spackenmobs:entities.marcell_davis.death"));
event.getRegistry().register(ModSoundEvents.ENTITY_MARCELLDAVIS_DEATH); event.getRegistry().register(ModSoundEvents.ENTITY_MARCELLDAVIS_DEATH);
// Mr. Bean // Mr. Bean
ModSoundEvents.ENTITY_MRBEAN_AMBIENT ModSoundEvents.ENTITY_MRBEAN_AMBIENT.setRegistryName(new ResourceLocation("spackenmobs:entities.mr_bean.ambient"));
.setRegistryName(new ResourceLocation("spackenmobs:entities.mr_bean.ambient"));
event.getRegistry().register(ModSoundEvents.ENTITY_MRBEAN_AMBIENT); event.getRegistry().register(ModSoundEvents.ENTITY_MRBEAN_AMBIENT);
ModSoundEvents.ENTITY_MRBEAN_HURT.setRegistryName(new ResourceLocation("spackenmobs:entities.mr_bean.hurt")); ModSoundEvents.ENTITY_MRBEAN_HURT.setRegistryName(new ResourceLocation("spackenmobs:entities.mr_bean.hurt"));
event.getRegistry().register(ModSoundEvents.ENTITY_MRBEAN_HURT); event.getRegistry().register(ModSoundEvents.ENTITY_MRBEAN_HURT);
@ -143,8 +178,7 @@ public class RegHandler {
event.getRegistry().register(ModSoundEvents.ENTITY_MRBEAN_DEATH); event.getRegistry().register(ModSoundEvents.ENTITY_MRBEAN_DEATH);
// ApoRed // ApoRed
ModSoundEvents.ENTITY_APORED_AMBIENT ModSoundEvents.ENTITY_APORED_AMBIENT.setRegistryName(new ResourceLocation("spackenmobs:entities.apored.ambient"));
.setRegistryName(new ResourceLocation("spackenmobs:entities.apored.ambient"));
event.getRegistry().register(ModSoundEvents.ENTITY_APORED_AMBIENT); event.getRegistry().register(ModSoundEvents.ENTITY_APORED_AMBIENT);
ModSoundEvents.ENTITY_APORED_HURT.setRegistryName(new ResourceLocation("spackenmobs:entities.apored.hurt")); ModSoundEvents.ENTITY_APORED_HURT.setRegistryName(new ResourceLocation("spackenmobs:entities.apored.hurt"));
event.getRegistry().register(ModSoundEvents.ENTITY_APORED_HURT); event.getRegistry().register(ModSoundEvents.ENTITY_APORED_HURT);
@ -152,32 +186,23 @@ public class RegHandler {
event.getRegistry().register(ModSoundEvents.ENTITY_APORED_DEATH); event.getRegistry().register(ModSoundEvents.ENTITY_APORED_DEATH);
// Drachenlord // Drachenlord
ModSoundEvents.ENTITY_DRACHENLORD_AMBIENT ModSoundEvents.ENTITY_DRACHENLORD_AMBIENT.setRegistryName(new ResourceLocation("spackenmobs:entities.drachenlord.ambient"));
.setRegistryName(new ResourceLocation("spackenmobs:entities.drachenlord.ambient"));
event.getRegistry().register(ModSoundEvents.ENTITY_DRACHENLORD_AMBIENT); event.getRegistry().register(ModSoundEvents.ENTITY_DRACHENLORD_AMBIENT);
ModSoundEvents.ENTITY_DRACHENLORD_HURT ModSoundEvents.ENTITY_DRACHENLORD_HURT.setRegistryName(new ResourceLocation("spackenmobs:entities.drachenlord.hurt"));
.setRegistryName(new ResourceLocation("spackenmobs:entities.drachenlord.hurt"));
event.getRegistry().register(ModSoundEvents.ENTITY_DRACHENLORD_HURT); event.getRegistry().register(ModSoundEvents.ENTITY_DRACHENLORD_HURT);
ModSoundEvents.ENTITY_DRACHENLORD_DEATH ModSoundEvents.ENTITY_DRACHENLORD_DEATH.setRegistryName(new ResourceLocation("spackenmobs:entities.drachenlord.death"));
.setRegistryName(new ResourceLocation("spackenmobs:entities.drachenlord.death"));
event.getRegistry().register(ModSoundEvents.ENTITY_DRACHENLORD_DEATH); event.getRegistry().register(ModSoundEvents.ENTITY_DRACHENLORD_DEATH);
ModSoundEvents.ENTITY_DRACHENLORD_ANGRY ModSoundEvents.ENTITY_DRACHENLORD_ANGRY.setRegistryName(new ResourceLocation("spackenmobs:entities.drachenlord.angry"));
.setRegistryName(new ResourceLocation("spackenmobs:entities.drachenlord.angry"));
event.getRegistry().register(ModSoundEvents.ENTITY_DRACHENLORD_ANGRY); event.getRegistry().register(ModSoundEvents.ENTITY_DRACHENLORD_ANGRY);
// Schalker // Schalker
ModSoundEvents.ENTITY_SCHALKER_AMBIENT ModSoundEvents.ENTITY_SCHALKER_AMBIENT.setRegistryName(new ResourceLocation("spackenmobs:entities.schalker.ambient"));
.setRegistryName(new ResourceLocation("spackenmobs:entities.schalker.ambient"));
event.getRegistry().register(ModSoundEvents.ENTITY_SCHALKER_AMBIENT); event.getRegistry().register(ModSoundEvents.ENTITY_SCHALKER_AMBIENT);
ModSoundEvents.ENTITY_SCHALKER_HURT.setRegistryName(new ResourceLocation("spackenmobs:entities.schalker.hurt")); ModSoundEvents.ENTITY_SCHALKER_DEATH.setRegistryName(new ResourceLocation("spackenmobs:entities.schalker.death"));
event.getRegistry().register(ModSoundEvents.ENTITY_SCHALKER_HURT);
ModSoundEvents.ENTITY_SCHALKER_DEATH
.setRegistryName(new ResourceLocation("spackenmobs:entities.schalker.death"));
event.getRegistry().register(ModSoundEvents.ENTITY_SCHALKER_DEATH); event.getRegistry().register(ModSoundEvents.ENTITY_SCHALKER_DEATH);
ModSoundEvents.ENTITY_SCHALKER_OPEN.setRegistryName(new ResourceLocation("spackenmobs:entities.schalker.open")); ModSoundEvents.ENTITY_SCHALKER_OPEN.setRegistryName(new ResourceLocation("spackenmobs:entities.schalker.open"));
event.getRegistry().register(ModSoundEvents.ENTITY_SCHALKER_OPEN); event.getRegistry().register(ModSoundEvents.ENTITY_SCHALKER_OPEN);
ModSoundEvents.ENTITY_SCHALKER_SHOOT ModSoundEvents.ENTITY_SCHALKER_SHOOT.setRegistryName(new ResourceLocation("spackenmobs:entities.schalker.shoot"));
.setRegistryName(new ResourceLocation("spackenmobs:entities.schalker.shoot"));
event.getRegistry().register(ModSoundEvents.ENTITY_SCHALKER_SHOOT); event.getRegistry().register(ModSoundEvents.ENTITY_SCHALKER_SHOOT);
// Jens // Jens
@ -191,5 +216,11 @@ public class RegHandler {
event.getRegistry().register(ModSoundEvents.ENTITY_JENS_EAT); event.getRegistry().register(ModSoundEvents.ENTITY_JENS_EAT);
ModSoundEvents.ENTITY_JENS_POOP.setRegistryName(new ResourceLocation("spackenmobs:entities.jens.poop")); ModSoundEvents.ENTITY_JENS_POOP.setRegistryName(new ResourceLocation("spackenmobs:entities.jens.poop"));
event.getRegistry().register(ModSoundEvents.ENTITY_JENS_POOP); event.getRegistry().register(ModSoundEvents.ENTITY_JENS_POOP);
// Baka Mitai Creeper
ModSoundEvents.ENTITY_BAKAMITAICREEPER_FUSE.setRegistryName(new ResourceLocation("spackenmobs:entities.bakamitai_creeper.fuse"));
event.getRegistry().register(ModSoundEvents.ENTITY_BAKAMITAICREEPER_FUSE);
ModSoundEvents.ENTITY_BAKAMITAICREEPER_BLOW.setRegistryName(new ResourceLocation("spackenmobs:entities.bakamitai_creeper.blow"));
event.getRegistry().register(ModSoundEvents.ENTITY_BAKAMITAICREEPER_BLOW);
} }
} }

View file

@ -10,15 +10,18 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.Side;
@EventBusSubscriber(value = Side.CLIENT, modid = Spackenmobs.MODID) @EventBusSubscriber(value = Side.CLIENT, modid = Spackenmobs.MODID)
public class RegHandlerModels { public class RegHandlerModels
{
@SubscribeEvent @SubscribeEvent
public static void registerModels(ModelRegistryEvent event) { public static void registerModels(ModelRegistryEvent event)
{
registerModel(ModItems.RAM, 0); registerModel(ModItems.RAM, 0);
registerModel(ModItems.RAM_ON_A_STICK, 0); registerModel(ModItems.RAM_ON_A_STICK, 0);
registerModel(ModItems.SURSTROEMMING, 0); registerModel(ModItems.SURSTROEMMING, 0);
} }
private static void registerModel(Item item, int meta) { private static void registerModel(Item item, int meta)
{
ModelLoader.setCustomModelResourceLocation(item, meta, ModelLoader.setCustomModelResourceLocation(item, meta,
new ModelResourceLocation(item.getRegistryName(), "inventory")); new ModelResourceLocation(item.getRegistryName(), "inventory"));
} }

View file

@ -9,12 +9,14 @@ import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class ModelSchalker extends ModelBase { public class ModelSchalker extends ModelBase
{
public final ModelRenderer base; public final ModelRenderer base;
public final ModelRenderer lid; public final ModelRenderer lid;
public ModelRenderer head; public ModelRenderer head;
public ModelSchalker() { public ModelSchalker()
{
this.textureHeight = 64; this.textureHeight = 64;
this.textureWidth = 64; this.textureWidth = 64;
this.lid = new ModelRenderer(this); this.lid = new ModelRenderer(this);
@ -30,22 +32,26 @@ public class ModelSchalker extends ModelBase {
@Override @Override
public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw,
float headPitch, float scaleFactor, Entity entityIn) { float headPitch, float scaleFactor, Entity entityIn)
{
EntitySchalker EntitySchalker = (EntitySchalker) entityIn; EntitySchalker EntitySchalker = (EntitySchalker) entityIn;
float f = ageInTicks - EntitySchalker.ticksExisted; float f = ageInTicks - EntitySchalker.ticksExisted;
float f1 = (0.5F + EntitySchalker.getClientPeekAmount(f)) * (float) Math.PI; float f1 = (0.5F + EntitySchalker.getClientPeekAmount(f)) * (float) Math.PI;
float f2 = -1.0F + MathHelper.sin(f1); float f2 = -1.0F + MathHelper.sin(f1);
float f3 = 0.0F; float f3 = 0.0F;
if(f1 > (float)Math.PI) { if (f1 > (float) Math.PI)
{
f3 = MathHelper.sin(ageInTicks * 0.1F) * 0.7F; f3 = MathHelper.sin(ageInTicks * 0.1F) * 0.7F;
} }
this.lid.setRotationPoint(0.0F, 16.0F + MathHelper.sin(f1) * 8.0F + f3, 0.0F); this.lid.setRotationPoint(0.0F, 16.0F + MathHelper.sin(f1) * 8.0F + f3, 0.0F);
if(EntitySchalker.getClientPeekAmount(f) > 0.3F) { if (EntitySchalker.getClientPeekAmount(f) > 0.3F)
{
this.lid.rotateAngleY = f2 * f2 * f2 * f2 * (float) Math.PI * 0.125F; this.lid.rotateAngleY = f2 * f2 * f2 * f2 * (float) Math.PI * 0.125F;
}else { } else
{
this.lid.rotateAngleY = 0.0F; this.lid.rotateAngleY = 0.0F;
} }
@ -55,7 +61,8 @@ public class ModelSchalker extends ModelBase {
@Override @Override
public void render(Entity entityIn, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, public void render(Entity entityIn, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw,
float headPitch, float scale) { float headPitch, float scale)
{
this.base.render(scale); this.base.render(scale);
this.lid.render(scale); this.lid.render(scale);
} }

View file

@ -15,17 +15,21 @@ import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class RenderApoRed extends RenderSkeleton { public class RenderApoRed extends RenderSkeleton
{
public static final Factory FACTORY = new Factory(); public static final Factory FACTORY = new Factory();
private static final ResourceLocation APORED_TEXTURE = new ResourceLocation( private static final ResourceLocation APORED_TEXTURE = new ResourceLocation(
"spackenmobs:textures/entities/apored.png"); "spackenmobs:textures/entities/apored.png");
public RenderApoRed(RenderManager renderManagerIn) { public RenderApoRed(RenderManager renderManagerIn)
{
super(renderManagerIn); super(renderManagerIn);
this.addLayer(new LayerHeldItem(this)); this.addLayer(new LayerHeldItem(this));
this.addLayer(new LayerBipedArmor(this) { this.addLayer(new LayerBipedArmor(this)
{
@Override @Override
protected void initArmor() { protected void initArmor()
{
this.modelLeggings = new ModelSkeleton(0.5F, true); this.modelLeggings = new ModelSkeleton(0.5F, true);
this.modelArmor = new ModelSkeleton(1.0F, true); this.modelArmor = new ModelSkeleton(1.0F, true);
} }
@ -33,18 +37,22 @@ public class RenderApoRed extends RenderSkeleton {
} }
@Override @Override
public void transformHeldFull3DItemLayer() { public void transformHeldFull3DItemLayer()
{
GlStateManager.translate(0.09375F, 0.1875F, 0.0F); GlStateManager.translate(0.09375F, 0.1875F, 0.0F);
} }
@Override @Override
protected ResourceLocation getEntityTexture(AbstractSkeleton entity) { protected ResourceLocation getEntityTexture(AbstractSkeleton entity)
{
return APORED_TEXTURE; return APORED_TEXTURE;
} }
public static class Factory implements IRenderFactory<EntityApoRed> { public static class Factory implements IRenderFactory<EntityApoRed>
{
@Override @Override
public Render<? super EntityApoRed> createRenderFor(RenderManager manager) { public Render<? super EntityApoRed> createRenderFor(RenderManager manager)
{
return new RenderApoRed(manager); return new RenderApoRed(manager);
} }
} }

View file

@ -14,21 +14,26 @@ import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class RenderBakaMitaiCreeper extends RenderCreeper { public class RenderBakaMitaiCreeper extends RenderCreeper
{
public static final Factory FACTORY = new Factory(); public static final Factory FACTORY = new Factory();
private static final ResourceLocation CREEPER_TEXTURE = new ResourceLocation("textures/entity/creeper/creeper.png"); private static final ResourceLocation CREEPER_TEXTURE = new ResourceLocation("textures/entity/creeper/creeper.png");
public RenderBakaMitaiCreeper(RenderManager renderManagerIn) { public RenderBakaMitaiCreeper(RenderManager renderManagerIn)
{
super(renderManagerIn); super(renderManagerIn);
this.addLayer(new LayerCreeperCharge(this)); this.addLayer(new LayerCreeperCharge(this));
} }
protected int getColorMultiplier(EntityBakaMitaiCreeper entitylivingbaseIn, float lightBrightness, float partialTickTime) { protected int getColorMultiplier(EntityBakaMitaiCreeper entitylivingbaseIn, float lightBrightness, float partialTickTime)
{
float f = entitylivingbaseIn.getCreeperFlashIntensity(partialTickTime); float f = entitylivingbaseIn.getCreeperFlashIntensity(partialTickTime);
if((int)(f * 10.0F) % 2 == 0) { if ((int) (f * 10.0F) % 2 == 0)
{
return 0; return 0;
}else { } else
{
int i = (int) (f * 0.2F * 255.0F); int i = (int) (f * 0.2F * 255.0F);
i = MathHelper.clamp(i, 0, 255); i = MathHelper.clamp(i, 0, 255);
return i << 24 | 822083583; return i << 24 | 822083583;
@ -36,11 +41,13 @@ public class RenderBakaMitaiCreeper extends RenderCreeper {
} }
@Override @Override
protected ResourceLocation getEntityTexture(EntityCreeper entity) { protected ResourceLocation getEntityTexture(EntityCreeper entity)
{
return CREEPER_TEXTURE; return CREEPER_TEXTURE;
} }
protected void preRenderCallback(EntityBakaMitaiCreeper entitylivingbaseIn, float partialTickTime) { protected void preRenderCallback(EntityBakaMitaiCreeper entitylivingbaseIn, float partialTickTime)
{
float f = entitylivingbaseIn.getCreeperFlashIntensity(partialTickTime); float f = entitylivingbaseIn.getCreeperFlashIntensity(partialTickTime);
float f1 = 1.0F + MathHelper.sin(f * 100.0F) * f * 0.01F; float f1 = 1.0F + MathHelper.sin(f * 100.0F) * f * 0.01F;
f = MathHelper.clamp(f, 0.0F, 1.0F); f = MathHelper.clamp(f, 0.0F, 1.0F);
@ -51,9 +58,11 @@ public class RenderBakaMitaiCreeper extends RenderCreeper {
GlStateManager.scale(f2, f3, f2); GlStateManager.scale(f2, f3, f2);
} }
public static class Factory implements IRenderFactory<EntityBakaMitaiCreeper> { public static class Factory implements IRenderFactory<EntityBakaMitaiCreeper>
{
@Override @Override
public Render<? super EntityBakaMitaiCreeper> createRenderFor(RenderManager manager) { public Render<? super EntityBakaMitaiCreeper> createRenderFor(RenderManager manager)
{
return new RenderBakaMitaiCreeper(manager); return new RenderBakaMitaiCreeper(manager);
} }
} }

View file

@ -13,16 +13,20 @@ import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class RenderDrachenlord extends RenderZombie { public class RenderDrachenlord extends RenderZombie
{
public static final Factory FACTORY = new Factory(); public static final Factory FACTORY = new Factory();
private static final ResourceLocation DRACHENLORD_TEXTURE = new ResourceLocation( private static final ResourceLocation DRACHENLORD_TEXTURE = new ResourceLocation(
"spackenmobs:textures/entities/drachenlord.png"); "spackenmobs:textures/entities/drachenlord.png");
public RenderDrachenlord(RenderManager renderManagerIn) { public RenderDrachenlord(RenderManager renderManagerIn)
{
super(renderManagerIn); super(renderManagerIn);
this.addLayer(new LayerBipedArmor(this) { this.addLayer(new LayerBipedArmor(this)
{
@Override @Override
protected void initArmor() { protected void initArmor()
{
this.modelLeggings = new ModelZombie(0.5F, true); this.modelLeggings = new ModelZombie(0.5F, true);
this.modelArmor = new ModelZombie(1.0F, true); this.modelArmor = new ModelZombie(1.0F, true);
} }
@ -30,13 +34,16 @@ public class RenderDrachenlord extends RenderZombie {
} }
@Override @Override
protected ResourceLocation getEntityTexture(EntityZombie entity) { protected ResourceLocation getEntityTexture(EntityZombie entity)
{
return DRACHENLORD_TEXTURE; return DRACHENLORD_TEXTURE;
} }
public static class Factory implements IRenderFactory<EntityDrachenlord> { public static class Factory implements IRenderFactory<EntityDrachenlord>
{
@Override @Override
public Render<? super EntityDrachenlord> createRenderFor(RenderManager manager) { public Render<? super EntityDrachenlord> createRenderFor(RenderManager manager)
{
return new RenderDrachenlord(manager); return new RenderDrachenlord(manager);
} }
} }

View file

@ -11,23 +11,28 @@ import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class RenderHolzstammhuhn extends RenderChicken { public class RenderHolzstammhuhn extends RenderChicken
{
public static final Factory FACTORY = new Factory(); public static final Factory FACTORY = new Factory();
private static final ResourceLocation HOLZSTAMMHUHN_TEXTURE = new ResourceLocation( private static final ResourceLocation HOLZSTAMMHUHN_TEXTURE = new ResourceLocation(
"spackenmobs:textures/entities/holzstammhuhn.png"); "spackenmobs:textures/entities/holzstammhuhn.png");
public RenderHolzstammhuhn(RenderManager renderManagerIn) { public RenderHolzstammhuhn(RenderManager renderManagerIn)
{
super(renderManagerIn); super(renderManagerIn);
} }
@Override @Override
protected ResourceLocation getEntityTexture(EntityChicken entity) { protected ResourceLocation getEntityTexture(EntityChicken entity)
{
return HOLZSTAMMHUHN_TEXTURE; return HOLZSTAMMHUHN_TEXTURE;
} }
public static class Factory implements IRenderFactory<EntityHolzstammhuhn> { public static class Factory implements IRenderFactory<EntityHolzstammhuhn>
{
@Override @Override
public Render<? super EntityHolzstammhuhn> createRenderFor(RenderManager manager) { public Render<? super EntityHolzstammhuhn> createRenderFor(RenderManager manager)
{
return new RenderHolzstammhuhn(manager); return new RenderHolzstammhuhn(manager);
} }
} }

View file

@ -12,24 +12,29 @@ import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class RenderIslamist extends RenderCreeper { public class RenderIslamist extends RenderCreeper
{
public static final Factory FACTORY = new Factory(); public static final Factory FACTORY = new Factory();
private static final ResourceLocation ISLAMIST_TEXTURE = new ResourceLocation( private static final ResourceLocation ISLAMIST_TEXTURE = new ResourceLocation(
"spackenmobs:textures/entities/islamist.png"); "spackenmobs:textures/entities/islamist.png");
public RenderIslamist(RenderManager renderManagerIn) { public RenderIslamist(RenderManager renderManagerIn)
{
super(renderManagerIn); super(renderManagerIn);
this.addLayer(new LayerCreeperCharge(this)); this.addLayer(new LayerCreeperCharge(this));
} }
@Override @Override
protected ResourceLocation getEntityTexture(EntityCreeper entity) { protected ResourceLocation getEntityTexture(EntityCreeper entity)
{
return ISLAMIST_TEXTURE; return ISLAMIST_TEXTURE;
} }
public static class Factory implements IRenderFactory<EntityIslamist> { public static class Factory implements IRenderFactory<EntityIslamist>
{
@Override @Override
public Render<? super EntityIslamist> createRenderFor(RenderManager manager) { public Render<? super EntityIslamist> createRenderFor(RenderManager manager)
{
return new RenderIslamist(manager); return new RenderIslamist(manager);
} }
} }

View file

@ -11,22 +11,27 @@ import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class RenderJens extends RenderBiped<EntityJens> { public class RenderJens extends RenderBiped<EntityJens>
{
public static final Factory FACTORY = new Factory(); public static final Factory FACTORY = new Factory();
private static final ResourceLocation JENS_TEXTURE = new ResourceLocation("spackenmobs:textures/entities/jens.png"); private static final ResourceLocation JENS_TEXTURE = new ResourceLocation("spackenmobs:textures/entities/jens.png");
public RenderJens(RenderManager renderManagerIn) { public RenderJens(RenderManager renderManagerIn)
{
super(renderManagerIn, new ModelBiped(), 0.25F); super(renderManagerIn, new ModelBiped(), 0.25F);
} }
@Override @Override
protected ResourceLocation getEntityTexture(EntityJens entity) { protected ResourceLocation getEntityTexture(EntityJens entity)
{
return JENS_TEXTURE; return JENS_TEXTURE;
} }
private static class Factory implements IRenderFactory<EntityJens> { private static class Factory implements IRenderFactory<EntityJens>
{
@Override @Override
public Render<? super EntityJens> createRenderFor(RenderManager manager) { public Render<? super EntityJens> createRenderFor(RenderManager manager)
{
return new RenderJens(manager); return new RenderJens(manager);
} }
} }

View file

@ -13,16 +13,20 @@ import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class RenderMarcellDAvis extends RenderZombie { public class RenderMarcellDAvis extends RenderZombie
{
public static final Factory FACTORY = new Factory(); public static final Factory FACTORY = new Factory();
private static final ResourceLocation MARCELLDAVIS_TEXTURE = new ResourceLocation( private static final ResourceLocation MARCELLDAVIS_TEXTURE = new ResourceLocation(
"spackenmobs:textures/entities/marcell_davis.png"); "spackenmobs:textures/entities/marcell_davis.png");
public RenderMarcellDAvis(RenderManager renderManagerIn) { public RenderMarcellDAvis(RenderManager renderManagerIn)
{
super(renderManagerIn); super(renderManagerIn);
LayerBipedArmor layerbipedarmor = new LayerBipedArmor(this) { LayerBipedArmor layerbipedarmor = new LayerBipedArmor(this)
{
@Override @Override
protected void initArmor() { protected void initArmor()
{
this.modelLeggings = new ModelZombie(0.5F, true); this.modelLeggings = new ModelZombie(0.5F, true);
this.modelArmor = new ModelZombie(1.0F, true); this.modelArmor = new ModelZombie(1.0F, true);
} }
@ -31,13 +35,16 @@ public class RenderMarcellDAvis extends RenderZombie {
} }
@Override @Override
protected ResourceLocation getEntityTexture(EntityZombie entity) { protected ResourceLocation getEntityTexture(EntityZombie entity)
{
return MARCELLDAVIS_TEXTURE; return MARCELLDAVIS_TEXTURE;
} }
public static class Factory implements IRenderFactory<EntityMarcellDAvis> { public static class Factory implements IRenderFactory<EntityMarcellDAvis>
{
@Override @Override
public Render<? super EntityMarcellDAvis> createRenderFor(RenderManager manager) { public Render<? super EntityMarcellDAvis> createRenderFor(RenderManager manager)
{
return new RenderMarcellDAvis(manager); return new RenderMarcellDAvis(manager);
} }
} }

View file

@ -13,16 +13,20 @@ import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class RenderMrBean extends RenderZombie { public class RenderMrBean extends RenderZombie
{
public static final Factory FACTORY = new Factory(); public static final Factory FACTORY = new Factory();
private static final ResourceLocation MRBEAN_TEXTURE = new ResourceLocation( private static final ResourceLocation MRBEAN_TEXTURE = new ResourceLocation(
"spackenmobs:textures/entities/mr_bean.png"); "spackenmobs:textures/entities/mr_bean.png");
public RenderMrBean(RenderManager renderManagerIn) { public RenderMrBean(RenderManager renderManagerIn)
{
super(renderManagerIn); super(renderManagerIn);
LayerBipedArmor layerbipedarmor = new LayerBipedArmor(this) { LayerBipedArmor layerbipedarmor = new LayerBipedArmor(this)
{
@Override @Override
protected void initArmor() { protected void initArmor()
{
this.modelLeggings = new ModelZombie(0.5F, true); this.modelLeggings = new ModelZombie(0.5F, true);
this.modelArmor = new ModelZombie(1.0F, true); this.modelArmor = new ModelZombie(1.0F, true);
} }
@ -31,13 +35,16 @@ public class RenderMrBean extends RenderZombie {
} }
@Override @Override
protected ResourceLocation getEntityTexture(EntityZombie entity) { protected ResourceLocation getEntityTexture(EntityZombie entity)
{
return MRBEAN_TEXTURE; return MRBEAN_TEXTURE;
} }
public static class Factory implements IRenderFactory<EntityMrBean> { public static class Factory implements IRenderFactory<EntityMrBean>
{
@Override @Override
public Render<? super EntityMrBean> createRenderFor(RenderManager manager) { public Render<? super EntityMrBean> createRenderFor(RenderManager manager)
{
return new RenderMrBean(manager); return new RenderMrBean(manager);
} }
} }

View file

@ -17,7 +17,8 @@ import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class RenderSchalker extends RenderLiving<EntitySchalker> { public class RenderSchalker extends RenderLiving<EntitySchalker>
{
public static final ResourceLocation[] SCHALKER_TEXTURE = new ResourceLocation[]{ public static final ResourceLocation[] SCHALKER_TEXTURE = new ResourceLocation[]{
new ResourceLocation("spackenmobs:textures/entities/schalker.png"), new ResourceLocation("spackenmobs:textures/entities/schalker.png"),
new ResourceLocation("spackenmobs:textures/entities/schalker.png"), new ResourceLocation("spackenmobs:textures/entities/schalker.png"),
@ -37,21 +38,25 @@ public class RenderSchalker extends RenderLiving<EntitySchalker> {
new ResourceLocation("spackenmobs:textures/entities/schalker.png")}; new ResourceLocation("spackenmobs:textures/entities/schalker.png")};
public static final Factory FACTORY = new Factory(); public static final Factory FACTORY = new Factory();
public RenderSchalker(RenderManager p_i47194_1_) { public RenderSchalker(RenderManager p_i47194_1_)
{
super(p_i47194_1_, new ModelSchalker(), 0.0F); super(p_i47194_1_, new ModelSchalker(), 0.0F);
this.addLayer(new RenderSchalker.HeadLayer()); this.addLayer(new RenderSchalker.HeadLayer());
} }
@Override @Override
public ModelSchalker getMainModel() { public ModelSchalker getMainModel()
{
return (ModelSchalker) super.getMainModel(); return (ModelSchalker) super.getMainModel();
} }
@Override @Override
public void doRender(EntitySchalker entity, double x, double y, double z, float entityYaw, float partialTicks) { public void doRender(EntitySchalker entity, double x, double y, double z, float entityYaw, float partialTicks)
{
int i = entity.getClientTeleportInterp(); int i = entity.getClientTeleportInterp();
if(i > 0 && entity.isAttachedToBlock()) { if (i > 0 && entity.isAttachedToBlock())
{
BlockPos blockpos = entity.getAttachmentPos(); BlockPos blockpos = entity.getAttachmentPos();
BlockPos blockpos1 = entity.getOldAttachPos(); BlockPos blockpos1 = entity.getOldAttachPos();
double d0 = (i - partialTicks) / 6.0D; double d0 = (i - partialTicks) / 6.0D;
@ -60,26 +65,29 @@ public class RenderSchalker extends RenderLiving<EntitySchalker> {
double d2 = (blockpos.getY() - blockpos1.getY()) * d0; double d2 = (blockpos.getY() - blockpos1.getY()) * d0;
double d3 = (blockpos.getZ() - blockpos1.getZ()) * d0; double d3 = (blockpos.getZ() - blockpos1.getZ()) * d0;
super.doRender(entity, x - d1, y - d2, z - d3, entityYaw, partialTicks); super.doRender(entity, x - d1, y - d2, z - d3, entityYaw, partialTicks);
}else { } else
{
super.doRender(entity, x, y, z, entityYaw, partialTicks); super.doRender(entity, x, y, z, entityYaw, partialTicks);
} }
} }
@Override @Override
public boolean shouldRender(EntitySchalker livingEntity, ICamera camera, double camX, double camY, double camZ) { public boolean shouldRender(EntitySchalker livingEntity, ICamera camera, double camX, double camY, double camZ)
if(super.shouldRender(livingEntity, camera, camX, camY, camZ)) { {
if (super.shouldRender(livingEntity, camera, camX, camY, camZ))
{
return true; return true;
}else { } else
if(livingEntity.getClientTeleportInterp() > 0 && livingEntity.isAttachedToBlock()) { {
if (livingEntity.getClientTeleportInterp() > 0 && livingEntity.isAttachedToBlock())
{
BlockPos blockpos = livingEntity.getOldAttachPos(); BlockPos blockpos = livingEntity.getOldAttachPos();
BlockPos blockpos1 = livingEntity.getAttachmentPos(); BlockPos blockpos1 = livingEntity.getAttachmentPos();
Vec3d vec3d = new Vec3d(blockpos1.getX(), blockpos1.getY(), blockpos1.getZ()); Vec3d vec3d = new Vec3d(blockpos1.getX(), blockpos1.getY(), blockpos1.getZ());
Vec3d vec3d1 = new Vec3d(blockpos.getX(), blockpos.getY(), blockpos.getZ()); Vec3d vec3d1 = new Vec3d(blockpos.getX(), blockpos.getY(), blockpos.getZ());
if(camera.isBoundingBoxInFrustum( return camera.isBoundingBoxInFrustum(
new AxisAlignedBB(vec3d1.x, vec3d1.y, vec3d1.z, vec3d.x, vec3d.y, vec3d.z))) { new AxisAlignedBB(vec3d1.x, vec3d1.y, vec3d1.z, vec3d.x, vec3d.y, vec3d.z));
return true;
}
} }
return false; return false;
@ -87,16 +95,19 @@ public class RenderSchalker extends RenderLiving<EntitySchalker> {
} }
@Override @Override
protected ResourceLocation getEntityTexture(EntitySchalker entity) { protected ResourceLocation getEntityTexture(EntitySchalker entity)
{
return SCHALKER_TEXTURE[entity.getColor().getMetadata()]; return SCHALKER_TEXTURE[entity.getColor().getMetadata()];
} }
@Override @Override
protected void applyRotations(EntitySchalker entityLiving, float p_77043_2_, float rotationYaw, protected void applyRotations(EntitySchalker entityLiving, float p_77043_2_, float rotationYaw,
float partialTicks) { float partialTicks)
{
super.applyRotations(entityLiving, p_77043_2_, rotationYaw, partialTicks); super.applyRotations(entityLiving, p_77043_2_, rotationYaw, partialTicks);
switch(entityLiving.getAttachmentFacing()) { switch (entityLiving.getAttachmentFacing())
{
case DOWN: case DOWN:
default: default:
break; break;
@ -126,29 +137,36 @@ public class RenderSchalker extends RenderLiving<EntitySchalker> {
} }
@Override @Override
protected void preRenderCallback(EntitySchalker entitylivingbaseIn, float partialTickTime) { protected void preRenderCallback(EntitySchalker entitylivingbaseIn, float partialTickTime)
{
float f = 0.999F; float f = 0.999F;
GlStateManager.scale(0.999F, 0.999F, 0.999F); GlStateManager.scale(0.999F, 0.999F, 0.999F);
} }
public static class Factory implements IRenderFactory<EntitySchalker> { public static class Factory implements IRenderFactory<EntitySchalker>
{
@Override @Override
public Render<? super EntitySchalker> createRenderFor(RenderManager manager) { public Render<? super EntitySchalker> createRenderFor(RenderManager manager)
{
return new RenderSchalker(manager); return new RenderSchalker(manager);
} }
} }
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
class HeadLayer implements LayerRenderer<EntitySchalker> { class HeadLayer implements LayerRenderer<EntitySchalker>
private HeadLayer() { {
private HeadLayer()
{
} }
@Override @Override
public void doRenderLayer(EntitySchalker entitylivingbaseIn, float limbSwing, float limbSwingAmount, public void doRenderLayer(EntitySchalker entitylivingbaseIn, float limbSwing, float limbSwingAmount,
float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale) { float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale)
{
GlStateManager.pushMatrix(); GlStateManager.pushMatrix();
switch(entitylivingbaseIn.getAttachmentFacing()) { switch (entitylivingbaseIn.getAttachmentFacing())
{
case DOWN: case DOWN:
default: default:
break; break;
@ -188,7 +206,8 @@ public class RenderSchalker extends RenderLiving<EntitySchalker> {
} }
@Override @Override
public boolean shouldCombineTextures() { public boolean shouldCombineTextures()
{
return false; return false;
} }
} }

View file

@ -12,24 +12,29 @@ import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class RenderSmavaCreeper extends RenderCreeper { public class RenderSmavaCreeper extends RenderCreeper
{
public static final Factory FACTORY = new Factory(); public static final Factory FACTORY = new Factory();
private static final ResourceLocation SMAVA_TEXTURE = new ResourceLocation( private static final ResourceLocation SMAVA_TEXTURE = new ResourceLocation(
"spackenmobs:textures/entities/smava_creeper.png"); "spackenmobs:textures/entities/smava_creeper.png");
public RenderSmavaCreeper(RenderManager renderManagerIn) { public RenderSmavaCreeper(RenderManager renderManagerIn)
{
super(renderManagerIn); super(renderManagerIn);
this.addLayer(new LayerCreeperCharge(this)); this.addLayer(new LayerCreeperCharge(this));
} }
@Override @Override
protected ResourceLocation getEntityTexture(EntityCreeper entity) { protected ResourceLocation getEntityTexture(EntityCreeper entity)
{
return SMAVA_TEXTURE; return SMAVA_TEXTURE;
} }
public static class Factory implements IRenderFactory<EntitySmavaCreeper> { public static class Factory implements IRenderFactory<EntitySmavaCreeper>
{
@Override @Override
public Render<? super EntitySmavaCreeper> createRenderFor(RenderManager manager) { public Render<? super EntitySmavaCreeper> createRenderFor(RenderManager manager)
{
return new RenderSmavaCreeper(manager); return new RenderSmavaCreeper(manager);
} }
} }

View file

@ -13,7 +13,8 @@ import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class RenderWolfMZTE extends RenderWolf { public class RenderWolfMZTE extends RenderWolf
{
public static final Factory FACTORY = new Factory(); public static final Factory FACTORY = new Factory();
private static final ResourceLocation WOLFMZTE_TEXTURE = new ResourceLocation( private static final ResourceLocation WOLFMZTE_TEXTURE = new ResourceLocation(
"spackenmobs:textures/entities/wolfmzte.png"); "spackenmobs:textures/entities/wolfmzte.png");
@ -22,19 +23,23 @@ public class RenderWolfMZTE extends RenderWolf {
private static final ResourceLocation ANRGY_WOLFMZTE_TEXTURE = new ResourceLocation( private static final ResourceLocation ANRGY_WOLFMZTE_TEXTURE = new ResourceLocation(
"spackenmobs:textures/entities/wolfmzte_angry.png"); "spackenmobs:textures/entities/wolfmzte_angry.png");
public RenderWolfMZTE(RenderManager renderManagerIn) { public RenderWolfMZTE(RenderManager renderManagerIn)
{
super(renderManagerIn); super(renderManagerIn);
this.addLayer(new LayerWolfCollar(this)); this.addLayer(new LayerWolfCollar(this));
} }
@Override @Override
protected float handleRotationFloat(EntityWolf livingBase, float partialTicks) { protected float handleRotationFloat(EntityWolf livingBase, float partialTicks)
{
return livingBase.getTailRotation(); return livingBase.getTailRotation();
} }
@Override @Override
public void doRender(EntityWolf entity, double x, double y, double z, float entityYaw, float partialTicks) { public void doRender(EntityWolf entity, double x, double y, double z, float entityYaw, float partialTicks)
if(entity.isWolfWet()) { {
if (entity.isWolfWet())
{
float f = entity.getBrightness() * entity.getShadingWhileWet(partialTicks); float f = entity.getBrightness() * entity.getShadingWhileWet(partialTicks);
GlStateManager.color(f, f, f); GlStateManager.color(f, f, f);
} }
@ -43,17 +48,22 @@ public class RenderWolfMZTE extends RenderWolf {
} }
@Override @Override
protected ResourceLocation getEntityTexture(EntityWolf entity) { protected ResourceLocation getEntityTexture(EntityWolf entity)
if(entity.isTamed()) { {
if (entity.isTamed())
{
return TAMED_WOLFMZTE_TEXTURE; return TAMED_WOLFMZTE_TEXTURE;
}else { } else
{
return entity.isAngry() ? ANRGY_WOLFMZTE_TEXTURE : WOLFMZTE_TEXTURE; return entity.isAngry() ? ANRGY_WOLFMZTE_TEXTURE : WOLFMZTE_TEXTURE;
} }
} }
public static class Factory implements IRenderFactory<EntityWolfMZTE> { public static class Factory implements IRenderFactory<EntityWolfMZTE>
{
@Override @Override
public Render<? super EntityWolfMZTE> createRenderFor(RenderManager manager) { public Render<? super EntityWolfMZTE> createRenderFor(RenderManager manager)
{
return new RenderWolfMZTE(manager); return new RenderWolfMZTE(manager);
} }
} }

View file

@ -1,12 +1,15 @@
{ {
"pools": [{ "pools": [
{
"name": "jens", "name": "jens",
"rolls": 1, "rolls": 1,
"entries": [{ "entries": [
{
"type": "item", "type": "item",
"name": "spackenmobs:ram", "name": "spackenmobs:ram",
"weight": 1, "weight": 1,
"functions": [{ "functions": [
{
"function": "set_count", "function": "set_count",
"count": { "count": {
"min": 1, "min": 1,
@ -21,6 +24,8 @@
} }
} }
] ]
}] }
}] ]
}
]
} }

View file

@ -1,21 +1,28 @@
{ {
"entities.smava_creeper.fuse": { "entities.smava_creeper.fuse": {
"sounds": [{ "sounds": [
{
"name": "spackenmobs:smava_creeper/fuse" "name": "spackenmobs:smava_creeper/fuse"
}] }
]
}, },
"entities.smava_creeper.blow": { "entities.smava_creeper.blow": {
"sounds": [{ "sounds": [
{
"name": "spackenmobs:smava_creeper/blow" "name": "spackenmobs:smava_creeper/blow"
}] }
]
}, },
"entities.smava_creeper.hurt": { "entities.smava_creeper.hurt": {
"sounds": [{ "sounds": [
{
"name": "spackenmobs:smava_creeper/hurt" "name": "spackenmobs:smava_creeper/hurt"
}] }
]
}, },
"entities.smava_creeper.ambient": { "entities.smava_creeper.ambient": {
"sounds": [{ "sounds": [
{
"name": "spackenmobs:smava_creeper/say1" "name": "spackenmobs:smava_creeper/say1"
}, },
{ {
@ -36,7 +43,8 @@
] ]
}, },
"entities.marcell_davis.ambient": { "entities.marcell_davis.ambient": {
"sounds": [{ "sounds": [
{
"name": "spackenmobs:marcell_davis/say1" "name": "spackenmobs:marcell_davis/say1"
}, },
{ {
@ -222,7 +230,8 @@
] ]
}, },
"entities.marcell_davis.death": { "entities.marcell_davis.death": {
"sounds": [{ "sounds": [
{
"name": "spackenmobs:marcell_davis/death1" "name": "spackenmobs:marcell_davis/death1"
}, },
{ {
@ -240,7 +249,8 @@
] ]
}, },
"entities.marcell_davis.hurt": { "entities.marcell_davis.hurt": {
"sounds": [{ "sounds": [
{
"name": "spackenmobs:marcell_davis/hurt1" "name": "spackenmobs:marcell_davis/hurt1"
}, },
{ {
@ -261,7 +271,8 @@
] ]
}, },
"entities.islamist.fuse": { "entities.islamist.fuse": {
"sounds": [{ "sounds": [
{
"name": "spackenmobs:islamist/fuse1" "name": "spackenmobs:islamist/fuse1"
}, },
{ {
@ -276,12 +287,15 @@
] ]
}, },
"entities.islamist.blow": { "entities.islamist.blow": {
"sounds": [{ "sounds": [
{
"name": "spackenmobs:islamist/blow" "name": "spackenmobs:islamist/blow"
}] }
]
}, },
"entities.islamist.hurt": { "entities.islamist.hurt": {
"sounds": [{ "sounds": [
{
"name": "spackenmobs:islamist/say1" "name": "spackenmobs:islamist/say1"
}, },
{ {
@ -296,7 +310,8 @@
] ]
}, },
"entities.islamist.ambient": { "entities.islamist.ambient": {
"sounds": [{ "sounds": [
{
"name": "spackenmobs:islamist/say1" "name": "spackenmobs:islamist/say1"
}, },
{ {
@ -311,7 +326,8 @@
] ]
}, },
"entities.apored.ambient": { "entities.apored.ambient": {
"sounds": [{ "sounds": [
{
"name": "spackenmobs:apored/say1" "name": "spackenmobs:apored/say1"
}, },
{ {
@ -392,7 +408,8 @@
] ]
}, },
"entities.apored.death": { "entities.apored.death": {
"sounds": [{ "sounds": [
{
"name": "spackenmobs:apored/death1" "name": "spackenmobs:apored/death1"
}, },
{ {
@ -413,7 +430,8 @@
] ]
}, },
"entities.apored.hurt": { "entities.apored.hurt": {
"sounds": [{ "sounds": [
{
"name": "spackenmobs:apored/hurt1" "name": "spackenmobs:apored/hurt1"
}, },
{ {
@ -473,7 +491,8 @@
] ]
}, },
"entities.mr_bean.ambient": { "entities.mr_bean.ambient": {
"sounds": [{ "sounds": [
{
"name": "spackenmobs:mr_bean/say1" "name": "spackenmobs:mr_bean/say1"
}, },
{ {
@ -482,17 +501,22 @@
] ]
}, },
"entities.mr_bean.death": { "entities.mr_bean.death": {
"sounds": [{ "sounds": [
{
"name": "spackenmobs:mr_bean/death" "name": "spackenmobs:mr_bean/death"
}] }
]
}, },
"entities.mr_bean.hurt": { "entities.mr_bean.hurt": {
"sounds": [{ "sounds": [
{
"name": "spackenmobs:mr_bean/hurt" "name": "spackenmobs:mr_bean/hurt"
}] }
]
}, },
"entities.drachenlord.ambient": { "entities.drachenlord.ambient": {
"sounds": [{ "sounds": [
{
"name": "spackenmobs:drachenlord/say1" "name": "spackenmobs:drachenlord/say1"
}, },
{ {
@ -585,7 +609,8 @@
] ]
}, },
"entities.drachenlord.angry": { "entities.drachenlord.angry": {
"sounds": [{ "sounds": [
{
"name": "spackenmobs:drachenlord/angry1" "name": "spackenmobs:drachenlord/angry1"
}, },
{ {
@ -648,12 +673,15 @@
] ]
}, },
"entities.drachenlord.death": { "entities.drachenlord.death": {
"sounds": [{ "sounds": [
{
"name": "spackenmobs:drachenlord/death" "name": "spackenmobs:drachenlord/death"
}] }
]
}, },
"entities.drachenlord.hurt": { "entities.drachenlord.hurt": {
"sounds": [{ "sounds": [
{
"name": "spackenmobs:drachenlord/hurt1" "name": "spackenmobs:drachenlord/hurt1"
}, },
{ {
@ -671,7 +699,8 @@
] ]
}, },
"entities.schalker.ambient": { "entities.schalker.ambient": {
"sounds": [{ "sounds": [
{
"name": "spackenmobs:schalker/ambient1" "name": "spackenmobs:schalker/ambient1"
}, },
{ {
@ -704,12 +733,15 @@
] ]
}, },
"entities.schalker.death": { "entities.schalker.death": {
"sounds": [{ "sounds": [
{
"name": "spackenmobs:schalker/death" "name": "spackenmobs:schalker/death"
}] }
]
}, },
"entities.schalker.open": { "entities.schalker.open": {
"sounds": [{ "sounds": [
{
"name": "spackenmobs:schalker/open1" "name": "spackenmobs:schalker/open1"
}, },
{ {
@ -727,7 +759,8 @@
] ]
}, },
"entities.schalker.shoot": { "entities.schalker.shoot": {
"sounds": [{ "sounds": [
{
"name": "spackenmobs:schalker/shoot1" "name": "spackenmobs:schalker/shoot1"
}, },
{ {
@ -736,7 +769,8 @@
] ]
}, },
"entities.jens.ambient": { "entities.jens.ambient": {
"sounds": [{ "sounds": [
{
"name": "spackenmobs:jens/say1" "name": "spackenmobs:jens/say1"
}, },
{ {
@ -790,7 +824,8 @@
] ]
}, },
"entities.jens.death": { "entities.jens.death": {
"sounds": [{ "sounds": [
{
"name": "spackenmobs:jens/death1" "name": "spackenmobs:jens/death1"
}, },
{ {
@ -811,7 +846,8 @@
] ]
}, },
"entities.jens.hurt": { "entities.jens.hurt": {
"sounds": [{ "sounds": [
{
"name": "spackenmobs:jens/hurt1" "name": "spackenmobs:jens/hurt1"
}, },
{ {
@ -844,23 +880,31 @@
] ]
}, },
"entities.jens.eat": { "entities.jens.eat": {
"sounds": [{ "sounds": [
{
"name": "spackenmobs:jens/eat" "name": "spackenmobs:jens/eat"
}] }
]
}, },
"entities.jens.poop": { "entities.jens.poop": {
"sounds": [{ "sounds": [
{
"name": "spackenmobs:jens/poop" "name": "spackenmobs:jens/poop"
}] }
]
}, },
"entities.bakamitai_creeper.fuse": { "entities.bakamitai_creeper.fuse": {
"sounds": [{ "sounds": [
{
"name": "spackenmobs:bakamitai_creeper/fuse" "name": "spackenmobs:bakamitai_creeper/fuse"
}] }
]
}, },
"entities.bakamitai_creeper.blow": { "entities.bakamitai_creeper.blow": {
"sounds": [{ "sounds": [
{
"name": "spackenmobs:bakamitai_creeper/blow" "name": "spackenmobs:bakamitai_creeper/blow"
}] }
]
} }
} }