-
[1.8] Rendering Item
I did have it registered in preinit then the model thing in init, I ended up fixing it though I don't exactly know how... I just started over and it ended up working.
-
[1.8] Rendering Item
I can't figure out for the life of me why this isn't working as it was working fine a few months ago, but whenever I try to render a simple item I get the error "Model definition for location x#inventory not found" Here's the class registering it package com.bryceclark56.horticulture.Item; import com.bryceclark56.horticulture.Reference.Reference; import net.minecraft.client.Minecraft; import net.minecraft.client.resources.model.ModelBakery; import net.minecraft.client.resources.model.ModelResourceLocation; import net.minecraft.item.Item; import net.minecraftforge.fml.common.registry.GameRegistry; public class Items { public static final FoodHorticulture lettuce = new FoodHorticulture(6, 2, false).setUnlocalizedName("lettuce"); public static void registerRenderer(Item item, String name) { ModelBakery.addVariantName(item, Reference.MOD_ID + ":" + name); Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(Reference.MOD_ID + ":" + name, "inventory")); } public static void init() { GameRegistry.registerItem(lettuce, "lettuce"); } public static void registerModels() { registerRenderer(lettuce, "lettuce"); } } And the JSON file. { "parent": "builtin/generated", "textures": { "layer0": "horticulture:items/lettuce" }, "display": { "thirdperson": { "rotation": [ -90, 0, 0 ], "translation": [ 0, 1, -3 ], "scale": [ 0.55, 0.55, 0.55 ] }, "firstperson": { "rotation": [ 0, -135, 25 ], "translation": [ 0, 4, 2 ], "scale": [ 1.7, 1.7, 1.7 ] } } } Also worth noting that the renderer is only being registered on the client proxy so that's not the problem.
-
[1.8] Custom entity attacking when attacked
I'm trying to get my custom entity to attack the player if the player attacks it, basically acting like a wolf. Adding EntityAIAttackOnCollide to the tasks as with a wolf didn't seem to work though. Here's my code. Sorry for lack of spoiler, doesn't seem to want to work for me. package com.internetcraft.Entity; import com.internetcraft.Item.Items; import net.minecraft.block.Block; import net.minecraft.entity.EntityAgeable; import net.minecraft.entity.SharedMonsterAttributes; import net.minecraft.entity.ai.*; import net.minecraft.entity.passive.EntityAnimal; import net.minecraft.entity.passive.EntityWolf; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.pathfinding.PathNavigateGround; import net.minecraft.util.BlockPos; import net.minecraft.world.World; public class EntityDoge extends EntityAnimal { public EntityDoge(World worldIn) { super(worldIn); this.setSize(1.0F, 1.0F); ((PathNavigateGround) this.getNavigator()).func_179690_a(true); this.tasks.addTask(0, new EntityAISwimming(this)); this.tasks.addTask(1, new EntityAIAttackOnCollide(this, 1.0D, false)); // No mating for now // this.tasks.addTask(2, new EntityAIMate(this, 1.0D)); //TODO; Doges follow doritos this.tasks.addTask(3, new EntityAITempt(this, 1.25D, Items.dorito, false)); this.tasks.addTask(4, new EntityAIFollowParent(this, 1.25D)); this.tasks.addTask(5, new EntityAIWander(this, 1.0D)); this.tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F)); this.tasks.addTask(7, new EntityAILookIdle(this)); } protected void applyEntityAttributes() { super.applyEntityAttributes(); this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(10.0D); this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.6D); } public boolean canBreatheUnderwater() { return false; } public boolean isPushedByWater() { return false; } public void onLivingUpdate() { super.onLivingUpdate(); } protected String getLivingSound() { return "mob.rabbit.idle"; } protected String getHurtSound() { return "mob.wolf.hurt"; } protected String getDeathSound() { return "mob.wolf.hurt"; } protected void playStepSound(BlockPos p_180429_1_, Block p_180429_2_) { this.playSound("mob.cow.step", 0.15F, 1.0F); } protected float getSoundVolume() { return 0.4F; } protected Item getDropItem() { return com.internetcraft.Item.Items.bacon; } protected void dropFewItems(boolean recentlyhit, int modifier) { this.dropItem(com.internetcraft.Item.Items.bacon, 1); } public boolean interact(EntityPlayer player) { return super.interact(player); } public EntityDoge createChild(EntityAgeable ageable) { return new EntityDoge(this.worldObj); } public float getEyeHeight() { return this.height; } public boolean getCanSpawnHere() { return super.getCanSpawnHere(); } }
-
Gradle won't run client
After copying the forge src files into a directory, running gradlew setupDecompWorkspace, running gradlew idea, and opening that in idea, I am faced with this error when I try to run the client. -Snip- I'm on forge 10.13.2.1230, java 7.0_71 The file it says was not found is there at the exact location, so I'm clueless... Edit: After reinstalling and restarting multiple times it finally decided to go away.
IPS spam blocked by CleanTalk.