net.minecraftforge.fml.common.registry.GameRegistry Java Examples

The following examples show how to use net.minecraftforge.fml.common.registry.GameRegistry. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: BlockConverter.java    From NOVA-Core with GNU Lesser General Public License v3.0 6 votes vote down vote up
private void registerNovaBlock(BlockFactory blockFactory) {
	FWBlock blockWrapper = new FWBlock(blockFactory);
	blockFactoryMap.put(blockFactory, blockWrapper);
	String blockId = blockFactory.getID();
	if (!blockId.contains(":"))
		blockId = NovaLauncher.instance().flatMap(NovaLauncher::getCurrentMod).map(Mod::id).orElse("nova") + ':' + blockId;
	GameRegistry.registerBlock(blockWrapper, FWItemBlock.class, blockId);
	NovaMinecraft.proxy.postRegisterBlock(blockWrapper);

	if (blockWrapper.dummy.components.has(Category.class) && FMLCommonHandler.instance().getSide().isClient()) {
		//Add into creative tab
		Category category = blockWrapper.dummy.components.get(Category.class);
		blockWrapper.setCreativeTab(CategoryConverter.instance().toNative(category, blockWrapper));
	}

	Game.logger().info("Registered block: {}", blockFactory.getID());
}
 
Example #2
Source File: BlockMachine.java    From Production-Line with MIT License 6 votes vote down vote up
public BlockMachine() {
    super(Material.IRON, "machine");
    this.setHardness(2.0F);
    this.setDefaultState(this.blockState.getBaseState().withProperty(PROPERTY_FACING, EnumFacing.NORTH)
            .withProperty(PROPERTY_ACTIVE, false));
    for (Type t : Type.values()) {
        GameRegistry.registerTileEntity(t.tileClass, t.getName());
    }

    PLBlocks.carbonizeFurnace = new ItemStack(this);
    PLBlocks.heatDryer = new ItemStack(this, 1, 1);
    PLBlocks.evsu = new ItemStack(this, 1, 2);
    PLBlocks.cseu = new ItemStack(this, 1, 3);
    PLBlocks.parallelSpaceSU = new ItemStack(this, 1, 4);
    PLBlocks.advSolar = new ItemStack(this, 1, 5);
    PLBlocks.fluidKineticGenerator = new ItemStack(this, 1, 6);
    PLBlocks.packager = new ItemStack(this, 1, 7);
}
 
Example #3
Source File: BlockSurgery.java    From Cyberware with MIT License 6 votes vote down vote up
public BlockSurgery()
{
	super(Material.IRON);
	setHardness(5.0F);
	setResistance(10.0F);
	setSoundType(SoundType.METAL);
	
	String name = "surgery";
	
	this.setRegistryName(name);
	GameRegistry.register(this);

	ItemBlock ib = new ItemBlockCyberware(this);
	ib.setRegistryName(name);
	GameRegistry.register(ib);
	
	this.setUnlocalizedName(Cyberware.MODID + "." + name);

	this.setCreativeTab(Cyberware.creativeTab);
	GameRegistry.registerTileEntity(TileEntitySurgery.class, Cyberware.MODID + ":" + name);
	
	CyberwareContent.blocks.add(this);
}
 
Example #4
Source File: BlockBeacon.java    From Cyberware with MIT License 6 votes vote down vote up
public BlockBeacon()
{
	super(Material.IRON);
	setHardness(5.0F);
	setResistance(10.0F);
	setSoundType(SoundType.METAL);
	
	String name = "beacon";
	
	this.setRegistryName(name);
	GameRegistry.register(this);

	ItemBlock ib = new ItemBlockCyberware(this, "cyberware.tooltip.beacon");
	ib.setRegistryName(name);
	GameRegistry.register(ib);
	
	this.setUnlocalizedName(Cyberware.MODID + "." + name);

	this.setCreativeTab(Cyberware.creativeTab);
	GameRegistry.registerTileEntity(TileEntityBeacon.class, Cyberware.MODID + ":" + name);
	
	CyberwareContent.blocks.add(this);
}
 
Example #5
Source File: PipeRegistry.java    From Logistics-Pipes-2 with MIT License 6 votes vote down vote up
public static void init() {
	network_core = new NetworkCore();
	pipe_basic = new PipeBasic();
	pipe_routed = new PipeRouted();
	pipe_blocking = new PipeBlocking();
	pipe_chassis_mki = new PipeChassisMkI();
	
	
	registry.add(network_core);
	registry.add(pipe_basic);
	registry.add(pipe_routed);
	registry.add(pipe_blocking);
	registry.add(pipe_chassis_mki);
	
	for(BlockGenericPipe pipe : registry) {
		GameRegistry.register(pipe);
		
		GameRegistry.register(new ItemBlock(pipe), pipe.getRegistryName());
	}
	
	
}
 
Example #6
Source File: BlockBlueprintArchive.java    From Cyberware with MIT License 6 votes vote down vote up
public BlockBlueprintArchive()
{
	super(Material.IRON);
	setHardness(5.0F);
	setResistance(10.0F);
	setSoundType(SoundType.METAL);
	
	String name = "blueprintArchive";
	
	this.setRegistryName(name);
	GameRegistry.register(this);

	ItemBlock ib = new ItemBlockCyberware(this, "cyberware.tooltip.blueprintArchive");
	ib.setRegistryName(name);
	GameRegistry.register(ib);
	
	this.setUnlocalizedName(Cyberware.MODID + "." + name);

	this.setCreativeTab(Cyberware.creativeTab);
	GameRegistry.registerTileEntity(TileEntityBlueprintArchive.class, Cyberware.MODID + ":" + name);
	
	CyberwareContent.blocks.add(this);
	
	this.setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH));
}
 
Example #7
Source File: ModBlocks.java    From YouTubeModdingTutorial with MIT License 6 votes vote down vote up
public static void register(IForgeRegistry<Block> registry) {
    registry.register(new BlockFastFurnace());
    GameRegistry.registerTileEntity(TileFastFurnace.class, MyMod.MODID + "_fast_furnace");

    registry.register(new BlockGenerator());
    GameRegistry.registerTileEntity(TileGenerator.class, MyMod.MODID + "_generator");

    registry.register(new BlockPuzzle());
    GameRegistry.registerTileEntity(TilePuzzle.class, MyMod.MODID + "_puzzle");

    registry.register(new BlockTank());
    GameRegistry.registerTileEntity(TileTank.class, MyMod.MODID + "_tank");

    registry.register(new BlockFloader());
    GameRegistry.registerTileEntity(TileFloader.class, MyMod.MODID + "_floader");

    registry.register(new BlockSuperchest());
    GameRegistry.registerTileEntity(TileSuperchest.class, MyMod.MODID + "_superchest");

    registry.register(new BlockSuperchestPart());
    GameRegistry.registerTileEntity(TileSuperchestPart.class, MyMod.MODID + "_superchestpart");

    registry.register(new BlockFancyOre());
    registry.register(new BlockFload());
}
 
Example #8
Source File: BlockScanner.java    From Cyberware with MIT License 6 votes vote down vote up
public BlockScanner()
{
	super(Material.IRON);
	setHardness(5.0F);
	setResistance(10.0F);
	setSoundType(SoundType.METAL);
	
	String name = "scanner";
	
	this.setRegistryName(name);
	GameRegistry.register(this);

	ItemBlock ib = new ItemBlockCyberware(this);
	ib.setRegistryName(name);
	GameRegistry.register(ib);
	
	this.setUnlocalizedName(Cyberware.MODID + "." + name);

	this.setCreativeTab(Cyberware.creativeTab);
	GameRegistry.registerTileEntity(TileEntityScanner.class, Cyberware.MODID + ":" + name);
	
	CyberwareContent.blocks.add(this);
}
 
Example #9
Source File: BlockBeaconLarge.java    From Cyberware with MIT License 6 votes vote down vote up
public BlockBeaconLarge()
{
	super(Material.IRON);
	setHardness(5.0F);
	setResistance(10.0F);
	setSoundType(SoundType.METAL);
	
	String name = "beaconLarge";
	
	this.setRegistryName(name);
	GameRegistry.register(this);

	ItemBlock ib = new ItemBlockCyberware(this, "cyberware.tooltip.beaconLarge");
	ib.setRegistryName(name);
	GameRegistry.register(ib);
	
	this.setUnlocalizedName(Cyberware.MODID + "." + name);

	this.setCreativeTab(Cyberware.creativeTab);
	GameRegistry.registerTileEntity(TileEntityBeaconLarge.class, Cyberware.MODID + ":" + name);
	
	CyberwareContent.blocks.add(this);
}
 
