Jump to content

alexschopbarteld

Members
  • Posts

    53
  • Joined

  • Last visited

Everything posted by alexschopbarteld

  1. Wait, i think i know what happened, leftleg.mirror=true; then leftleg.mirror=false; then Leftleg.mirror=true; caused the render to freak out... works fine when i deleted 2 Thanks!
  2. Leftleg.mirror =true;
  3. Hey, i created a mob model in techne and later put it into mccreator so i wouldnt have to code everything by hand (since i am making around 20 mobs for a modpack) first 2 were fine but the third first didnt work at all but when i later manually fixed the code by comparing it to working mobs tutorials ect. it worked! well, kind off... it now doenst crash straight away but it crashen when trying to render the model... idk how to fix this, help would be appriciated. mob+model: package mod.mcreator; 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.math.MathHelper; 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.init.Items; import net.minecraft.entity.player.EntityPlayerMP; 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.EnumCreatureType; 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_anatomy { public int mobid = 0; 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_anatomy.ModelNew(), 0) { protected ResourceLocation getEntityTexture(Entity par1Entity) { return new ResourceLocation("anatomy.png"); } }; RenderingRegistry.registerEntityRenderingHandler(mcreator_anatomy.Entityanatomy.class, customRender); } public void serverLoad(FMLServerStartingEvent event) { } public void preInit(FMLPreInitializationEvent event) { int entityID = MathHelper.getRandomUUID().hashCode(); mobid = entityID; EntityRegistry.registerModEntity(new ResourceLocation("testenvironmentmod:anatomy"), mcreator_anatomy.Entityanatomy.class, "anatomy", entityID, instance, 64, 1, true, (255 << 16) + (255 << 8) + 255, (255 << 16) + (255 << 8) + 255); EntityRegistry.addSpawn(mcreator_anatomy.Entityanatomy.class, 12, 3, 15, EnumCreatureType.MONSTER, clean(Biome.REGISTRY)); } public static Biome[] clean(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 Entityanatomy extends EntityMob { World world = null; public Entityanatomy(World var1) { super(var1); world = var1; experienceValue = 5; this.isImmuneToFire = false; addRandomArmor(); setNoAI(!true); this.tasks.addTask(0, new EntityAISwimming(this)); this.tasks.addTask(6, new EntityAIWander(this, 1.0D)); this.tasks.addTask(8, new EntityAILookIdle(this)); this.targetTasks.addTask(20, new EntityAINearestAttackableTarget(this, EntityPlayer.class, true)); this.targetTasks.addTask(21, new EntityAIHurtByTarget(this, false)); this.targetTasks.addTask(20, new EntityAINearestAttackableTarget(this, EntityPlayerMP.class, true)); this.targetTasks.addTask(21, new EntityAIHurtByTarget(this, false)); this.tasks.addTask(9, new EntityAIAttackMelee(this, 1.0D, false)); } protected void applyEntityAttributes() { super.applyEntityAttributes(); this.getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).setBaseValue(0.75D); this.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).setBaseValue(10D); if (this.getEntityAttribute(SharedMonsterAttributes.ATTACK_DAMAGE) != null) this.getEntityAttribute(SharedMonsterAttributes.ATTACK_DAMAGE).setBaseValue(2D); } protected void addRandomArmor() { } @Override protected Item getDropItem() { return new ItemStack(Items.ROTTEN_FLESH).getItem(); } @Override protected net.minecraft.util.SoundEvent getAmbientSound() { return (net.minecraft.util.SoundEvent) net.minecraft.util.SoundEvent.REGISTRY.getObject(new ResourceLocation("entity.zombie.ambient")); } @Override protected net.minecraft.util.SoundEvent getHurtSound() { return (net.minecraft.util.SoundEvent) net.minecraft.util.SoundEvent.REGISTRY.getObject(new ResourceLocation("entity.zombie.hurt")); } @Override protected net.minecraft.util.SoundEvent getDeathSound() { return (net.minecraft.util.SoundEvent) net.minecraft.util.SoundEvent.REGISTRY.getObject(new ResourceLocation("entity.zombie.death")); } @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; super.fall(l, d); Entity entity = this; } @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) { super.processInteract(entity, hand); int i = (int) this.posX; int j = (int) this.posY; int k = (int) this.posZ; return true; } @Override protected float getSoundVolume() { return 1.0F; } } // Date: 23-3-2017 14:40:30 // Template version 1.1 // Java generated by Techne // Keep in mind that you still need to fill in some blanks // - ZeuX public static class ModelNew extends ModelBase { // fields ModelRenderer Shape1; ModelRenderer Shape12; ModelRenderer Shape2; ModelRenderer Shape10; ModelRenderer Shape3; ModelRenderer Shape14; ModelRenderer Shape4; ModelRenderer Shape19; ModelRenderer Shape6; ModelRenderer rightarm; ModelRenderer Shape5; ModelRenderer leftarm; ModelRenderer Shape8; ModelRenderer rightleg; ModelRenderer Shape7; ModelRenderer leftleg; ModelRenderer Shape9; ModelRenderer Shape29; ModelRenderer Shape27; ModelRenderer Shape28; ModelRenderer Shape25; ModelRenderer Shape24; ModelRenderer Shape23; ModelRenderer Shape26; ModelRenderer Shape11; ModelRenderer Shape21; ModelRenderer Shape13; ModelRenderer Shape20; ModelRenderer Shape18; ModelRenderer Shape22; ModelRenderer Shape15; ModelRenderer Shape17; ModelRenderer Shape16; public ModelNew() { textureWidth = 64; textureHeight = 32; Shape1 = new ModelRenderer(this, 0, 12); Shape1.addBox(0F, 0F, 0F, 8, 2, 4); Shape1.setRotationPoint(-4F, 11F, -2F); Shape1.setTextureSize(64, 32); Shape1.mirror = true; setRotation(Shape1, 0F, 0F, 0F); Shape12 = new ModelRenderer(this, 42, 22); Shape12.addBox(0F, 0F, 0F, 2, 1, 1); Shape12.setRotationPoint(-1F, 8F, -0.5F); Shape12.setTextureSize(64, 32); Shape12.mirror = true; setRotation(Shape12, 0F, 0F, 0F); Shape2 = new ModelRenderer(this, 14, 6); Shape2.addBox(0F, 0F, 0F, 5, 1, 4); Shape2.setRotationPoint(-4F, 10F, -2F); Shape2.setTextureSize(64, 32); Shape2.mirror = true; setRotation(Shape2, 0F, 0F, 0F); Shape10 = new ModelRenderer(this, 30, 0); Shape10.addBox(0F, 0F, 0F, 1, 1, 4); Shape10.setRotationPoint(-4F, 7F, -2F); Shape10.setTextureSize(64, 32); Shape10.mirror = true; setRotation(Shape10, 0F, 0F, 0F); Shape3 = new ModelRenderer(this, 16, 0); Shape3.addBox(0F, 0F, 0F, 3, 1, 4); Shape3.setRotationPoint(-4F, 9F, -2F); Shape3.setTextureSize(64, 32); Shape3.mirror = true; setRotation(Shape3, 0F, 0F, 0F); Shape14 = new ModelRenderer(this, 42, 26); Shape14.addBox(0F, 0F, 0F, 2, 1, 1); Shape14.setRotationPoint(-1F, 4F, -0.5F); Shape14.setTextureSize(64, 32); Shape14.mirror = true; setRotation(Shape14, 0F, 0F, 0F); Shape4 = new ModelRenderer(this, 16, 17); Shape4.addBox(0F, 0F, 0F, 2, 1, 4); Shape4.setRotationPoint(-4F, 8F, -2F); Shape4.setTextureSize(64, 32); Shape4.mirror = true; setRotation(Shape4, 0F, 0F, 0F); Shape19 = new ModelRenderer(this, 60, 4); Shape19.addBox(0F, 0F, 0F, 1, 1, 1); Shape19.setRotationPoint(6F, 5F, 0F); Shape19.setTextureSize(64, 32); Shape19.mirror = true; setRotation(Shape19, 0F, 0F, 0F); Shape6 = new ModelRenderer(this, 16, 21); Shape6.addBox(0F, 0F, 0F, 6, 1, 4); Shape6.setRotationPoint(-4F, 2F, -2F); Shape6.setTextureSize(64, 32); Shape6.mirror = true; setRotation(Shape6, 0F, 0F, 0F); rightarm = new ModelRenderer(this, 48, 17); rightarm.addBox(-3F, -2F, -2F, 4, 11, 4); rightarm.setRotationPoint(-5F, 2F, 0F); rightarm.setTextureSize(64, 32); rightarm.mirror = true; setRotation(rightarm, 0F, 0F, 0F); Shape5 = new ModelRenderer(this, 16, 26); Shape5.addBox(0F, 0F, 0F, 8, 2, 4); Shape5.setRotationPoint(-4F, 0F, -2F); Shape5.setTextureSize(64, 32); Shape5.mirror = true; setRotation(Shape5, 0F, 0F, 0F); leftarm = new ModelRenderer(this, 48, 17); leftarm.addBox(-1F, -2F, -2F, 4, 3, 4); leftarm.setRotationPoint(5F, 2F, 0F); leftarm.setTextureSize(64, 32); leftarm.mirror = true; setRotation(leftarm, 0F, 0F, 0F); Shape8 = new ModelRenderer(this, 0, 6); Shape8.addBox(0F, 0F, 0F, 3, 1, 4); Shape8.setRotationPoint(-4F, 4F, -2F); Shape8.setTextureSize(64, 32); Shape8.mirror = true; setRotation(Shape8, 0F, 0F, 0F); rightleg = new ModelRenderer(this, 0, 17); rightleg.addBox(-2F, 0F, -2F, 4, 11, 4); rightleg.setRotationPoint(-2F, 13F, 0F); rightleg.setTextureSize(64, 32); rightleg.mirror = true; setRotation(rightleg, 0F, 0F, 0F); Shape7 = new ModelRenderer(this, 28, 16); Shape7.addBox(0F, 0F, 0F, 4, 1, 4); Shape7.setRotationPoint(-4F, 3F, -2F); Shape7.setTextureSize(64, 32); Shape7.mirror = true; setRotation(Shape7, 0F, 0F, 0F); leftleg.mirror = true; leftleg = new ModelRenderer(this, 0, 17); leftleg.addBox(-2F, 0F, -2F, 4, 11, 4); leftleg.setRotationPoint(2F, 13F, 0F); leftleg.setTextureSize(64, 32); leftleg.mirror = true; setRotation(leftleg, 0F, 0F, 0F); leftleg.mirror = false; Shape9 = new ModelRenderer(this, 4, 0); Shape9.addBox(0F, 0F, 0F, 2, 2, 4); Shape9.setRotationPoint(-4F, 5F, -2F); Shape9.setTextureSize(64, 32); Shape9.mirror = true; setRotation(Shape9, 0F, 0F, 0F); Shape29 = new ModelRenderer(this, 0, 0); Shape29.addBox(0F, -1F, -2F, 1, 1, 1); Shape29.setRotationPoint(0F, 0F, 0F); Shape29.setTextureSize(64, 32); Shape29.mirror = true; setRotation(Shape29, 0F, 0F, 0F); Shape27 = new ModelRenderer(this, 0, 0); Shape27.addBox(0F, 0F, 0F, 1, 1, 1); Shape27.setRotationPoint(-2F, -1F, -1F); Shape27.setTextureSize(64, 32); Shape27.mirror = true; setRotation(Shape27, 0F, 0F, 0F); Shape28 = new ModelRenderer(this, 0, 14); Shape28.addBox(0F, 0F, 0F, 4, 1, 1); Shape28.setRotationPoint(-2F, -1F, 1F); Shape28.setTextureSize(64, 32); Shape28.mirror = true; setRotation(Shape28, 0F, 0F, 0F); Shape25 = new ModelRenderer(this, 0, 0); Shape25.addBox(0F, 0F, 0F, 1, 3, 1); Shape25.setRotationPoint(-2F, -3F, 0F); Shape25.setTextureSize(64, 32); Shape25.mirror = true; setRotation(Shape25, 0F, 0F, 0F); Shape24 = new ModelRenderer(this, 0, 0); Shape24.addBox(0F, 0F, 0F, 1, 2, 1); Shape24.setRotationPoint(1F, -2F, 0F); Shape24.setTextureSize(64, 32); Shape24.mirror = true; setRotation(Shape24, 0F, 0F, 0F); Shape23 = new ModelRenderer(this, 0, 0); Shape23.addBox(0F, 0F, 0F, 1, 1, 1); Shape23.setRotationPoint(1F, -1F, -1F); Shape23.setTextureSize(64, 32); Shape23.mirror = true; setRotation(Shape23, 0F, 0F, 0F); Shape26 = new ModelRenderer(this, 0, 0); Shape26.addBox(0F, 0F, 0F, 1, 1, 1); Shape26.setRotationPoint(0F, 0F, 0F); Shape26.setTextureSize(64, 32); Shape26.mirror = true; setRotation(Shape26, 0F, 0F, 0F); Shape11 = new ModelRenderer(this, 56, 0); Shape11.addBox(0F, 0F, 0F, 1, 7, 1); Shape11.setRotationPoint(-0.5F, 3F, -0.5F); Shape11.setTextureSize(64, 32); Shape11.mirror = true; setRotation(Shape11, 0F, 0F, 0F); Shape21 = new ModelRenderer(this, 0, 0); Shape21.addBox(0F, 0F, 0F, 1, 2, 1); Shape21.setRotationPoint(7F, 3F, 1F); Shape21.setTextureSize(64, 32); Shape21.mirror = true; setRotation(Shape21, 0F, 0F, 0F); Shape13 = new ModelRenderer(this, 42, 24); Shape13.addBox(0F, 0F, 0F, 2, 1, 1); Shape13.setRotationPoint(-1F, 6F, -0.5F); Shape13.setTextureSize(64, 32); Shape13.mirror = true; setRotation(Shape13, 0F, 0F, 0F); Shape20 = new ModelRenderer(this, 0, 4); Shape20.addBox(0F, 0F, 0F, 1, 1, 1); Shape20.setRotationPoint(5F, 3F, 1F); Shape20.setTextureSize(64, 32); Shape20.mirror = true; setRotation(Shape20, 0F, 0F, 0F); Shape18 = new ModelRenderer(this, 36, 22); Shape18.addBox(0F, 0F, 0F, 1, 2, 2); Shape18.setRotationPoint(6F, 3F, -1F); Shape18.setTextureSize(64, 32); Shape18.mirror = true; setRotation(Shape18, 0F, 0F, 0F); Shape22 = new ModelRenderer(this, 0, 0); Shape22.addBox(0F, 0F, 0F, 1, 1, 1); Shape22.setRotationPoint(0F, -1F, 0F); Shape22.setTextureSize(64, 32); Shape22.mirror = true; setRotation(Shape22, 0F, 0F, 0F); Shape15 = new ModelRenderer(this, 40, 29); Shape15.addBox(0F, 0F, 0F, 2, 1, 2); Shape15.setRotationPoint(4F, 3F, -2F); Shape15.setTextureSize(64, 32); Shape15.mirror = true; setRotation(Shape15, 0F, 0F, 0F); Shape17 = new ModelRenderer(this, 60, 2); Shape17.addBox(0F, 0F, 0F, 1, 1, 1); Shape17.setRotationPoint(7F, 3F, -2F); Shape17.setTextureSize(64, 32); Shape17.mirror = true; setRotation(Shape17, 0F, 0F, 0F); Shape16 = new ModelRenderer(this, 60, 0); Shape16.addBox(0F, 0F, 0F, 1, 1, 1); Shape16.setRotationPoint(5F, 4F, -2F); Shape16.setTextureSize(64, 32); Shape16.mirror = true; setRotation(Shape16, 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); Shape1.render(f5); Shape12.render(f5); Shape2.render(f5); Shape10.render(f5); Shape3.render(f5); Shape14.render(f5); Shape4.render(f5); Shape19.render(f5); Shape6.render(f5); rightarm.render(f5); Shape5.render(f5); leftarm.render(f5); Shape8.render(f5); rightleg.render(f5); Shape7.render(f5); leftleg.render(f5); Shape9.render(f5); Shape29.render(f5); Shape27.render(f5); Shape28.render(f5); Shape25.render(f5); Shape24.render(f5); Shape23.render(f5); Shape26.render(f5); Shape11.render(f5); Shape21.render(f5); Shape13.render(f5); Shape20.render(f5); Shape18.render(f5); Shape22.render(f5); Shape15.render(f5); Shape17.render(f5); Shape16.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 e) { super.setRotationAngles(f, f1, f2, f3, f4, f5, e); this.leftleg.rotateAngleX = MathHelper.cos(f * 1.0F) * -1.0F * f1; this.rightleg.rotateAngleX = MathHelper.cos(f * 1.0F) * 1.0F * f1; this.rightarm.rotateAngleX = MathHelper.cos(f * 0.6662F + (float) Math.PI) * 2.0F * f1 * 0.5F; } } } error: main mod class: package mod.mcreator; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.common.registry.GameRegistry; import net.minecraftforge.fml.common.network.NetworkRegistry; import net.minecraftforge.fml.common.network.IGuiHandler; 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.common.SidedProxy; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod.Instance; import net.minecraftforge.fml.common.Mod.EventHandler; import net.minecraftforge.fml.common.IWorldGenerator; import net.minecraftforge.fml.common.IFuelHandler; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.client.model.obj.OBJLoader; import net.minecraft.world.chunk.IChunkProvider; import net.minecraft.world.chunk.IChunkGenerator; import net.minecraft.world.World; import net.minecraft.item.ItemStack; import net.minecraft.entity.player.EntityPlayer; import java.util.Random; @Mod(modid = TestEnvironmentMod.MODID, version = TestEnvironmentMod.VERSION) public class TestEnvironmentMod implements IFuelHandler, IWorldGenerator { public static final String MODID = "testenvironmentmod"; public static final String VERSION = "1.0"; @SidedProxy(clientSide = "mod.mcreator.ClientProxyTestEnvironmentMod", serverSide = "mod.mcreator.CommonProxyTestEnvironmentMod") public static CommonProxyTestEnvironmentMod proxy; @Instance(MODID) public static TestEnvironmentMod instance; mcreator_crawler mcreator_0 = new mcreator_crawler(); mcreator_runner mcreator_1 = new mcreator_runner(); mcreator_lucille mcreator_2 = new mcreator_lucille(); mcreator_anatomy mcreator_3 = new mcreator_anatomy(); @Override public int getBurnTime(ItemStack fuel) { if (mcreator_0.addFuel(fuel) != 0) return mcreator_0.addFuel(fuel); if (mcreator_1.addFuel(fuel) != 0) return mcreator_1.addFuel(fuel); if (mcreator_2.addFuel(fuel) != 0) return mcreator_2.addFuel(fuel); if (mcreator_3.addFuel(fuel) != 0) return mcreator_3.addFuel(fuel); return 0; } @Override public void generate(Random random, int chunkX, int chunkZ, World world, IChunkGenerator chunkGenerator, IChunkProvider chunkProvider) { chunkX = chunkX * 16; chunkZ = chunkZ * 16; if (world.provider.getDimension() == -1) mcreator_0.generateNether(world, random, chunkX, chunkZ); if (world.provider.getDimension() == 0) mcreator_0.generateSurface(world, random, chunkX, chunkZ); if (world.provider.getDimension() == -1) mcreator_1.generateNether(world, random, chunkX, chunkZ); if (world.provider.getDimension() == 0) mcreator_1.generateSurface(world, random, chunkX, chunkZ); if (world.provider.getDimension() == -1) mcreator_2.generateNether(world, random, chunkX, chunkZ); if (world.provider.getDimension() == 0) mcreator_2.generateSurface(world, random, chunkX, chunkZ); if (world.provider.getDimension() == -1) mcreator_3.generateNether(world, random, chunkX, chunkZ); if (world.provider.getDimension() == 0) mcreator_3.generateSurface(world, random, chunkX, chunkZ); } @EventHandler public void load(FMLInitializationEvent event) { GameRegistry.registerFuelHandler(this); GameRegistry.registerWorldGenerator(this, 1); if (event.getSide() == Side.CLIENT) { OBJLoader.INSTANCE.addDomain("testenvironmentmod"); } MinecraftForge.EVENT_BUS.register(new mcreator_GlobalEventsTestEnvironmentMod()); NetworkRegistry.INSTANCE.registerGuiHandler(this, new GuiHandler()); mcreator_0.load(event); mcreator_1.load(event); mcreator_2.load(event); mcreator_3.load(event); proxy.registerRenderers(this); } @EventHandler public void serverLoad(FMLServerStartingEvent event) { mcreator_0.serverLoad(event); mcreator_1.serverLoad(event); mcreator_2.serverLoad(event); mcreator_3.serverLoad(event); } @EventHandler public void preInit(FMLPreInitializationEvent event) { mcreator_0.instance = this.instance; mcreator_1.instance = this.instance; mcreator_2.instance = this.instance; mcreator_3.instance = this.instance; mcreator_0.preInit(event); mcreator_1.preInit(event); mcreator_2.preInit(event); mcreator_3.preInit(event); } public static class GuiHandler implements IGuiHandler { @Override public Object getServerGuiElement(int id, EntityPlayer player, World world, int x, int y, int z) { return null; } @Override public Object getClientGuiElement(int id, EntityPlayer player, World world, int x, int y, int z) { return null; } } } Çlient proxy: package mod.mcreator; public class ClientProxyTestEnvironmentMod extends CommonProxyTestEnvironmentMod { @Override public void registerRenderers(TestEnvironmentMod ins) { ins.mcreator_0.registerRenderers(); ins.mcreator_1.registerRenderers(); ins.mcreator_2.registerRenderers(); ins.mcreator_3.registerRenderers(); } }
  4. Hey, i just coded my first 2 mobs and they work perfect :D, i made a texture what makes them look awesome. Now i want to make a texture so that it doest look that boring if they travel in groups, example would be zombie1.png zombie 2.png ect. I have no idea how to code this can someone help out? (Mc version 1.11)
  5. Well, google told me that the weight is sort of a % of how common the item is i used the method i posted above and made the weight very high but it doesnt want to appear on the rod...
  6. @SubscribeEvent public void lootTableLoad(LootTableLoadEvent event) { LootCondition[] chance; LootCondition[] lootingEnchant; LootFunction[] count; LootEntryItem[] item; LootPool newPool; if(event.getName().getResourcePath().equals("gameplay.fishing.fish")) { LootTable loot = event.getTable(); AddlootHandler.addItemToTable(loot, RunecraftItems.RawAnchovies, 10000000, 2, 1, 3, 5, 0, 1, "RawAnchovies"); } } }
  7. public static void addItemToTable(ResourceLocation gameplayFishingFish, Item item, int weight, float numRolls, float probability, int minQuantity, int maxQuantity, float minLootBonus, float maxLootBonus, String name) { addItemToTable(LootTableList.GAMEPLAY_FISHING_FISH, RunecraftItems.RawAnchovies, 0, 0, weight, minQuantity, maxQuantity, minLootBonus, maxLootBonus, name); }
  8. And what function of that class do i use to make my item spawn in the gameplay.fishing.fish loot table? do i do that in the same class or a seperate one?
  9. Quick question, how do i add my item to the fishingrod as a fish. i used to do it with addfish and with the weighted method but since i updated to 1.10 the last one doenst seem to work anymore, ideas?
  10. It it fixed now thank you for your time!
  11. changed return null; to return name; fixed few errors but still gives me these:
  12. Hey, i am currently in the process of updating my mod from 1.8 to 1.10, it has been a long process and after finally removing all the errors and following a lot of tutorials i am finally done. Well, i started my game, it crashes on init, i hope someone can help me fixt it. modstuff: crashreport: the crash report is from runecraftblocksinit but i dont know how to fixt it. please help, alex.
  13. Hello guys, my name is Alex and i am developing a mod called RuneCraft with a few people, For this mod i need to create a capability that stores xp for the skill Defence, the xp needs to be able to be used in another class to set the defence level, basicly in the armor class i want this to happen, if(XP >= 100){ this.setDefence 3 } else if(XP >= 50) { this.setDefence 2 } else if(XP >= 20) { this.setDefence 1 } else { this.setDefence 0 } and in a armor material (lets say steel) @Override public boolean isValidArmor(ItemStack stack, int armorType, Entity entity) { if(Defence >= 1) { return true; } else { return false;} } I have looked at a few peoples tutorials and simply copied a few capabilities but nothing neems to work, i never had to deal with NBT data before exept when adding furnaces and chests. Can someone type what i need to make to create the XP capability, if i understand that and have that set i can figure out the setDefencelevel myself. ps. this needs to work on servers to!
  14. ... That fixed it lol, thanks a lot, happy it was a simple error.
  15. I am making a drawer with 1 slot to store stuff. on startup it gives this error wich seems to come from the commonproxy (Init my handlers) Crash Report: proxy's Main mod class: TileEntityDrawer: Block init Guihandler containerDrawers class: guiDrawers: Drawer (Block Class) i hope it is a simply mistake, thanks in forward, (version 1. And yes i am going to update to 1.8.9 when this is finished.
  16. first of all in the json file it references to items/yourtextures are the texture names spelled correctly? next, you need a json file that handles item rendering, you but it in (modid)/models/item and call it (itemname).json with this code inside.
  17. In the github it references to IExampleCapability and capabilitymanager, what is supposed to be in that class?
  18. A better tutorial is needed i guess.
  19. this is what the internet told me to make, hope it is correct.
  20. I have a Capability created but i cant find a way to use it in the if statement and add values to it when a player kills a mob.
  21. A quick question, in my armor class i want @Override public boolean isValidArmor(ItemStack stack, int armorType, Entity entity) { if([mobkills] > 10.0) { return true; } else { return false; } } to return true if the player has killed more then 10 mobs, it needs to return false if the player hasnt killed 10 mobs, how do i code this?
  22. Basicly everything i need works, the only thing i now need is how to get the players value of the capability and use it in a if and else statements. An i need to set up an eventhandler for if a player kills a mob his score gets set to the mount of mobs he killed, current code: public class ItemRunecraftArmour extends ItemArmor { @Override public boolean isValidArmor(ItemStack stack, int armorType, Entity entity) { return false; } public ItemRunecraftArmour(ArmorMaterial material, int renderIndex, int armorType, String unlocalizedName) { super(material, renderIndex, armorType); this.setUnlocalizedName(unlocalizedName); this.setCreativeTab(Runecraft.Runecraft_Equipment); } }
  23. and i can just follow that up with if (Defence >= 10) { return true; else { return false; }
  24. I added the Capability, but i dont know how to test if it works ;( I cant find anything on livingdeathevent and isvalid armor, do you have a example code?
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.