Change registration method for entities - now can use spawn eggs and summon command, and ids are not hard coded
This commit is contained in:
parent
509872483e
commit
67567e16e3
|
@ -11,7 +11,6 @@ package biomesoplenty.common.init;
|
||||||
import biomesoplenty.common.entities.EntityPixie;
|
import biomesoplenty.common.entities.EntityPixie;
|
||||||
import biomesoplenty.common.entities.EntityWasp;
|
import biomesoplenty.common.entities.EntityWasp;
|
||||||
import biomesoplenty.common.entities.projectiles.EntityDart;
|
import biomesoplenty.common.entities.projectiles.EntityDart;
|
||||||
import biomesoplenty.core.BiomesOPlenty;
|
|
||||||
import net.minecraftforge.fml.common.registry.EntityRegistry;
|
import net.minecraftforge.fml.common.registry.EntityRegistry;
|
||||||
|
|
||||||
public class ModEntities
|
public class ModEntities
|
||||||
|
@ -19,12 +18,9 @@ public class ModEntities
|
||||||
|
|
||||||
public static void init()
|
public static void init()
|
||||||
{
|
{
|
||||||
|
EntityRegistry.registerGlobalEntityID(EntityDart.class, "dart", EntityRegistry.findGlobalUniqueEntityId());
|
||||||
// TODO: how to set id?
|
EntityRegistry.registerGlobalEntityID(EntityWasp.class, "wasp", EntityRegistry.findGlobalUniqueEntityId(), 0xFEE563, 0x000000);
|
||||||
// TODO: why can't we use the summon command on these?
|
EntityRegistry.registerGlobalEntityID(EntityPixie.class, "pixie", EntityRegistry.findGlobalUniqueEntityId(), 0xFFFFFF, 0xFF4DFF);
|
||||||
EntityRegistry.registerModEntity(EntityDart.class, "dart", 26, BiomesOPlenty.instance, 80, 3, true);
|
|
||||||
EntityRegistry.registerModEntity(EntityWasp.class, "wasp", 27, BiomesOPlenty.instance, 80, 3, true);
|
|
||||||
EntityRegistry.registerModEntity(EntityPixie.class, "pixie", 28, BiomesOPlenty.instance, 80, 3, true);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue