Jump to content

Xyfero

Members
  • Posts

    3
  • Joined

  • Last visited

Everything posted by Xyfero

  1. Thank you so much. I spent so long trying to figure this out thinking it was something wrong with my render file and it just turns out that I had just forgotten to change that one word, thought I was going crazy. You deserve a medal.
  2. CustomCow.java package com.xyfero.customcow; import com.xyfero.customcow.proxy.CommonProxy; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod.EventHandler; import net.minecraftforge.fml.common.Mod.Instance; import net.minecraftforge.fml.common.SidedProxy; import net.minecraftforge.fml.common.event.FMLInitializationEvent; @Mod(modid = CustomCow.MODID, version = CustomCow.VERSION) public class CustomCow { public static final String MODID = "customcow"; public static final String VERSION = "1.0"; @Instance(CustomCow.MODID) public static CustomCow instance; @SidedProxy(clientSide="com.xyfero.customcow.proxy.ClientProxy", serverSide="com.xyfero.customcow.proxy.CommonProxy") public static CommonProxy proxy; @EventHandler public void preInit(FMLInitializationEvent event) { proxy.preInit(event); } } ClientProxy.java package com.xyfero.customcow.proxy; import com.xyfero.customcow.EntityCustomCow; import com.xyfero.customcow.client.RenderCustomCow; import net.minecraftforge.fml.client.registry.RenderingRegistry; import net.minecraftforge.fml.common.event.FMLInitializationEvent; public class ClientProxy extends CommonProxy { @Override public void preInit(FMLInitializationEvent event) { super.preInit(event); RenderingRegistry.registerEntityRenderingHandler(EntityCustomCow.class, RenderCustomCow::new); } } CommonProxy.java package com.xyfero.customcow.proxy; import com.xyfero.customcow.CustomCow; import com.xyfero.customcow.EntityCustomCow; import com.xyfero.customcow.client.RenderCustomCow; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.client.registry.RenderingRegistry; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.registry.EntityRegistry; public class CommonProxy { public void preInit(FMLInitializationEvent event) { EntityRegistry.registerModEntity(new ResourceLocation(CustomCow.MODID, "custom_cow"), EntityCustomCow.class, CustomCow.MODID + ":custom_cow", 0, CustomCow.instance, 80, 3, false, 0, 1); } } Then I'm using the command "/summon customcow:custom_cow" and the cow's texture is the original rather than the mooshroom one. I must be missing something but I just can't find it.
  3. Using Minecraft Forge 1.11.2-13.20.0.2264. I've got this in my ClientProxy: RenderingRegistry.registerEntityRenderingHandler(EntityCustomCow.class, RenderCustomCow::new); and I've checked that this is executing by printing to the console before this line. EntityCustomCow extends EntityCow and RenderCustomCow looks like this: @SideOnly(Side.CLIENT) public class RenderCustomCow extends RenderLiving<EntityCustomCow> { private static final ResourceLocation texture = new ResourceLocation("textures/entity/cow/mooshroom.png"); public RenderCustomCow(RenderManager manager) { super(manager, new ModelCow(), 0.7F); } @Override protected ResourceLocation getEntityTexture(EntityCustomCow entity) { return texture; } } However the cow still has the default cow texture, not the mooshroom one. Not sure what I'm doing wrong here.
×
×
  • Create New...

Important Information

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