Example #10
Source File: CommonProxy.java    From EmergingTechnology with MIT License 6 votes vote down vote up
public void preInit(FMLPreInitializationEvent e) {
    RegistrationHandler.registerFluids();

    EmergingTechnologyConfig.preInit();
    ModLoader.preInit();

    GameRegistry.registerWorldGenerator(OreGenerator.instance, 10);
    MinecraftForge.EVENT_BUS.register(OreGenerator.instance);

    ModBulbProvider.preInit(e);
    ModMediumProvider.preInit(e);
    ModFluidProvider.preInit(e);
    ModTissueProvider.preInit(e);

    CraftTweakerHelper.preInit();

    PacketHandler.registerMessages(EmergingTechnology.MODID);
}
 
Example #11
Source File: WorldGenRegistry.java    From GregTech with GNU Lesser General Public License v3.0 6 votes vote down vote up
public void initializeRegistry() {
    GTLog.logger.info("Initializing ore generation registry...");
    registerShapeGenerator("ellipsoid", EllipsoidGenerator::new);
    registerShapeGenerator("sphere", SphereGenerator::new);
    registerShapeGenerator("plate", PlateGenerator::new);
    registerShapeGenerator("single", SingleBlockGenerator::new);
    registerBlockFiller("simple", SimpleBlockFiller::new);
    registerBlockFiller("ignore_bedrock", () -> new BlacklistedBlockFiller(Lists.newArrayList(Blocks.BEDROCK.getDefaultState())));
    registerVeinPopulator("surface_rock", SurfaceRockPopulator::new);
    registerVeinPopulator("fluid_spring", FluidSpringPopulator::new);
    registerVeinPopulator("surface_block", SurfaceBlockPopulator::new);

    WorldGeneratorImpl worldGenerator = new WorldGeneratorImpl();
    GameRegistry.registerWorldGenerator(worldGenerator, 1);
    MinecraftForge.ORE_GEN_BUS.register(worldGenerator);
    try {
        reinitializeRegisteredVeins();
    } catch (IOException | RuntimeException exception) {
        GTLog.logger.fatal("Failed to initialize worldgen registry.", exception);
    }
}
 
Example #12
Source File: BlockToroSpawner.java    From ToroQuest with GNU General Public License v3.0 5 votes vote down vote up
@SubscribeEvent
public static void initBlock(final RegistryEvent.Register<Block> event) {
	GameRegistry.registerTileEntity(TileEntityToroSpawner.class, NAME);
	INSTANCE = (BlockToroSpawner) new BlockToroSpawner().setUnlocalizedName(NAME);
	INSTANCE.setRegistryName(REGISTRY_NAME);
	event.getRegistry().register(INSTANCE);
	ITEM_INSTANCE = Item.REGISTRY.getObject(new ResourceLocation(ToroQuest.MODID, NAME));
}
 
Example #13
Source File: ItemBlueprint.java    From Cyberware with MIT License 5 votes vote down vote up
public ItemBlueprint(String name)
{
	this.setRegistryName(name);
	GameRegistry.register(this);
	this.setUnlocalizedName(Cyberware.MODID + "." + name);
	
	this.setCreativeTab(Cyberware.creativeTab);
			
	this.setHasSubtypes(true);
	this.setMaxStackSize(1);

	CyberwareContent.items.add(this);
}
 
Example #14
Source File: ItemCyberwareBase.java    From Cyberware with MIT License 5 votes vote down vote up
public ItemCyberwareBase(String name, String... subnames)
{
	this.setRegistryName(name);
	GameRegistry.register(this);
	this.setUnlocalizedName(Cyberware.MODID + "." + name);
       
	this.setCreativeTab(Cyberware.creativeTab);
			
	this.subnames = subnames;

	this.setHasSubtypes(this.subnames.length > 0);
	this.setMaxDamage(0);

       CyberwareContent.items.add(this);
}
 
