2
1
Fork 1
mirror of https://github.com/ACGaming/Spackenmobs synced 2024-06-02 10:40:05 +02:00

Sound overhaul and entity adjustments

This commit is contained in:
ACGaming 2020-08-12 20:48:39 +02:00
parent 61f70a43be
commit 2246a3f120
266 changed files with 844 additions and 455 deletions

View file

@ -56,17 +56,24 @@ public class Spackenmobs
public static final SoundEvent ENTITY_JENS_AMBIENT = new SoundEvent(new ResourceLocation("spackenmobs:entities.jens.ambient")); public static final SoundEvent ENTITY_JENS_AMBIENT = new SoundEvent(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(new ResourceLocation("spackenmobs:entities.jens.hurt"));
public static final SoundEvent ENTITY_JENS_DEATH = new SoundEvent(new ResourceLocation("spackenmobs:entities.jens.death")); public static final SoundEvent ENTITY_JENS_DEATH = new SoundEvent(new ResourceLocation("spackenmobs:entities.jens.death"));
public static final SoundEvent ENTITY_JENS_EAT = new SoundEvent(new ResourceLocation("spackenmobs:entities.jens.eat"));
@Instance @Instance
public static Spackenmobs instance; public static Spackenmobs instance;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
@EventHandler @EventHandler
public void preInit(FMLPreInitializationEvent event) public void preInitClient(FMLPreInitializationEvent event)
{ {
ModEntities.initModels(); ModEntities.initModels();
} }
@EventHandler
public void preInit(FMLPreInitializationEvent event)
{
}
@EventHandler @EventHandler
public void init(FMLInitializationEvent event) public void init(FMLInitializationEvent event)
{ {

View file

@ -4,6 +4,8 @@ import java.util.Set;
import com.google.common.collect.Sets; import com.google.common.collect.Sets;
import mod.acgaming.spackenmobs.Spackenmobs; import mod.acgaming.spackenmobs.Spackenmobs;
import mod.acgaming.spackenmobs.items.ModItems;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityAgeable; import net.minecraft.entity.EntityAgeable;
import net.minecraft.entity.ai.EntityAIFollowParent; import net.minecraft.entity.ai.EntityAIFollowParent;
import net.minecraft.entity.ai.EntityAILookIdle; import net.minecraft.entity.ai.EntityAILookIdle;
@ -15,7 +17,6 @@ import net.minecraft.entity.ai.EntityAIWanderAvoidWater;
import net.minecraft.entity.ai.EntityAIWatchClosest; import net.minecraft.entity.ai.EntityAIWatchClosest;
import net.minecraft.entity.passive.EntityPig; import net.minecraft.entity.passive.EntityPig;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Items;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.DamageSource; import net.minecraft.util.DamageSource;
@ -24,12 +25,12 @@ import net.minecraft.world.World;
public class EntityJens extends EntityPig public class EntityJens extends EntityPig
{ {
private static final Set<Item> TEMPTATION_ITEMS = Sets.newHashSet(Items.CARROT, Items.POTATO, Items.BEETROOT); private static final Set<Item> TEMPTATION_ITEMS = Sets.newHashSet(ModItems.RAM);
public EntityJens(World worldIn) public EntityJens(World worldIn)
{ {
super(worldIn); super(worldIn);
setSize(0.6F, 1.8F); setSize(0.6F, 2.2F);
} }
protected void initEntityAI() protected void initEntityAI()
@ -37,7 +38,7 @@ public class EntityJens extends EntityPig
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(3, new EntityAIMate(this, 1.0D)); this.tasks.addTask(3, new EntityAIMate(this, 1.0D));
this.tasks.addTask(4, new EntityAITempt(this, 1.2D, Items.CARROT_ON_A_STICK, false)); this.tasks.addTask(4, new EntityAITempt(this, 1.2D, ModItems.RAM_ON_A_STICK, false));
this.tasks.addTask(4, new EntityAITempt(this, 1.2D, false, TEMPTATION_ITEMS)); this.tasks.addTask(4, new EntityAITempt(this, 1.2D, false, TEMPTATION_ITEMS));
this.tasks.addTask(5, new EntityAIFollowParent(this, 1.1D)); this.tasks.addTask(5, new EntityAIFollowParent(this, 1.1D));
this.tasks.addTask(6, new EntityAIWanderAvoidWater(this, 1.0D)); this.tasks.addTask(6, new EntityAIWanderAvoidWater(this, 1.0D));
@ -50,6 +51,21 @@ public class EntityJens extends EntityPig
return TEMPTATION_ITEMS.contains(stack.getItem()); return TEMPTATION_ITEMS.contains(stack.getItem());
} }
public boolean canBeSteered()
{
Entity entity = this.getControllingPassenger();
if (!(entity instanceof EntityPlayer))
{
return false;
}
else
{
EntityPlayer entityplayer = (EntityPlayer)entity;
return entityplayer.getHeldItemMainhand().getItem() == ModItems.RAM_ON_A_STICK || entityplayer.getHeldItemOffhand().getItem() == ModItems.RAM_ON_A_STICK;
}
}
public EntityJens createChild(EntityAgeable ageable) public EntityJens createChild(EntityAgeable ageable)
{ {
return new EntityJens(this.world); return new EntityJens(this.world);

View file

@ -77,11 +77,7 @@ public class EntitySchalker extends EntityGolem implements IMob
this.currentAttachmentPosition = null; this.currentAttachmentPosition = null;
this.experienceValue = 5; this.experienceValue = 5;
} }
/**
* Called only once on an entity when first time spawned, via egg, mob spawner, natural spawning etc, but not called
* when entity is reloaded from nbt. Mainly used for initializing attributes and inventory
*/
@Nullable @Nullable
public IEntityLivingData onInitialSpawn(DifficultyInstance difficulty, @Nullable IEntityLivingData livingdata) public IEntityLivingData onInitialSpawn(DifficultyInstance difficulty, @Nullable IEntityLivingData livingdata)
{ {
@ -104,11 +100,7 @@ public class EntitySchalker extends EntityGolem implements IMob
this.targetTasks.addTask(2, new EntitySchalker.AIAttackNearest(this)); this.targetTasks.addTask(2, new EntitySchalker.AIAttackNearest(this));
this.targetTasks.addTask(3, new EntitySchalker.AIDefenseAttack(this)); this.targetTasks.addTask(3, new EntitySchalker.AIDefenseAttack(this));
} }
/**
* returns if this entity triggers Block.onEntityWalking on the blocks they walk on. used for spiders and wolves to
* prevent them from trampling crops
*/
protected boolean canTriggerWalking() protected boolean canTriggerWalking()
{ {
return false; return false;
@ -123,10 +115,7 @@ public class EntitySchalker extends EntityGolem implements IMob
{ {
return Spackenmobs.ENTITY_SCHALKER_AMBIENT; return Spackenmobs.ENTITY_SCHALKER_AMBIENT;
} }
/**
* Plays living's sound at its position
*/
public void playLivingSound() public void playLivingSound()
{ {
if (!this.isClosed()) if (!this.isClosed())
@ -142,7 +131,7 @@ public class EntitySchalker extends EntityGolem implements IMob
protected SoundEvent getHurtSound(DamageSource damageSourceIn) protected SoundEvent getHurtSound(DamageSource damageSourceIn)
{ {
return this.isClosed() ? SoundEvents.ENTITY_SHULKER_HURT_CLOSED : Spackenmobs.ENTITY_SCHALKER_HURT; return this.isClosed() ? SoundEvents.ENTITY_SHULKER_HURT_CLOSED : SoundEvents.ENTITY_SHULKER_HURT;
} }
protected void entityInit() protected void entityInit()
@ -169,10 +158,7 @@ public class EntitySchalker extends EntityGolem implements IMob
{ {
EntityLiving.registerFixesMob(fixer, EntitySchalker.class); EntityLiving.registerFixesMob(fixer, EntitySchalker.class);
} }
/**
* (abstract) Protected helper method to read subclass entity data from NBT.
*/
public void readEntityFromNBT(NBTTagCompound compound) public void readEntityFromNBT(NBTTagCompound compound)
{ {
super.readEntityFromNBT(compound); super.readEntityFromNBT(compound);
@ -192,10 +178,7 @@ public class EntitySchalker extends EntityGolem implements IMob
this.dataManager.set(ATTACHED_BLOCK_POS, Optional.absent()); this.dataManager.set(ATTACHED_BLOCK_POS, Optional.absent());
} }
} }
/**
* (abstract) Protected helper method to write subclass entity data to NBT.
*/
public void writeEntityToNBT(NBTTagCompound compound) public void writeEntityToNBT(NBTTagCompound compound)
{ {
super.writeEntityToNBT(compound); super.writeEntityToNBT(compound);
@ -211,10 +194,7 @@ public class EntitySchalker extends EntityGolem implements IMob
compound.setInteger("APZ", blockpos.getZ()); compound.setInteger("APZ", blockpos.getZ());
} }
} }
/**
* Called to update the entity's position/logic.
*/
public void onUpdate() public void onUpdate()
{ {
super.onUpdate(); super.onUpdate();
@ -395,10 +375,7 @@ public class EntitySchalker extends EntityGolem implements IMob
} }
} }
} }
/**
* Tries to move the entity towards the specified location.
*/
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)
@ -410,10 +387,7 @@ public class EntitySchalker extends EntityGolem implements IMob
super.move(type, x, y, z); super.move(type, x, y, z);
} }
} }
/**
* Sets the x,y,z of the entity from the given parameters. Also seems to set up a bounding box.
*/
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);
@ -481,11 +455,7 @@ public class EntitySchalker extends EntityGolem implements IMob
return true; return true;
} }
} }
/**
* Called frequently so the entity can update its state every tick as required. For example, zombies and skeletons
* use this to react to sunlight and start to burn.
*/
public void onLivingUpdate() public void onLivingUpdate()
{ {
super.onLivingUpdate(); super.onLivingUpdate();
@ -528,19 +498,13 @@ public class EntitySchalker extends EntityGolem implements IMob
super.notifyDataManagerChange(key); super.notifyDataManagerChange(key);
} }
/**
* Set the position and rotation values directly without any clamping.
*/
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void setPositionAndRotationDirect(double x, double y, double z, float yaw, float pitch, int posRotationIncrements, boolean teleport) public void setPositionAndRotationDirect(double x, double y, double z, float yaw, float pitch, int posRotationIncrements, boolean teleport)
{ {
this.newPosRotationIncrements = 0; this.newPosRotationIncrements = 0;
} }
/**
* Called when the entity is attacked.
*/
public boolean attackEntityFrom(DamageSource source, float amount) public boolean attackEntityFrom(DamageSource source, float amount)
{ {
if (this.isClosed()) if (this.isClosed())
@ -572,15 +536,7 @@ public class EntitySchalker extends EntityGolem implements IMob
{ {
return this.getPeekTick() == 0; return this.getPeekTick() == 0;
} }
/**
* Returns the <b>solid</b> collision bounding box for this entity. Used to make (e.g.) boats solid. Return null if
* this entity is not solid.
*
* For general purposes, use {@link #width} and {@link #height}.
*
* @see getEntityBoundingBox
*/
@Nullable @Nullable
public AxisAlignedBB getCollisionBoundingBox() public AxisAlignedBB getCollisionBoundingBox()
{ {
@ -607,10 +563,7 @@ public class EntitySchalker extends EntityGolem implements IMob
{ {
return ((Byte)this.dataManager.get(PEEK_TICK)).byteValue(); return ((Byte)this.dataManager.get(PEEK_TICK)).byteValue();
} }
/**
* Applies or removes armor modifier
*/
public void updateArmorModifier(int p_184691_1_) public void updateArmorModifier(int p_184691_1_)
{ {
if (!this.world.isRemote) if (!this.world.isRemote)
@ -653,11 +606,7 @@ public class EntitySchalker extends EntityGolem implements IMob
{ {
return 0.5F; return 0.5F;
} }
/**
* The speed it takes to move the entityliving's rotationPitch through the faceEntity method. This is only currently
* use in wolves.
*/
public int getVerticalFaceSpeed() public int getVerticalFaceSpeed()
{ {
return 180; return 180;
@ -667,10 +616,7 @@ public class EntitySchalker extends EntityGolem implements IMob
{ {
return 180; return 180;
} }
/**
* Applies a velocity to the entities, to push them away from eachother.
*/
public void applyEntityCollision(Entity entityIn) public void applyEntityCollision(Entity entityIn)
{ {
} }
@ -707,9 +653,6 @@ public class EntitySchalker extends EntityGolem implements IMob
this.setMutexBits(3); this.setMutexBits(3);
} }
/**
* Returns whether the EntityAIBase should begin execution.
*/
public boolean shouldExecute() public boolean shouldExecute()
{ {
EntityLivingBase entitylivingbase = EntitySchalker.this.getAttackTarget(); EntityLivingBase entitylivingbase = EntitySchalker.this.getAttackTarget();
@ -724,26 +667,17 @@ public class EntitySchalker extends EntityGolem implements IMob
} }
} }
/**
* Execute a one shot task or start executing a continuous task
*/
public void startExecuting() public void startExecuting()
{ {
this.attackTime = 20; this.attackTime = 20;
EntitySchalker.this.updateArmorModifier(100); EntitySchalker.this.updateArmorModifier(100);
} }
/**
* Reset the task's internal state. Called when this task is interrupted by another one
*/
public void resetTask() public void resetTask()
{ {
EntitySchalker.this.updateArmorModifier(0); EntitySchalker.this.updateArmorModifier(0);
} }
/**
* Keep ticking a continuous task that has already been started
*/
public void updateTask() public void updateTask()
{ {
if (EntitySchalker.this.world.getDifficulty() != EnumDifficulty.PEACEFUL) if (EntitySchalker.this.world.getDifficulty() != EnumDifficulty.PEACEFUL)
@ -780,9 +714,6 @@ public class EntitySchalker extends EntityGolem implements IMob
super(schalker, EntityPlayer.class, true); super(schalker, EntityPlayer.class, true);
} }
/**
* Returns whether the EntityAIBase should begin execution.
*/
public boolean shouldExecute() public boolean shouldExecute()
{ {
return EntitySchalker.this.world.getDifficulty() == EnumDifficulty.PEACEFUL ? false : super.shouldExecute(); return EntitySchalker.this.world.getDifficulty() == EnumDifficulty.PEACEFUL ? false : super.shouldExecute();
@ -816,9 +747,6 @@ public class EntitySchalker extends EntityGolem implements IMob
}); });
} }
/**
* Returns whether the EntityAIBase should begin execution.
*/
public boolean shouldExecute() public boolean shouldExecute()
{ {
return this.taskOwner.getTeam() == null ? false : super.shouldExecute(); return this.taskOwner.getTeam() == null ? false : super.shouldExecute();
@ -847,34 +775,22 @@ public class EntitySchalker extends EntityGolem implements IMob
{ {
} }
/**
* Returns whether the EntityAIBase should begin execution.
*/
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;
} }
/**
* Returns whether an in-progress EntityAIBase should continue executing
*/
public boolean shouldContinueExecuting() public boolean shouldContinueExecuting()
{ {
return EntitySchalker.this.getAttackTarget() == null && this.peekTime > 0; return EntitySchalker.this.getAttackTarget() == null && this.peekTime > 0;
} }
/**
* Execute a one shot task or start executing a continuous task
*/
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);
} }
/**
* Reset the task's internal state. Called when this task is interrupted by another one
*/
public void resetTask() public void resetTask()
{ {
if (EntitySchalker.this.getAttackTarget() == null) if (EntitySchalker.this.getAttackTarget() == null)
@ -883,9 +799,6 @@ public class EntitySchalker extends EntityGolem implements IMob
} }
} }
/**
* Keep ticking a continuous task that has already been started
*/
public void updateTask() public void updateTask()
{ {
--this.peekTime; --this.peekTime;
@ -899,9 +812,6 @@ public class EntitySchalker extends EntityGolem implements IMob
super(theEntity); super(theEntity);
} }
/**
* Update the Head and Body rendenring angles
*/
public void updateRenderAngles() public void updateRenderAngles()
{ {
} }

