Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import net.minecraftforge.fml.relauncher.SideOnly;
- import net.minecraftforge.fml.relauncher.Side;
- import net.minecraftforge.fml.common.registry.EntityRegistry;
- import net.minecraftforge.fml.common.event.FMLServerStartingEvent;
- import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
- import net.minecraftforge.fml.common.event.FMLInitializationEvent;
- import net.minecraftforge.fml.client.registry.RenderingRegistry;
- import net.minecraft.world.biome.Biome;
- import net.minecraft.world.World;
- import net.minecraft.util.ResourceLocation;
- import net.minecraft.util.EnumHand;
- import net.minecraft.util.DamageSource;
- import net.minecraft.item.ItemStack;
- import net.minecraft.item.Item;
- import net.minecraft.entity.player.EntityPlayer;
- import net.minecraft.entity.monster.EntityMob;
- import net.minecraft.entity.effect.EntityLightningBolt;
- import net.minecraft.entity.ai.EntityAIWander;
- import net.minecraft.entity.ai.EntityAISwimming;
- import net.minecraft.entity.ai.EntityAINearestAttackableTarget;
- import net.minecraft.entity.ai.EntityAILookIdle;
- import net.minecraft.entity.ai.EntityAIHurtByTarget;
- import net.minecraft.entity.ai.EntityAIAttackMelee;
- import net.minecraft.entity.SharedMonsterAttributes;
- import net.minecraft.entity.EntityLivingBase;
- import net.minecraft.entity.Entity;
- import net.minecraft.client.renderer.entity.RenderLiving;
- import net.minecraft.client.model.ModelRenderer;
- import net.minecraft.client.model.ModelBase;
- import net.minecraft.client.Minecraft;
- import java.util.Random;
- import java.util.Iterator;
- import java.util.ArrayList;
- @SuppressWarnings("unchecked")
- public class mcreator_iceBoss {
- public int mobid = 72;
- public static Object instance;
- public void load(FMLInitializationEvent event) {
- }
- public void generateNether(World world, Random random, int chunkX, int chunkZ) {
- }
- public void generateSurface(World world, Random random, int chunkX, int chunkZ) {
- }
- public int addFuel(ItemStack fuel) {
- return 0;
- }
- @SideOnly(Side.CLIENT)
- public void registerRenderers() {
- RenderLiving customRender = new RenderLiving(Minecraft.getMinecraft().getRenderManager(), new mcreator_iceBoss.ModelIceBoss(), 0) {
- protected ResourceLocation getEntityTexture(Entity par1Entity) {
- return new ResourceLocation("IceBoss.png");
- }
- };
- RenderingRegistry.registerEntityRenderingHandler(mcreator_iceBoss.EntityiceBoss.class, customRender);
- }
- public void serverLoad(FMLServerStartingEvent event) {
- }
- public void preInit(FMLPreInitializationEvent event) {
- EntityRegistry.registerModEntity(new ResourceLocation("testenvironmentmod:iceboss"), mcreator_iceBoss.EntityiceBoss.class, "iceboss", mobid,
- instance, 64, 1, true, (255 << 16) + (255 << 8) + 255, (255 << 16) + (255 << 8) + 255);
- }
- public static Biome[] allbiomes(net.minecraft.util.registry.RegistryNamespaced<ResourceLocation, Biome> in) {
- Iterator<Biome> itr = in.iterator();
- ArrayList<Biome> ls = new ArrayList<Biome>();
- while (itr.hasNext()) {
- ls.add(itr.next());
- }
- return ls.toArray(new Biome[ls.size()]);
- }
- public static class EntityiceBoss extends EntityMob {
- World world = null;
- public EntityiceBoss(World var1) {
- super(var1);
- world = var1;
- experienceValue = 5;
- this.isImmuneToFire = false;
- addRandomArmor();
- setNoAI(!true);
- this.tasks.addTask(1, new EntityAIWander(this, 1));
- this.tasks.addTask(2, new EntityAILookIdle(this));
- this.tasks.addTask(3, new EntityAISwimming(this));
- this.targetTasks.addTask(4, new EntityAIHurtByTarget(this, false));
- this.tasks.addTask(5, new EntityAIAttackMelee(this, 1.2, true));
- this.targetTasks.addTask(6, new EntityAINearestAttackableTarget(this, EntityPlayer.class, true, true));
- }
- protected void applyEntityAttributes() {
- super.applyEntityAttributes();
- this.getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).setBaseValue(0.25D);
- this.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).setBaseValue(10D);
- if (this.getEntityAttribute(SharedMonsterAttributes.ATTACK_DAMAGE) != null)
- this.getEntityAttribute(SharedMonsterAttributes.ATTACK_DAMAGE).setBaseValue(3D);
- }
- protected void addRandomArmor() {
- }
- @Override
- protected Item getDropItem() {
- return null;
- }
- @Override
- protected net.minecraft.util.SoundEvent getAmbientSound() {
- return (net.minecraft.util.SoundEvent) net.minecraft.util.SoundEvent.REGISTRY.getObject(new ResourceLocation(""));
- }
- @Override
- protected net.minecraft.util.SoundEvent getHurtSound(DamageSource ds) {
- return (net.minecraft.util.SoundEvent) net.minecraft.util.SoundEvent.REGISTRY.getObject(new ResourceLocation("game.neutral.hurt"));
- }
- @Override
- protected net.minecraft.util.SoundEvent getDeathSound() {
- return (net.minecraft.util.SoundEvent) net.minecraft.util.SoundEvent.REGISTRY.getObject(new ResourceLocation("game.neutral.die"));
- }
- @Override
- public void onStruckByLightning(EntityLightningBolt entityLightningBolt) {
- super.onStruckByLightning(entityLightningBolt);
- int i = (int) this.posX;
- int j = (int) this.posY;
- int k = (int) this.posZ;
- Entity entity = this;
- }
- @Override
- public void fall(float l, float d) {
- super.fall(l, d);
- int i = (int) this.posX;
- int j = (int) this.posY;
- int k = (int) this.posZ;
- Entity entity = this;
- }
- /**
- * Called when the entity is attacked.
- */
- @Override
- public boolean attackEntityFrom(DamageSource source, float amount) {
- boolean retval = super.attackEntityFrom(source, amount);
- int i = (int) this.posX;
- int j = (int) this.posY;
- int k = (int) this.posZ;
- Entity entity = this;
- return retval;
- }
- @Override
- public void onDeath(DamageSource source) {
- super.onDeath(source);
- int i = (int) this.posX;
- int j = (int) this.posY;
- int k = (int) this.posZ;
- Entity entity = this;
- }
- @Override
- public boolean processInteract(EntityPlayer entity, EnumHand hand) {
- boolean retval = super.processInteract(entity, hand);
- int i = (int) this.posX;
- int j = (int) this.posY;
- int k = (int) this.posZ;
- ItemStack itemstack = entity.getHeldItem(hand);
- return retval;
- }
- @Override
- public void onKillEntity(EntityLivingBase entity) {
- super.onKillEntity(entity);
- int i = (int) this.posX;
- int j = (int) this.posY;
- int k = (int) this.posZ;
- }
- @Override
- public void onEntityUpdate() {
- super.onEntityUpdate();
- int i = (int) this.posX;
- int j = (int) this.posY;
- int k = (int) this.posZ;
- Entity entity = this;
- }
- @Override
- public void onCollideWithPlayer(EntityPlayer entity) {
- super.onCollideWithPlayer(entity);
- int i = (int) this.posX;
- int j = (int) this.posY;
- int k = (int) this.posZ;
- }
- @Override
- protected float getSoundVolume() {
- return 1.0F;
- }
- }
- // Date: 14/08/2018 20:14:55
- // Template version 1.1
- // Java generated by Techne
- // Keep in mind that you still need to fill in some blanks
- // - ZeuX
- public static class ModelIceBoss extends ModelBase {
- // fields
- ModelRenderer Face;
- ModelRenderer Body1;
- ModelRenderer Body2;
- ModelRenderer ArmLeft;
- ModelRenderer ArmRight;
- ModelRenderer LegLeft;
- ModelRenderer LegRight;
- public ModelIceBoss() {
- textureWidth = 128;
- textureHeight = 64;
- Face = new ModelRenderer(this, 0, 17);
- Face.addBox(0F, 0F, 0F, 6, 7, 6);
- Face.setRotationPoint(-3F, -11F, -5F);
- Face.setTextureSize(128, 64);
- Face.mirror = true;
- setRotation(Face, 0F, 0F, 0F);
- Body1 = new ModelRenderer(this, 0, 33);
- Body1.addBox(0F, 0F, 0F, 10, 8, 4);
- Body1.setRotationPoint(-5F, 1F, -3F);
- Body1.setTextureSize(128, 64);
- Body1.mirror = true;
- setRotation(Body1, 0F, 0F, 0F);
- Body2 = new ModelRenderer(this, 0, 47);
- Body2.addBox(0F, 0F, 0F, 10, 5, 5);
- Body2.setRotationPoint(-5F, -4F, -4F);
- Body2.setTextureSize(128, 64);
- Body2.mirror = true;
- setRotation(Body2, 0F, 0F, 0F);
- ArmLeft = new ModelRenderer(this, 30, 15);
- ArmLeft.addBox(0F, 0F, 0F, 2, 15, 2);
- ArmLeft.setRotationPoint(5F, -4F, -2F);
- ArmLeft.setTextureSize(128, 64);
- ArmLeft.mirror = true;
- setRotation(ArmLeft, 0F, 0F, 0F);
- ArmRight = new ModelRenderer(this, 30, 15);
- ArmRight.addBox(0F, 0F, 0F, 2, 15, 2);
- ArmRight.setRotationPoint(-7F, -4F, -2F);
- ArmRight.setTextureSize(128, 64);
- ArmRight.mirror = true;
- setRotation(ArmRight, 0F, 0F, 0F);
- LegLeft = new ModelRenderer(this, 0, 0);
- LegLeft.addBox(0F, 0F, 0F, 2, 15, 2);
- LegLeft.setRotationPoint(3F, 9F, -2F);
- LegLeft.setTextureSize(128, 64);
- LegLeft.mirror = true;
- setRotation(LegLeft, 0F, 0F, 0F);
- LegRight = new ModelRenderer(this, 0, 0);
- LegRight.addBox(0F, 0F, 0F, 2, 15, 2);
- LegRight.setRotationPoint(-5F, 9F, -2F);
- LegRight.setTextureSize(128, 64);
- LegRight.mirror = true;
- setRotation(LegRight, 0F, 0F, 0F);
- }
- public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
- super.render(entity, f, f1, f2, f3, f4, f5);
- setRotationAngles(f, f1, f2, f3, f4, f5, entity);
- Face.render(f5);
- Body1.render(f5);
- Body2.render(f5);
- ArmLeft.render(f5);
- ArmRight.render(f5);
- LegLeft.render(f5);
- LegRight.render(f5);
- }
- private void setRotation(ModelRenderer model, float x, float y, float z) {
- model.rotateAngleX = x;
- model.rotateAngleY = y;
- model.rotateAngleZ = z;
- }
- public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) {
- super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement