Edited README.md for 1.0 release
This commit is contained in:
parent
3ed6bc7301
commit
3a37f03331
@ -13,6 +13,9 @@ import cpw.mods.fml.common.event.FMLInitializationEvent;
|
|||||||
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
||||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||||
import cpw.mods.fml.common.registry.GameRegistry;
|
import cpw.mods.fml.common.registry.GameRegistry;
|
||||||
|
import xyz.ibatv.iba_backblocks.blocks.mc18.EntityGuardian;
|
||||||
|
import xyz.ibatv.iba_backblocks.blocks.mc18.EntityHandler;
|
||||||
|
import xyz.ibatv.iba_backblocks.blocks.mc18.EntityRabbit;
|
||||||
import xyz.ibatv.iba_backblocks.items.Minecraft1_8_Items;
|
import xyz.ibatv.iba_backblocks.items.Minecraft1_8_Items;
|
||||||
|
|
||||||
@Mod(modid = IBA_BackBlocks.MODID, name = "IBA Back-Blocks", version = IBA_BackBlocks.VERSION)
|
@Mod(modid = IBA_BackBlocks.MODID, name = "IBA Back-Blocks", version = IBA_BackBlocks.VERSION)
|
||||||
@ -21,6 +24,8 @@ public class IBA_BackBlocks {
|
|||||||
public static final String MODID = "iba_backblocks";
|
public static final String MODID = "iba_backblocks";
|
||||||
public static final String VERSION = "0.1.1-dev";
|
public static final String VERSION = "0.1.1-dev";
|
||||||
|
|
||||||
|
@Mod.Instance(MODID)
|
||||||
|
public static IBA_BackBlocks instance;
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void preInit(FMLPreInitializationEvent event) {
|
public void preInit(FMLPreInitializationEvent event) {
|
||||||
@ -46,6 +51,9 @@ public class IBA_BackBlocks {
|
|||||||
//Register.init();
|
//Register.init();
|
||||||
Minecraft1_8_Items.items();
|
Minecraft1_8_Items.items();
|
||||||
|
|
||||||
|
|
||||||
|
EntityHandler.registerEntities(EntityRabbit.class, "Rabbit");
|
||||||
|
EntityHandler.registerEntities(EntityGuardian.class, "Guardian");
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
|
@ -0,0 +1,10 @@
|
|||||||
|
package xyz.ibatv.iba_backblocks.blocks.mc18;
|
||||||
|
|
||||||
|
import net.minecraft.entity.monster.EntityMob;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
public class EntityGuardian extends EntityMob {
|
||||||
|
public EntityGuardian(World world) {
|
||||||
|
super(world);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
package xyz.ibatv.iba_backblocks.blocks.mc18;
|
||||||
|
|
||||||
|
import cpw.mods.fml.common.registry.EntityRegistry;
|
||||||
|
import net.minecraft.entity.EntityList;
|
||||||
|
import xyz.ibatv.iba_backblocks.IBA_BackBlocks;
|
||||||
|
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
|
public class EntityHandler {
|
||||||
|
public static void registerEntities(Class entityClass, String name) {
|
||||||
|
int entityId = EntityRegistry.findGlobalUniqueEntityId();
|
||||||
|
long x = name.hashCode();
|
||||||
|
Random random = new Random(x);
|
||||||
|
int mainColor = random.nextInt() * 16777215;
|
||||||
|
int subColor = random.nextInt() * 16777215;
|
||||||
|
|
||||||
|
EntityRegistry.registerGlobalEntityID(entityClass, name, entityId);
|
||||||
|
EntityRegistry.registerModEntity(entityClass, name, entityId, IBA_BackBlocks.instance, 64, 1, true);
|
||||||
|
EntityList.entityEggs.put(Integer.valueOf(entityId), new EntityList.EntityEggInfo(entityId, mainColor, subColor));
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
package xyz.ibatv.iba_backblocks.blocks.mc18;
|
||||||
|
|
||||||
|
import net.minecraft.entity.EntityAgeable;
|
||||||
|
import net.minecraft.entity.passive.EntityAnimal;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
public class EntityRabbit extends EntityAnimal {
|
||||||
|
|
||||||
|
public EntityRabbit(World world) {
|
||||||
|
super(world);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public EntityAgeable createChild(EntityAgeable p_90011_1_) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user