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.