Java Code Examples for net.minecraftforge.fml.common.registry.GameRegistry#registerTileEntity()

The following examples show how to use net.minecraftforge.fml.common.registry.GameRegistry#registerTileEntity() . 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: 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 2
Source File: BlockComponentBox.java    From Cyberware with MIT License 6 votes vote down vote up
public BlockComponentBox()
{
	super(Material.IRON);
	setHardness(5.0F);
	setResistance(10.0F);
	setSoundType(SoundType.METAL);
	
	String name = "componentBox";
	
	this.setRegistryName(name);
	GameRegistry.register(this);

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

	this.setCreativeTab(Cyberware.creativeTab);
	GameRegistry.registerTileEntity(TileEntityComponentBox.class, Cyberware.MODID + ":" + name);
	
	CyberwareContent.items.add(ib);
	
	this.setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH));
}
 
Example 3
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 4
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 5
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 6
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 7
Source File: SubmodGnomes.java    From CommunityMod with GNU Lesser General Public License v2.1 5 votes vote down vote up
@Override
public void onPreInit(FMLPreInitializationEvent e)
{
	GameRegistry.registerTileEntity(TileEntityGnomeCache.class, new ResourceLocation(CommunityGlobals.MOD_ID, "te_gnomecache"));

	if (e.getSide().isClient())
	{
		RenderingRegistry.registerEntityRenderingHandler(EntityGnomeWood.class, RenderGnomeWood::new);
	}
}
 
Example 8
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 9
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 10
Source File: EnderUtilitiesBlocks.java    From enderutilities with GNU Lesser General Public License v3.0 4 votes vote down vote up
private static void registerTileEntity(Class<? extends TileEntity> clazz, String id)
{
    GameRegistry.registerTileEntity(clazz, new ResourceLocation(Reference.MOD_ID, id));
}
 
Example 11
Source File: RegistrationHandler.java    From EmergingTechnology with MIT License 4 votes vote down vote up
private static void registerTileEntity(Class<? extends TileEntity> tileEntityClass, String name) {
    GameRegistry.registerTileEntity(tileEntityClass, getResourceLocation(name));
}
 
Example 12
Source File: TeleportTileEntities.java    From ModdingTutorials with GNU General Public License v2.0 4 votes vote down vote up
public static void register()
{
	GameRegistry.registerTileEntity(TileEntityCoordTransporter.class, "tmCoordTransporter");
}
 
Example 13
Source File: TileEntityRegistry.java    From TofuCraftReload with MIT License 4 votes vote down vote up
private static void registerTileEntity(Class<? extends TileEntity> cls, String baseName) {
    GameRegistry.registerTileEntity(cls, new ResourceLocation(TofuMain.MODID, baseName));
}
 
Example 14
Source File: TileEntityMinecoprocessor.java    From Minecoprocessors with GNU General Public License v3.0 4 votes vote down vote up
public static void init() {
  GameRegistry.registerTileEntity(TileEntityMinecoprocessor.class, NAME);
}
 
Example 15
Source File: TileEntityRegistry.java    From customstuff4 with GNU General Public License v3.0 4 votes vote down vote up
public static void register(ContentTileEntityBase content)
{
    Class<? extends TileEntity> clazz = createClass(content.getTemplateClass(), content.getKey().toString());
    map.put(content.getKey(), new Entry(clazz, content));
    GameRegistry.registerTileEntity(clazz, content.getKey().toString());
}
 
Example 16
Source File: ValkyrienSkiesMod.java    From Valkyrien-Skies with Apache License 2.0 4 votes vote down vote up
private void registerTileEntities() {
    GameRegistry.registerTileEntity(TileEntityPhysicsInfuser.class,
        new ResourceLocation(MOD_ID, "tile_physics_infuser"));
}
 
Example 17
Source File: BlockTransportRail.java    From Signals with GNU General Public License v3.0 4 votes vote down vote up
public BlockTransportRail(){
    setUnlocalizedName("transport_rail");
    setCreativeTab(CreativeTabSignals.getInstance());
    ModBlocks.registerBlock(this);
    GameRegistry.registerTileEntity(TileEntityTransportRail.class, "transport_rail");
}
 
Example 18
Source File: CommonProxy.java    From NOVA-Core with GNU Lesser General Public License v3.0 4 votes vote down vote up
@Override
public void preInit(FMLPreInitializationEvent evt) {
	GameRegistry.registerTileEntity(FWTile.class, "nova:novaTile");
	GameRegistry.registerTileEntity(FWTileUpdater.class, "nova:novaTileUpdater");
	EntityRegistry.registerModEntity(new ResourceLocation("nova", "novaEntity"), FWEntity.class, "novaEntity", 1, NovaMinecraft.instance, 64, 20, true);
}
 
Example 19
Source File: TFCBlocks.java    From TFC2 with GNU General Public License v3.0 4 votes vote down vote up
private static void registerTileEntity(Class<? extends TileEntity> c, String id)
{
	GameRegistry.registerTileEntity(c, Reference.ModID+":"+id);
}
 
Example 20
Source File: BlockSurgeryTable.java    From Cyberware with MIT License 3 votes vote down vote up
public BlockSurgeryTable()
{
	
	String name = "surgeryTable";
	
	this.setRegistryName(name);
	GameRegistry.register(this);
	
	this.setUnlocalizedName(Cyberware.MODID + "." + name);

	GameRegistry.registerTileEntity(TileEntitySurgery.class, Cyberware.MODID + ":" + name);
	
	MinecraftForge.EVENT_BUS.register(this);
}