View file

@ -82,9 +82,6 @@ public class RegHandler
@SubscribeEvent @SubscribeEvent
public static void registerSounds(Register<SoundEvent> event) public static void registerSounds(Register<SoundEvent> event)
{ {
/*
* CREEPERS
*/
// Smava Creeper // Smava Creeper
Spackenmobs.ENTITY_SMAVACREEPER_FUSE.setRegistryName(new ResourceLocation("spackenmobs:entities.smava_creeper.fuse")); Spackenmobs.ENTITY_SMAVACREEPER_FUSE.setRegistryName(new ResourceLocation("spackenmobs:entities.smava_creeper.fuse"));
event.getRegistry().register((SoundEvent)Spackenmobs.ENTITY_SMAVACREEPER_FUSE); event.getRegistry().register((SoundEvent)Spackenmobs.ENTITY_SMAVACREEPER_FUSE);
@ -101,9 +98,6 @@ public class RegHandler
Spackenmobs.ENTITY_ISLAMIST_HURT.setRegistryName(new ResourceLocation("spackenmobs:entities.islamist.hurt")); Spackenmobs.ENTITY_ISLAMIST_HURT.setRegistryName(new ResourceLocation("spackenmobs:entities.islamist.hurt"));
event.getRegistry().register((SoundEvent)Spackenmobs.ENTITY_ISLAMIST_HURT); event.getRegistry().register((SoundEvent)Spackenmobs.ENTITY_ISLAMIST_HURT);
/*
* ZOMBIES
*/
// Marcell D'Avis // Marcell D'Avis
Spackenmobs.ENTITY_MARCELLDAVIS_AMBIENT.setRegistryName(new ResourceLocation("spackenmobs:entities.marcell_davis.ambient")); Spackenmobs.ENTITY_MARCELLDAVIS_AMBIENT.setRegistryName(new ResourceLocation("spackenmobs:entities.marcell_davis.ambient"));
event.getRegistry().register((SoundEvent)Spackenmobs.ENTITY_MARCELLDAVIS_AMBIENT); event.getRegistry().register((SoundEvent)Spackenmobs.ENTITY_MARCELLDAVIS_AMBIENT);
@ -119,10 +113,7 @@ public class RegHandler
event.getRegistry().register((SoundEvent)Spackenmobs.ENTITY_MRBEAN_HURT); event.getRegistry().register((SoundEvent)Spackenmobs.ENTITY_MRBEAN_HURT);
Spackenmobs.ENTITY_MRBEAN_DEATH.setRegistryName(new ResourceLocation("spackenmobs:entities.mr_bean.death")); Spackenmobs.ENTITY_MRBEAN_DEATH.setRegistryName(new ResourceLocation("spackenmobs:entities.mr_bean.death"));
event.getRegistry().register((SoundEvent)Spackenmobs.ENTITY_MRBEAN_DEATH); event.getRegistry().register((SoundEvent)Spackenmobs.ENTITY_MRBEAN_DEATH);
/*
* SKELETONS
*/
// ApoRed // ApoRed
Spackenmobs.ENTITY_APORED_AMBIENT.setRegistryName(new ResourceLocation("spackenmobs:entities.apored.ambient")); Spackenmobs.ENTITY_APORED_AMBIENT.setRegistryName(new ResourceLocation("spackenmobs:entities.apored.ambient"));
event.getRegistry().register((SoundEvent)Spackenmobs.ENTITY_APORED_AMBIENT); event.getRegistry().register((SoundEvent)Spackenmobs.ENTITY_APORED_AMBIENT);
@ -130,10 +121,7 @@ public class RegHandler
event.getRegistry().register((SoundEvent)Spackenmobs.ENTITY_APORED_HURT); event.getRegistry().register((SoundEvent)Spackenmobs.ENTITY_APORED_HURT);
Spackenmobs.ENTITY_APORED_DEATH.setRegistryName(new ResourceLocation("spackenmobs:entities.apored.death")); Spackenmobs.ENTITY_APORED_DEATH.setRegistryName(new ResourceLocation("spackenmobs:entities.apored.death"));
event.getRegistry().register((SoundEvent)Spackenmobs.ENTITY_APORED_DEATH); event.getRegistry().register((SoundEvent)Spackenmobs.ENTITY_APORED_DEATH);
/*
* ZOMBIE PIGMEN
*/
// Drachenlord // Drachenlord
Spackenmobs.ENTITY_DRACHENLORD_AMBIENT.setRegistryName(new ResourceLocation("spackenmobs:entities.drachenlord.ambient")); Spackenmobs.ENTITY_DRACHENLORD_AMBIENT.setRegistryName(new ResourceLocation("spackenmobs:entities.drachenlord.ambient"));
event.getRegistry().register((SoundEvent)Spackenmobs.ENTITY_DRACHENLORD_AMBIENT); event.getRegistry().register((SoundEvent)Spackenmobs.ENTITY_DRACHENLORD_AMBIENT);
@ -143,10 +131,8 @@ public class RegHandler
event.getRegistry().register((SoundEvent)Spackenmobs.ENTITY_DRACHENLORD_DEATH); event.getRegistry().register((SoundEvent)Spackenmobs.ENTITY_DRACHENLORD_DEATH);
Spackenmobs.ENTITY_DRACHENLORD_ANGRY.setRegistryName(new ResourceLocation("spackenmobs:entities.drachenlord.angry")); Spackenmobs.ENTITY_DRACHENLORD_ANGRY.setRegistryName(new ResourceLocation("spackenmobs:entities.drachenlord.angry"));
event.getRegistry().register((SoundEvent)Spackenmobs.ENTITY_DRACHENLORD_ANGRY); event.getRegistry().register((SoundEvent)Spackenmobs.ENTITY_DRACHENLORD_ANGRY);
/* // Schalker
* SHULKER
*/
Spackenmobs.ENTITY_SCHALKER_AMBIENT.setRegistryName(new ResourceLocation("spackenmobs:entities.schalker.ambient")); Spackenmobs.ENTITY_SCHALKER_AMBIENT.setRegistryName(new ResourceLocation("spackenmobs:entities.schalker.ambient"));
event.getRegistry().register((SoundEvent)Spackenmobs.ENTITY_SCHALKER_AMBIENT); event.getRegistry().register((SoundEvent)Spackenmobs.ENTITY_SCHALKER_AMBIENT);
Spackenmobs.ENTITY_SCHALKER_HURT.setRegistryName(new ResourceLocation("spackenmobs:entities.schalker.hurt")); Spackenmobs.ENTITY_SCHALKER_HURT.setRegistryName(new ResourceLocation("spackenmobs:entities.schalker.hurt"));
@ -157,15 +143,15 @@ public class RegHandler
event.getRegistry().register((SoundEvent)Spackenmobs.ENTITY_SCHALKER_OPEN); event.getRegistry().register((SoundEvent)Spackenmobs.ENTITY_SCHALKER_OPEN);
Spackenmobs.ENTITY_SCHALKER_SHOOT.setRegistryName(new ResourceLocation("spackenmobs:entities.schalker.shoot")); Spackenmobs.ENTITY_SCHALKER_SHOOT.setRegistryName(new ResourceLocation("spackenmobs:entities.schalker.shoot"));
event.getRegistry().register((SoundEvent)Spackenmobs.ENTITY_SCHALKER_SHOOT); event.getRegistry().register((SoundEvent)Spackenmobs.ENTITY_SCHALKER_SHOOT);
/* // Jens
* BIPEDS
*/
Spackenmobs.ENTITY_JENS_AMBIENT.setRegistryName(new ResourceLocation("spackenmobs:entities.jens.ambient")); Spackenmobs.ENTITY_JENS_AMBIENT.setRegistryName(new ResourceLocation("spackenmobs:entities.jens.ambient"));
event.getRegistry().register((SoundEvent)Spackenmobs.ENTITY_JENS_AMBIENT); event.getRegistry().register((SoundEvent)Spackenmobs.ENTITY_JENS_AMBIENT);
Spackenmobs.ENTITY_JENS_HURT.setRegistryName(new ResourceLocation("spackenmobs:entities.jens.hurt")); Spackenmobs.ENTITY_JENS_HURT.setRegistryName(new ResourceLocation("spackenmobs:entities.jens.hurt"));
event.getRegistry().register((SoundEvent)Spackenmobs.ENTITY_JENS_HURT); event.getRegistry().register((SoundEvent)Spackenmobs.ENTITY_JENS_HURT);
Spackenmobs.ENTITY_JENS_DEATH.setRegistryName(new ResourceLocation("spackenmobs:entities.jens.death")); Spackenmobs.ENTITY_JENS_DEATH.setRegistryName(new ResourceLocation("spackenmobs:entities.jens.death"));
event.getRegistry().register((SoundEvent)Spackenmobs.ENTITY_JENS_DEATH); event.getRegistry().register((SoundEvent)Spackenmobs.ENTITY_JENS_DEATH);
Spackenmobs.ENTITY_JENS_EAT.setRegistryName(new ResourceLocation("spackenmobs:entities.jens.eat"));
event.getRegistry().register((SoundEvent)Spackenmobs.ENTITY_JENS_EAT);
} }
} }