Example #15
Source File: ServerWikiTab.java    From IGW-mod with GNU General Public License v2.0 5 votes vote down vote up
public ServerWikiTab(){
    List<String> info = InfoSupplier.getInfo("igwmod", "server/properties", true);
    if(info != null) {
        for(String s : info) {
            String[] entry = s.split("=");
            if(entry[0].equals("server_name")) serverName = entry[1];
            if(entry[0].equals("icon_item")) {
                String[] icon = entry[1].split(":");
                //                    iconStack = new ItemStack(GameRegistry.findItem(icon[0], icon[1]));
                iconStack = GameRegistry.makeItemStack(icon[0] + ":" + icon[1], 0, 1, "");
                if(iconStack.isEmpty()) {
                    IGWLog.warning("Couldn't find a server tab icon item stack for the name: " + entry[1]);
                }
            }
        }
    }

    if(iconStack.isEmpty()) {
        icon = new LocatedTexture(new ResourceLocation("server/tab_icon.png"), 5, 10, 27, 27);
    }

    File[] files = new File(IGWMod.proxy.getSaveLocation() + File.separator + "igwmod").listFiles(new FilenameFilter(){
        @Override
        public boolean accept(File dir, String filename){
            return filename.endsWith(".txt");
        }
    });
    for(File file : files) {
        if(!file.getName().equals("properties.txt")) {
            pageEntries.add(file.getName().substring(0, file.getName().length() - 4));
        }
    }

}
 
Example #16
Source File: CommonProxy.java    From NOVA-Core with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Override
public void preInit(FMLPreInitializationEvent evt) {
	GameRegistry.registerTileEntity(FWTile.class, "novaTile");
	GameRegistry.registerTileEntity(FWTileUpdater.class, "novaTileUpdater");
	int globalUniqueEntityId = EntityRegistry.findGlobalUniqueEntityId();
	EntityRegistry.registerGlobalEntityID(FWEntity.class, "novaEntity", globalUniqueEntityId);
	EntityRegistry.registerModEntity(FWEntity.class, "novaEntity", globalUniqueEntityId, NovaMinecraft.instance, 64, 20, true);
}
 
Example #17
Source File: BlockBase.java    From Signals with GNU General Public License v3.0 5 votes vote down vote up
public BlockBase(Class<? extends TileEntity> tileClass, String name){
    super(Material.ROCK);
    setUnlocalizedName(name);
    this.tileClass = tileClass;
    GameRegistry.registerTileEntity(tileClass, name);
    setCreativeTab(CreativeTabSignals.getInstance());
    ModBlocks.registerBlock(this);
    setHardness(1);
}
 
Example #18
Source File: BlockFluidWitchwater.java    From ExNihiloAdscensio with MIT License 5 votes vote down vote up
public BlockFluidWitchwater() {
	super(ENBlocks.fluidWitchwater, Material.WATER);
	
	this.setRegistryName("witchwater");
	this.setUnlocalizedName("witchwater");
	GameRegistry.<Block>register(this);
}
 
Example #19
Source File: Recipes.java    From BaseMetals with GNU Lesser General Public License v2.1 5 votes vote down vote up
private static void initVanillaRecipes(){
	OreDictionary.registerOre("barsIron", Blocks.IRON_BARS);
	OreDictionary.registerOre("bars", Blocks.IRON_BARS);
	OreDictionary.registerOre("doorIron", Items.IRON_DOOR);
	OreDictionary.registerOre("door", Items.IRON_DOOR);
	OreDictionary.registerOre("doorWood", Items.OAK_DOOR);
	OreDictionary.registerOre("doorWood", Items.JUNGLE_DOOR);
	OreDictionary.registerOre("doorWood", Items.SPRUCE_DOOR);
	OreDictionary.registerOre("doorWood", Items.DARK_OAK_DOOR);
	OreDictionary.registerOre("doorWood", Items.BIRCH_DOOR);
	OreDictionary.registerOre("doorWood", Items.ACACIA_DOOR);
	OreDictionary.registerOre("door", Items.OAK_DOOR);
	OreDictionary.registerOre("door", Items.JUNGLE_DOOR);
	OreDictionary.registerOre("door", Items.SPRUCE_DOOR);
	OreDictionary.registerOre("door", Items.DARK_OAK_DOOR);
	OreDictionary.registerOre("door", Items.BIRCH_DOOR);
	OreDictionary.registerOre("door", Items.ACACIA_DOOR);
	
	CrusherRecipeRegistry.addNewCrusherRecipe("oreIron", new ItemStack(cyano.basemetals.init.Items.iron_powder,2));
	CrusherRecipeRegistry.addNewCrusherRecipe("blockIron", new ItemStack(cyano.basemetals.init.Items.iron_powder,9));
	CrusherRecipeRegistry.addNewCrusherRecipe("ingotIron", new ItemStack(cyano.basemetals.init.Items.iron_powder,1));
	CrusherRecipeRegistry.addNewCrusherRecipe("oreGold", new ItemStack(cyano.basemetals.init.Items.gold_powder,2));
	CrusherRecipeRegistry.addNewCrusherRecipe("blockGold", new ItemStack(cyano.basemetals.init.Items.gold_powder,9));
	CrusherRecipeRegistry.addNewCrusherRecipe("ingotGold", new ItemStack(cyano.basemetals.init.Items.gold_powder,1));
	GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(cyano.basemetals.init.Items.iron_nugget,9), new ItemStack(Items.IRON_INGOT)));
	GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.IRON_INGOT), "xxx","xxx","xxx",'x',cyano.basemetals.init.Items.iron_nugget));
	GameRegistry.addSmelting(cyano.basemetals.init.Items.iron_powder, new ItemStack(Items.IRON_INGOT), 0f);
	GameRegistry.addSmelting(cyano.basemetals.init.Items.gold_powder, new ItemStack(Items.GOLD_INGOT), 0f);
	CrusherRecipeRegistry.addNewCrusherRecipe("oreCoal", new ItemStack(cyano.basemetals.init.Items.carbon_powder,2));
	CrusherRecipeRegistry.addNewCrusherRecipe("blockCoal", new ItemStack(cyano.basemetals.init.Items.carbon_powder,9));
	CrusherRecipeRegistry.addNewCrusherRecipe(new ItemStack(Items.COAL,1,0), new ItemStack(cyano.basemetals.init.Items.carbon_powder,1));
	CrusherRecipeRegistry.addNewCrusherRecipe(new ItemStack(Items.COAL,1,1), new ItemStack(cyano.basemetals.init.Items.carbon_powder,1));
	GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Blocks.COAL_BLOCK), "xxx","xxx","xxx",'x',cyano.basemetals.init.Items.carbon_powder));
}
 
Example #20
Source File: ItemNeuropozyne.java    From Cyberware with MIT License 5 votes vote down vote up
public ItemNeuropozyne(String name)
{
	this.setRegistryName(name);
	GameRegistry.register(this);
	this.setUnlocalizedName(Cyberware.MODID + "." + name);
	
	this.setCreativeTab(Cyberware.creativeTab);
			
	this.setMaxDamage(0);

	CyberwareContent.items.add(this);
}
 
Example #21
Source File: ItemSwordCyberware.java    From Cyberware with MIT License 5 votes vote down vote up
public ItemSwordCyberware(String name, ToolMaterial material)
{
	super(material);
	
	this.setRegistryName(name);
	GameRegistry.register(this);
	this.setUnlocalizedName(Cyberware.MODID + "." + name);
       
	this.setCreativeTab(Cyberware.creativeTab);
			
       CyberwareContent.items.add(this);
}
 
Example #22
Source File: BlockBeaconPost.java    From Cyberware with MIT License 5 votes vote down vote up
public BlockBeaconPost()
{
	super(Material.IRON);
	
	setHardness(5.0F);
	setResistance(10.0F);
	setSoundType(SoundType.METAL);
	
	String name = "radioPost";
	
	this.setRegistryName(name);
	GameRegistry.register(this);
	

	ItemBlock ib = new ItemBlockCyberware(this,
			"cyberware.tooltip.beaconPost.0",
			"cyberware.tooltip.beaconPost.1",
			"cyberware.tooltip.beaconPost.2");
	ib.setRegistryName(name);
	GameRegistry.register(ib);
	
	this.setUnlocalizedName(Cyberware.MODID + "." + name);

	this.setCreativeTab(Cyberware.creativeTab);
	
	CyberwareContent.blocks.add(this);
	
	GameRegistry.registerTileEntity(TileEntityBeaconPost.class, Cyberware.MODID + ":" + name);
	GameRegistry.registerTileEntity(TileEntityBeaconPostMaster.class, Cyberware.MODID + ":" + name + "_master");

	this.setDefaultState(this.blockState.getBaseState()
			.withProperty(TRANSFORMED, 0)
			.withProperty(NORTH, Boolean.valueOf(false))
			.withProperty(EAST, Boolean.valueOf(false))
			.withProperty(SOUTH, Boolean.valueOf(false))
			.withProperty(WEST, Boolean.valueOf(false)));
}
 
