Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
package com.triphion.ancient.proxy;
import com.triphion.ancient.AncientMod;
import com.triphion.ancient.Reference;
import com.triphion.ancient.client.entity.RenderFrostbiteHarog;
import com.triphion.ancient.client.entity.RenderHarog;
import com.triphion.ancient.client.entity.RenderHellHarog;
import com.triphion.ancient.client.entity.RenderKillereye;
import com.triphion.ancient.client.entity.RenderPurpisharog;
import com.triphion.ancient.client.entity.RenderSwampHarog;
import com.triphion.ancient.client.entity.RenderTheFrost;
import com.triphion.ancient.client.entity.RenderToadtroll;
import com.triphion.ancient.client.model.ModelHarog;
import com.triphion.ancient.client.model.ModelKillereye;
import com.triphion.ancient.client.model.ModelTheFrost;
import com.triphion.ancient.client.model.ModelToadtroll;
import com.triphion.ancient.entity.EntityFrostbiteHarog;
import com.triphion.ancient.entity.EntityHarog;
import com.triphion.ancient.entity.EntityHellHarog;
import com.triphion.ancient.entity.EntityKillereye;
import com.triphion.ancient.entity.EntityPurpisharog;
import com.triphion.ancient.entity.EntitySwampHarog;
import com.triphion.ancient.entity.EntityTheFrost;
import com.triphion.ancient.entity.EntityToadtroll;
import com.triphion.ancient.init.DevModArmour;
import com.triphion.ancient.init.ModArmour;
import com.triphion.ancient.init.ModBlocks;
import com.triphion.ancient.init.ModDevItems;
import com.triphion.ancient.init.ModFood;
import com.triphion.ancient.init.ModItems;
import com.triphion.ancient.init.ModScrolls;
import com.triphion.ancient.init.ModSpecialItems;
import com.triphion.ancient.init.ModSpells;
import com.triphion.ancient.init.ModTools;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.item.Item;
import net.minecraftforge.client.model.ModelLoader;
import net.minecraftforge.client.model.obj.OBJLoader;
import net.minecraftforge.fml.client.registry.RenderingRegistry;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
public class ClientProxy extends CommonProxy {
@Override
public void preInit() {
OBJLoader.INSTANCE.addDomain(Reference.MODID.toLowerCase());
}
@Override
public void init() {
RenderingRegistry.registerEntityRenderingHandler(EntityKillereye.class, new RenderKillereye(Minecraft.getMinecraft().getRenderManager()));
RenderingRegistry.registerEntityRenderingHandler(EntityHarog.class, new RenderHarog(Minecraft.getMinecraft().getRenderManager()));
RenderingRegistry.registerEntityRenderingHandler(EntityHellHarog.class, new RenderHellHarog(Minecraft.getMinecraft().getRenderManager()));
RenderingRegistry.registerEntityRenderingHandler(EntityFrostbiteHarog.class, new RenderFrostbiteHarog(Minecraft.getMinecraft().getRenderManager()));
RenderingRegistry.registerEntityRenderingHandler(EntityPurpisharog.class, new RenderPurpisharog(Minecraft.getMinecraft().getRenderManager()));
RenderingRegistry.registerEntityRenderingHandler(EntitySwampHarog.class, new RenderSwampHarog(Minecraft.getMinecraft().getRenderManager()));
RenderingRegistry.registerEntityRenderingHandler(EntityToadtroll.class, new RenderToadtroll(Minecraft.getMinecraft().getRenderManager()));
RenderingRegistry.registerEntityRenderingHandler(EntityTheFrost.class, new RenderTheFrost(Minecraft.getMinecraft().getRenderManager()));
}
@Override
public void registerRenders() {
ModItems.registerRenders();
ModTools.registerRenders();
ModBlocks.registerRenders();
ModArmour.registerRenders();
ModDevItems.registerRenders();
ModSpecialItems.registerRenders();
DevModArmour.registerRenders();
ModFood.registerRenders();
ModSpells.registerRenders();
ModScrolls.registerRenders();
}
}
package com.triphion.ancient.init;
import com.triphion.ancient.AncientMod;
import com.triphion.ancient.Reference;
import com.triphion.ancient.entity.EntityFrostbiteHarog;
import com.triphion.ancient.entity.EntityHarog;
import com.triphion.ancient.entity.EntityHellHarog;
import com.triphion.ancient.entity.EntityKillereye;
import com.triphion.ancient.entity.EntityPurpisharog;
import com.triphion.ancient.entity.EntitySwampHarog;
import com.triphion.ancient.entity.EntityTheFrost;
import com.triphion.ancient.entity.EntityToadtroll;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EnumCreatureType;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.biome.Biome;
import net.minecraftforge.fml.common.registry.EntityRegistry;
public class ModEntities {
public static void registerEntity() {
registerEntity(new ResourceLocation(Reference.MODID +":killereye"), EntityKillereye.class, "killer_eye", entityID, AncientMod.instance, 64, 3, true);
registerEntity(new ResourceLocation(Reference.MODID +":harog"), EntityHarog.class, "harog", entityID, AncientMod.instance, 64, 2, true);
registerEntity(new ResourceLocation(Reference.MODID +":hell_harog"), EntityHellHarog.class, "hell_harog", entityID, AncientMod.instance, 64, 2, true);
registerEntity(new ResourceLocation(Reference.MODID +":frostbite_harog"), EntityFrostbiteHarog.class, "frostbite_harog", entityID, AncientMod.instance, 64, 2, true);
registerEntity(new ResourceLocation(Reference.MODID +":purpisharog"), EntityPurpisharog.class, "purpisharog", entityID, AncientMod.instance, 64, 2, true);
registerEntity(new ResourceLocation(Reference.MODID +":swamp_harog"), EntitySwampHarog.class, "swamp_harog", entityID, AncientMod.instance, 64, 2, true);
registerEntity(new ResourceLocation(Reference.MODID +":toadtroll"), EntityToadtroll.class, "toadtroll", entityID, AncientMod.instance, 28, 2, true);
registerEntity(new ResourceLocation(Reference.MODID +":the_fross"), EntityTheFrost.class, "the_fross", entityID, AncientMod.instance, 3000, 2, true);
}
public static void setEntityToSpawn() {
EntityRegistry.addSpawn(EntityHarog.class, 20, 1, 2, EnumCreatureType.MONSTER, Biome.REGISTRY.getObjectById(1), Biome.REGISTRY.getObjectById(2), Biome.REGISTRY.getObjectById(3), Biome.REGISTRY.getObjectById(4), Biome.REGISTRY.getObjectById(5), Biome.REGISTRY.getObjectById(6), Biome.REGISTRY.getObjectById(16), Biome.REGISTRY.getObjectById(17), Biome.REGISTRY.getObjectById(18), Biome.REGISTRY.getObjectById(19), Biome.REGISTRY.getObjectById(20), Biome.REGISTRY.getObjectById(21), Biome.REGISTRY.getObjectById(22), Biome.REGISTRY.getObjectById(23), Biome.REGISTRY.getObjectById(25), Biome.REGISTRY.getObjectById(27), Biome.REGISTRY.getObjectById(28), Biome.REGISTRY.getObjectById(29), Biome.REGISTRY.getObjectById(34), Biome.REGISTRY.getObjectById(35), Biome.REGISTRY.getObjectById(36), Biome.REGISTRY.getObjectById(37), Biome.REGISTRY.getObjectById(38), Biome.REGISTRY.getObjectById(39), Biome.REGISTRY.getObjectById(130), Biome.REGISTRY.getObjectById(131), Biome.REGISTRY.getObjectById(140), Biome.REGISTRY.getObjectById(149), Biome.REGISTRY.getObjectById(151), Biome.REGISTRY.getObjectById(155), Biome.REGISTRY.getObjectById(156), Biome.REGISTRY.getObjectById(157), Biome.REGISTRY.getObjectById(162), Biome.REGISTRY.getObjectById(163), Biome.REGISTRY.getObjectById(164));
EntityRegistry.addSpawn(EntityHellHarog.class, 15, 3, 5, EnumCreatureType.MONSTER, Biome.REGISTRY.getObjectById(8));
EntityRegistry.addSpawn(EntityHellHarog.class, 10, 1, 9, EnumCreatureType.MONSTER, Biome.REGISTRY.getObjectById(3), Biome.REGISTRY.getObjectById(21), Biome.REGISTRY.getObjectById(22), Biome.REGISTRY.getObjectById(23));
EntityRegistry.addSpawn(EntityFrostbiteHarog.class, 12, 1, 3, EnumCreatureType.MONSTER, Biome.REGISTRY.getObjectById(10), Biome.REGISTRY.getObjectById(11), Biome.REGISTRY.getObjectById(12), Biome.REGISTRY.getObjectById(13), Biome.REGISTRY.getObjectById(26), Biome.REGISTRY.getObjectById(30), Biome.REGISTRY.getObjectById(31), Biome.REGISTRY.getObjectById(34), Biome.REGISTRY.getObjectById(140), Biome.REGISTRY.getObjectById(158), Biome.REGISTRY.getObjectById(162));
EntityRegistry.addSpawn(EntityPurpisharog.class, 5, 1, 2, EnumCreatureType.MONSTER, Biome.REGISTRY.getObjectById(1), Biome.REGISTRY.getObjectById(2), Biome.REGISTRY.getObjectById(3), Biome.REGISTRY.getObjectById(4), Biome.REGISTRY.getObjectById(5), Biome.REGISTRY.getObjectById(6), Biome.REGISTRY.getObjectById(16), Biome.REGISTRY.getObjectById(17), Biome.REGISTRY.getObjectById(18), Biome.REGISTRY.getObjectById(19), Biome.REGISTRY.getObjectById(20), Biome.REGISTRY.getObjectById(21), Biome.REGISTRY.getObjectById(22), Biome.REGISTRY.getObjectById(23), Biome.REGISTRY.getObjectById(25), Biome.REGISTRY.getObjectById(27), Biome.REGISTRY.getObjectById(28), Biome.REGISTRY.getObjectById(29), Biome.REGISTRY.getObjectById(34), Biome.REGISTRY.getObjectById(35), Biome.REGISTRY.getObjectById(36), Biome.REGISTRY.getObjectById(37), Biome.REGISTRY.getObjectById(38), Biome.REGISTRY.getObjectById(39), Biome.REGISTRY.getObjectById(130), Biome.REGISTRY.getObjectById(131), Biome.REGISTRY.getObjectById(140), Biome.REGISTRY.getObjectById(149), Biome.REGISTRY.getObjectById(151), Biome.REGISTRY.getObjectById(155), Biome.REGISTRY.getObjectById(156), Biome.REGISTRY.getObjectById(157), Biome.REGISTRY.getObjectById(162), Biome.REGISTRY.getObjectById(163), Biome.REGISTRY.getObjectById(164));
EntityRegistry.addSpawn(EntitySwampHarog.class, 5, 1, 3, EnumCreatureType.MONSTER, Biome.REGISTRY.getObjectById(5), Biome.REGISTRY.getObjectById(29));
EntityRegistry.addSpawn(EntitySwampHarog.class, 25, 1, 2, EnumCreatureType.MONSTER, Biome.REGISTRY.getObjectById(6), Biome.REGISTRY.getObjectById(134));
}
private static int entityID = 0;
public static void registerEntity(ResourceLocation registryName, Class<? extends Entity> entityClass, String entityName, int id, Object mod, int trackingRange, int updateFrequency, boolean sendsVelocityUpdates){
EntityRegistry.registerModEntity(registryName, entityClass, entityName, entityID++, AncientMod.instance, trackingRange, updateFrequency, sendsVelocityUpdates);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.