View file

@ -16,7 +16,7 @@ import net.minecraftforge.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class RenderApoRed extends RenderSkeleton public class RenderApoRed extends RenderSkeleton
{ {
private static final ResourceLocation APORED_TEXTURES = new ResourceLocation("spackenmobs:textures/entities/apored.png"); private static final ResourceLocation APORED_TEXTURE = new ResourceLocation("spackenmobs:textures/entities/apored.png");
public static final Factory FACTORY = new Factory(); public static final Factory FACTORY = new Factory();
public RenderApoRed(RenderManager renderManagerIn) public RenderApoRed(RenderManager renderManagerIn)
@ -40,7 +40,7 @@ public class RenderApoRed extends RenderSkeleton
protected ResourceLocation getEntityTexture(AbstractSkeleton entity) protected ResourceLocation getEntityTexture(AbstractSkeleton entity)
{ {
return APORED_TEXTURES; return APORED_TEXTURE;
} }
public static class Factory implements IRenderFactory<EntityApoRed> public static class Factory implements IRenderFactory<EntityApoRed>

View file

@ -13,7 +13,7 @@ import net.minecraftforge.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class RenderIslamist extends RenderCreeper public class RenderIslamist extends RenderCreeper
{ {
private static final ResourceLocation ISLAMIST_TEXTURES = new ResourceLocation("spackenmobs:textures/entities/islamist.png"); private static final ResourceLocation ISLAMIST_TEXTURE = new ResourceLocation("spackenmobs:textures/entities/islamist.png");
public static final Factory FACTORY = new Factory(); public static final Factory FACTORY = new Factory();
public RenderIslamist(RenderManager renderManagerIn) public RenderIslamist(RenderManager renderManagerIn)
@ -24,7 +24,7 @@ public class RenderIslamist extends RenderCreeper
protected ResourceLocation getEntityTexture(EntityCreeper entity) protected ResourceLocation getEntityTexture(EntityCreeper entity)
{ {
return ISLAMIST_TEXTURES; return ISLAMIST_TEXTURE;
} }
public static class Factory implements IRenderFactory<EntityIslamist> public static class Factory implements IRenderFactory<EntityIslamist>

View file

@ -14,7 +14,7 @@ import net.minecraftforge.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class RenderMrBean extends RenderZombie public class RenderMrBean extends RenderZombie
{ {
private static final ResourceLocation MRBEAN_TEXTURES = new ResourceLocation("spackenmobs:textures/entities/mr_bean.png"); private static final ResourceLocation MRBEAN_TEXTURE = new ResourceLocation("spackenmobs:textures/entities/mr_bean.png");
public static final Factory FACTORY = new Factory(); public static final Factory FACTORY = new Factory();
public RenderMrBean(RenderManager renderManagerIn) public RenderMrBean(RenderManager renderManagerIn)
@ -33,7 +33,7 @@ public class RenderMrBean extends RenderZombie
protected ResourceLocation getEntityTexture(EntityZombie entity) protected ResourceLocation getEntityTexture(EntityZombie entity)
{ {
return MRBEAN_TEXTURES; return MRBEAN_TEXTURE;
} }
public static class Factory implements IRenderFactory<EntityMrBean> public static class Factory implements IRenderFactory<EntityMrBean>

View file

@ -21,21 +21,18 @@ public class RenderSchalker extends RenderLiving<EntitySchalker>
{ {
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"), 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"), 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"), 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")}; 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"), 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"), 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"), 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")};
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 ModelShulker(), 0.0F); super(p_i47194_1_, new ModelShulker(), 0.0F);
this.addLayer(new RenderSchalker.HeadLayer()); this.addLayer(new RenderSchalker.HeadLayer());
} }
public ModelShulker getMainModel() public ModelShulker getMainModel()
{ {
return (ModelShulker)super.getMainModel(); return (ModelShulker)super.getMainModel();
} }
/**
* Renders the desired {@code T} type Entity.
*/
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();
@ -56,7 +53,7 @@ public class RenderSchalker extends RenderLiving<EntitySchalker>
super.doRender(entity, x, y, z, entityYaw, partialTicks); super.doRender(entity, x, y, z, entityYaw, partialTicks);
} }
} }
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))
@ -81,15 +78,12 @@ public class RenderSchalker extends RenderLiving<EntitySchalker>
return false; return false;
} }
} }
/**
* Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture.
*/
protected ResourceLocation getEntityTexture(EntitySchalker entity) protected ResourceLocation getEntityTexture(EntitySchalker entity)
{ {
return SCHALKER_TEXTURE[entity.getColor().getMetadata()]; return SCHALKER_TEXTURE[entity.getColor().getMetadata()];
} }
protected void applyRotations(EntitySchalker entityLiving, float p_77043_2_, float rotationYaw, float partialTicks) protected void applyRotations(EntitySchalker entityLiving, float p_77043_2_, float rotationYaw, float partialTicks)
{ {
super.applyRotations(entityLiving, p_77043_2_, rotationYaw, partialTicks); super.applyRotations(entityLiving, p_77043_2_, rotationYaw, partialTicks);
@ -123,23 +117,20 @@ public class RenderSchalker extends RenderLiving<EntitySchalker>
GlStateManager.rotate(180.0F, 1.0F, 0.0F, 0.0F); GlStateManager.rotate(180.0F, 1.0F, 0.0F, 0.0F);
} }
} }
/**
* Allows the render to do state modifications necessary before the model is rendered.
*/
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);
} }
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
class HeadLayer implements LayerRenderer<EntitySchalker> class HeadLayer implements LayerRenderer<EntitySchalker>
{ {
private HeadLayer() private HeadLayer()
{ {
} }
public void doRenderLayer(EntitySchalker entitylivingbaseIn, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale) public void doRenderLayer(EntitySchalker entitylivingbaseIn, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale)
{ {
GlStateManager.pushMatrix(); GlStateManager.pushMatrix();
@ -182,7 +173,7 @@ public class RenderSchalker extends RenderLiving<EntitySchalker>
modelrenderer.render(scale); modelrenderer.render(scale);
GlStateManager.popMatrix(); GlStateManager.popMatrix();
} }
public boolean shouldCombineTextures() public boolean shouldCombineTextures()
{ {
return false; return false;

View file

@ -5,4 +5,6 @@ entity.apored.name=ApoRed
entity.mr_bean.name=Mr. Bean entity.mr_bean.name=Mr. Bean
entity.drachenlord.name=Drachenlord entity.drachenlord.name=Drachenlord
entity.schalker.name=Schalker entity.schalker.name=Schalker
entity.jens.name=Jens entity.jens.name=Jens
item.spackenmobs.ram.name=RAM
item.spackenmobs.ram_on_a_stick.name=RAM-Rute

View file

@ -5,4 +5,6 @@ entity.apored.name=ApoRed
entity.mr_bean.name=Mr. Bean entity.mr_bean.name=Mr. Bean
entity.drachenlord.name=Drachenlord entity.drachenlord.name=Drachenlord
entity.schalker.name=Schalker entity.schalker.name=Schalker
entity.jens.name=Jens entity.jens.name=Jens
item.spackenmobs.ram.name=RAM
item.spackenmobs.ram_on_a_stick.name=RAM on a Stick

View file

@ -1,5 +1,5 @@
{ {
"parent": "item/generated", "parent": "item/handheld_rod",
"textures": { "textures": {
"layer0": "spackenmobs:items/ram_on_a_stick" "layer0": "spackenmobs:items/ram_on_a_stick"
} }

File diff suppressed because it is too large Load diff

Some files were not shown because too many files have changed in this diff Show more