Example #23
Source File: BlockBase.java    From ExNihiloAdscensio with MIT License 5 votes vote down vote up
public BlockBase(Material mat, String name)
{
    super(mat);
    setUnlocalizedName(name);
    setRegistryName(name);
    GameRegistry.register(this);
    GameRegistry.register(new ItemBlock(this).setRegistryName(name));
}
 
Example #24
Source File: BlockEngineeringTable.java    From Cyberware with MIT License 5 votes vote down vote up
public BlockEngineeringTable()
{
	super(Material.IRON);
	this.setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH).withProperty(HALF, EnumEngineeringHalf.LOWER));

	setHardness(5.0F);
	setResistance(10.0F);
	setSoundType(SoundType.METAL);
	
	String name = "engineeringTable";
	
	this.setRegistryName(name);
	GameRegistry.register(this);

	ib = new ItemEngineeringTable(this);
	ib.setRegistryName(name);
	GameRegistry.register(ib);
	
	this.setUnlocalizedName(Cyberware.MODID + "." + name);
	ib.setUnlocalizedName(Cyberware.MODID + "." + name);

	ib.setCreativeTab(Cyberware.creativeTab);
	
	GameRegistry.registerTileEntity(TileEntityEngineeringTable.class, Cyberware.MODID + ":" + name);
	GameRegistry.registerTileEntity(TileEntityEngineeringDummy.class, Cyberware.MODID + ":" + name + "Dummy");

	CyberwareContent.items.add(ib);
}
 
Example #25
Source File: BlockPL.java    From Production-Line with MIT License 5 votes vote down vote up
public BlockPL(Material material, String name) {
    super(material);
    this.setUnlocalizedName(MOD_ID + ".block." + name);
    this.setCreativeTab(creativeTabPL);
    this.internalName = name;
    // TODO register after construction
    GameRegistry.<Block>register(this, new ResourceLocation(MOD_ID, name));
    this.registerItemBlock();
    if (this instanceof IOrientableBlock) {
        this.setDefaultState(this.blockState.getBaseState().withProperty(PROPERTY_FACING, EnumFacing.NORTH));
    }
    PLConfig.gtiLogger.log(Level.INFO, name + ":" + Integer.toString(Block.getIdFromBlock(this)));
}
 
Example #26
Source File: MalmoMod.java    From malmo with MIT License 5 votes vote down vote up
@EventHandler
public void onMissingMappingsEvent(FMLMissingMappingsEvent event)
{
    // The lit_furnace item was removed in Minecraft 1.9, so pre-1.9 files will produce a warning when
    // loaded. This is harmless for a human user, but it breaks Malmo's FileWorldGenerator handler, since
    // it will bring up a GUI and wait for the user to click a button before continuing.
    // To avoid this, we specifically ignore lit_furnace item mapping.
    for (MissingMapping mapping : event.getAll())
    {
        if (mapping.type == GameRegistry.Type.ITEM && mapping.name.equals("minecraft:lit_furnace"))
            mapping.ignore();
    }
}
 
Example #27
Source File: BlockSurgeryChamber.java    From Cyberware with MIT License 5 votes vote down vote up
public BlockSurgeryChamber()
{
	super(Material.IRON);
	this.setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH).withProperty(OPEN, Boolean.valueOf(false)).withProperty(HALF, EnumChamberHalf.LOWER));
	
	setHardness(5.0F);
	setResistance(10.0F);
	setSoundType(SoundType.METAL);
	
	String name = "surgeryChamber";
	
	this.setRegistryName(name);
	GameRegistry.register(this);

	ib = new ItemSurgeryChamber(this);
	ib.setRegistryName(name);
	GameRegistry.register(ib);
	
	this.setUnlocalizedName(Cyberware.MODID + "." + name);
	ib.setUnlocalizedName(Cyberware.MODID + "." + name);

	ib.setCreativeTab(Cyberware.creativeTab);
	
	GameRegistry.registerTileEntity(TileEntitySurgeryChamber.class, Cyberware.MODID + ":" + name);
	
	CyberwareContent.items.add(ib);
}
 
Example #28
Source File: PotionNeuropozyne.java    From Cyberware with MIT License 5 votes vote down vote up
public PotionNeuropozyne(String name, boolean isBadEffectIn, int liquidColorIn, int iconIndex)
{
	super(isBadEffectIn, liquidColorIn);
	GameRegistry.register(this, new ResourceLocation(Cyberware.MODID, name));
	setPotionName("cyberware.potion." + name);
	this.iconIndex = iconIndex;
}
 
Example #29
Source File: ValkyrienSkiesWorld.java    From Valkyrien-Skies with Apache License 2.0 5 votes vote down vote up
@EventHandler
protected void init(FMLInitializationEvent event) {
    EntityRegistry.registerModEntity(
        new ResourceLocation(ValkyrienSkiesWorld.MOD_ID, "fall_up_block_entity"),
        EntityFallingUpBlock.class,
        "fall_up_block_entity",
        75, ValkyrienSkiesWorld.INSTANCE, 80, 1, true);

    MinecraftForge.EVENT_BUS.register(worldEventsCommon);
    GameRegistry.registerWorldGenerator(new ValkyrienSkiesWorldGen(), 1);
    proxy.init(event);
}
 
Example #30
Source File: ValkyrienSkiesControl.java    From Valkyrien-Skies with Apache License 2.0 5 votes vote down vote up
private void registerTileEntities() {
    GameRegistry.registerTileEntity(TileEntityCaptainsChair.class,
        new ResourceLocation(MOD_ID, "tile_captains_chair"));
    GameRegistry.registerTileEntity(TileEntityNetworkRelay.class,
        new ResourceLocation(MOD_ID, "tile_network_relay"));
    GameRegistry.registerTileEntity(TileEntityShipHelm.class,
        new ResourceLocation(MOD_ID, "tile_ship_helm"));
    GameRegistry.registerTileEntity(TileEntitySpeedTelegraph.class,
        new ResourceLocation(MOD_ID, "tile_speed_telegraph"));
    GameRegistry.registerTileEntity(TileEntityPropellerEngine.class,
        new ResourceLocation(MOD_ID, "tile_propeller_engine"));
    GameRegistry.registerTileEntity(TileEntityGyroscopeStabilizer.class,
        new ResourceLocation(MOD_ID, "tile_gyroscope_stabilizer"));
    GameRegistry.registerTileEntity(TileEntityLiftValve.class,
        new ResourceLocation(MOD_ID, "tile_lift_valve"));
    GameRegistry.registerTileEntity(TileEntityNetworkDisplay.class,
        new ResourceLocation(MOD_ID, "tile_network_display"));
    GameRegistry.registerTileEntity(TileEntityLiftLever.class,
        new ResourceLocation(MOD_ID, "tile_lift_lever"));

    GameRegistry.registerTileEntity(TileEntityGyroscopeDampener.class,
        new ResourceLocation(MOD_ID, "tile_gyroscope_dampener"));
    GameRegistry.registerTileEntity(TileEntityValkyriumEnginePart.class,
        new ResourceLocation(MOD_ID, "tile_valkyrium_engine_part"));
    GameRegistry.registerTileEntity(TileEntityGearbox.class,
        new ResourceLocation(MOD_ID, "tile_gearbox"));
    GameRegistry.registerTileEntity(TileEntityValkyriumCompressorPart.class,
        new ResourceLocation(MOD_ID, "tile_valkyrium_compressor_part"));
    GameRegistry.registerTileEntity(TileEntityRudderPart.class,
        new ResourceLocation(MOD_ID, "tile_rudder_axle_part"));
    GameRegistry.registerTileEntity(TileEntityGiantPropellerPart.class,
        new ResourceLocation(MOD_ID, "tile_giant_propeller_part"));
    GameRegistry.registerTileEntity(TileEntityRotationAxle.class,
        new ResourceLocation(MOD_ID, "tile_rotation_axle"));

    GameRegistry.registerTileEntity(TileEntityPassengerChair.class,
        new ResourceLocation(MOD_ID, "tile_passenger_chair"));
}