Java Code Examples for net.minecraftforge.fml.client.registry.ClientRegistry#bindTileEntitySpecialRenderer()

The following examples show how to use net.minecraftforge.fml.client.registry.ClientRegistry#bindTileEntitySpecialRenderer() . 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: ClientProxy.java    From Cyberware with MIT License 6 votes vote down vote up
@Override
public void preInit()
{
	super.preInit();
	
	for (Block block : CyberwareContent.blocks)
	{
		registerRenders(block);
	}
	
	for (Item item : CyberwareContent.items)
	{
		registerRenders(item);
	}

	ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySurgeryChamber.class, new TileEntitySurgeryChamberRenderer());
	RenderingRegistry.registerEntityRenderingHandler(EntityCyberZombie.class, RenderCyberZombie::new);
	ClientRegistry.bindTileEntitySpecialRenderer(TileEntityScanner.class, new TileEntityScannerRenderer());
	ClientRegistry.bindTileEntitySpecialRenderer(TileEntityEngineeringTable.class, new TileEntityEngineeringRenderer());
	ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBeaconPostMaster.class, new TileEntityBeaconLargeRenderer());

}
 
Example 2
Source File: ClientProxy.java    From BetterChests with GNU Lesser General Public License v3.0 6 votes vote down vote up
@Override
public void init() {
	new ClientEventListener();
	ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBChest.class, TESRBChest.INSTANCE);
	ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBBarrel.class, TESRBBarrel.INSTANCE);
	ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBTank.class, TESRBTank.INSTANCE);
	ForgeHooksClient.registerTESRItemStack(Item.getItemFromBlock(BlocksItemsBetterChests.betterchest), 0, TileEntityBChest.class);

	TickRegistry.CLIENT.addContinuousCallback(() -> {
		if (!pressed && keyBind.isPressed() && Minecraft.getMinecraft().world != null) {
			//Open bag
			int idx = InvUtil.findInInvInternal(Minecraft.getMinecraft().player.inventory, null, stack -> stack.getItem() instanceof ItemBBag);
			if (idx != -1) {
				BetterChests.instance.ph.sendPacketToPlayers(new PacketOpenBag(idx));
			}
		}
		pressed = keyBind.isPressed();
	});
	ClientRegistry.registerKeyBinding(keyBind);
}
 
Example 3
Source File: ClientProxyControl.java    From Valkyrien-Skies with Apache License 2.0 6 votes vote down vote up
private static void registerTileEntityRenderers() {
    ClientRegistry.bindTileEntitySpecialRenderer(TileEntityNetworkRelay.class,
        new BasicNodeTileEntityRenderer());
    ClientRegistry.bindTileEntitySpecialRenderer(TileEntityShipHelm.class,
        new ShipHelmTileEntityRenderer());
    ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySpeedTelegraph.class,
        new SpeedTelegraphTileEntityRenderer());
    ClientRegistry.bindTileEntitySpecialRenderer(TileEntityPropellerEngine.class,
        new PropellerEngineTileEntityRenderer());
    ClientRegistry.bindTileEntitySpecialRenderer(TileEntityValkyriumEnginePart.class,
        new ValkyriumEnginePartTileEntityRenderer());
    ClientRegistry.bindTileEntitySpecialRenderer(TileEntityGearbox.class,
        new GearboxTileEntityRenderer());
    ClientRegistry.bindTileEntitySpecialRenderer(TileEntityLiftLever.class,
        new LiftLeverTileEntityRenderer());
    ClientRegistry.bindTileEntitySpecialRenderer(TileEntityValkyriumCompressorPart.class,
        new ValkyriumCompressorPartTileEntityRenderer());
    ClientRegistry.bindTileEntitySpecialRenderer(TileEntityRudderPart.class,
        new RudderPartTileEntityRenderer());
    ClientRegistry.bindTileEntitySpecialRenderer(TileEntityGiantPropellerPart.class,
        new GiantPropellerPartTileEntityRenderer());
    ClientRegistry.bindTileEntitySpecialRenderer(TileEntityRotationAxle.class,
        new RotationAxleTileEntityRenderer());
}
 
Example 4
Source File: ProxyClient.java    From WearableBackpacks with MIT License 6 votes vote down vote up
@Override
public void init() {
	super.init();
	Minecraft mc = Minecraft.getMinecraft();
	
	if (BackpacksContent.BACKPACK != null) {
		mc.getBlockColors().registerBlockColorHandler(BLOCK_COLOR, MiscUtils.getBlockFromItem(BackpacksContent.BACKPACK));
		mc.getItemColors().registerItemColorHandler(ITEM_COLOR, BackpacksContent.BACKPACK);
		ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBackpack.class, new RendererBackpack.TileEntity());
	}
	
	RenderManager manager = mc.getRenderManager();
	Map<String, RenderPlayer> skinMap = manager.getSkinMap();
	for (RenderPlayer renderer : skinMap.values()) {
		renderer.addLayer(new RendererBackpack.Layer(renderer));
	}
}
 
Example 5
Source File: ExtraRandomness.java    From CommunityMod with GNU Lesser General Public License v2.1 5 votes vote down vote up
@SideOnly(Side.CLIENT)
@Override
public void registerModels(ModelRegistryEvent event) {
	ClientUtil.simpleItemModel(itemBlockAltar);
	
	altarItems.forEach(ClientUtil::simpleItemModel);
	
	// I am lazy.
	ClientRegistry.bindTileEntitySpecialRenderer(TileEntityAltar.class, new RenderAltar());
}
 
Example 6
Source File: TileEntityRegistry.java    From Sakura_mod with MIT License 5 votes vote down vote up
@SideOnly(Side.CLIENT)
public static void render() {
    ClientRegistry.bindTileEntitySpecialRenderer(TileEntityCampfire.class, new RenderTileEntityCampfire());
    ClientRegistry.bindTileEntitySpecialRenderer(TileEntityStoneMortar.class, new RenderTileEntityStoneMortar());
    ClientRegistry.bindTileEntitySpecialRenderer(TileEntityCampfirePot.class, new RenderTileEntityCampfirePot());
    ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMapleCauldron.class, new RenderTileEntityMapleCauldron());
    ClientRegistry.bindTileEntitySpecialRenderer(TileEntityShoji.class, new ShojiRender());
    ClientRegistry.bindTileEntitySpecialRenderer(TileEntityOben.class, new RenderTileEntityOben());
    getItem(BlockLoader.STONEMORTAR).setTileEntityItemStackRenderer(new TileEntityRenderHelper());
}
 
Example 7
Source File: ClientProxy.java    From NOVA-Core with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Override
public void preInit(FMLPreInitializationEvent evt) {
	super.preInit(evt);
	MinecraftForge.EVENT_BUS.register(RenderUtility.instance);
	ClientRegistry.bindTileEntitySpecialRenderer(FWTile.class, FWTileRenderer.instance);
	RenderUtility.instance.preInit(evt);
}
 
Example 8
Source File: ClientProxy.java    From NOVA-Core with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Override
public void preInit(FMLPreInitializationEvent evt) {
	super.preInit(evt);
	MinecraftForge.EVENT_BUS.register(RenderUtility.instance);
	ClientRegistry.bindTileEntitySpecialRenderer(FWTile.class, FWTileRenderer.instance);
	RenderUtility.instance.preInit(evt);
}
 
Example 9
Source File: ClientProxy.java    From ExNihiloAdscensio with MIT License 5 votes vote down vote up
@Override
public void registerRenderers()
{
	ClientRegistry.bindTileEntitySpecialRenderer(TileBarrel.class, new RenderBarrel());
	ClientRegistry.bindTileEntitySpecialRenderer(TileCrucible.class, new RenderCrucible());
	ClientRegistry.bindTileEntitySpecialRenderer(TileSieve.class, new RenderSieve());
	ClientRegistry.bindTileEntitySpecialRenderer(TileInfestedLeaves.class, new RenderInfestedLeaves());
	RenderingRegistry.registerEntityRenderingHandler(ProjectileStone.class, new RenderProjectileStone.Factory());
}
 
Example 10
Source File: ClientProxy.java    From Valkyrien-Skies with Apache License 2.0 5 votes vote down vote up
@Override
public void postInit(FMLPostInitializationEvent e) {
    super.postInit(e);
    Minecraft.getMinecraft().getFramebuffer().enableStencil();

    // Register physics infuser tile entity renderer.
    ClientRegistry.bindTileEntitySpecialRenderer(TileEntityPhysicsInfuser.class,
        new TileEntityPhysicsInfuserRenderer());
}
 
Example 11
Source File: TileEntityRegistry.java    From TofuCraftReload with MIT License 5 votes vote down vote up
@SideOnly(Side.CLIENT)
public static void render() {
	TileEntityRenderHelper TESR = new TileEntityRenderHelper();
    Item.getItemFromBlock(BlockLoader.TOFUCHEST).setTileEntityItemStackRenderer(TESR);
    ClientRegistry.bindTileEntitySpecialRenderer(TileEntityTofuChest.class, new RenderTofuChest());
    ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySaltPan.class, new RenderSaltPan());
    
}
 
Example 12
Source File: BlockOrbHolder.java    From Wizardry with GNU Lesser General Public License v3.0 4 votes vote down vote up
@SideOnly(Side.CLIENT)
public void initModel() {
	ClientRegistry.bindTileEntitySpecialRenderer(TileOrbHolder.class, new TileOrbHolderRenderer());
}
 
Example 13
Source File: BlockManaMagnet.java    From Wizardry with GNU Lesser General Public License v3.0 4 votes vote down vote up
@SideOnly(Side.CLIENT)
public void initModel() {
	ClientRegistry.bindTileEntitySpecialRenderer(TileManaMagnet.class, new TileManaMagnetRenderer());
}
 
Example 14
Source File: TileRegistry.java    From Logistics-Pipes-2 with MIT License 4 votes vote down vote up
public static void bindRenders() {
	ClientRegistry.bindTileEntitySpecialRenderer(TileBasicPipe.class, new TileRenderBasicPipe());
	ClientRegistry.bindTileEntitySpecialRenderer(TileRoutedPipe.class, new TileRenderBasicPipe());
	ClientRegistry.bindTileEntitySpecialRenderer(TileBlockingPipe.class, new TileRenderBasicPipe());
}
 
Example 15
Source File: BlockPuzzle.java    From YouTubeModdingTutorial with MIT License 4 votes vote down vote up
@SideOnly(Side.CLIENT)
@Override
public void initModel() {
    super.initModel();
    ClientRegistry.bindTileEntitySpecialRenderer(TilePuzzle.class, new PuzzleTESR());
}
 
Example 16
Source File: ClientProxy.java    From Signals with GNU General Public License v3.0 4 votes vote down vote up
@Override
public void preInit(){
    MinecraftForge.EVENT_BUS.register(eventHandler);
    MinecraftForge.EVENT_BUS.register(GlassesHUD.getInstance());
    ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySignalBase.class, new SignalStatusRenderer());
}
 
Example 17
Source File: BlockTank.java    From YouTubeModdingTutorial with MIT License 4 votes vote down vote up
@Override
@SideOnly(Side.CLIENT)
public void initModel() {
    super.initModel();
    ClientRegistry.bindTileEntitySpecialRenderer(TileTank.class, new TankTESR());
}
 
Example 18
Source File: BlockGenerator.java    From YouTubeModdingTutorial with MIT License 4 votes vote down vote up
@SideOnly(Side.CLIENT)
@Override
public void initModel() {
    super.initModel();
    ClientRegistry.bindTileEntitySpecialRenderer(TileGenerator.class, new AnimationTESR<>());
}
 
Example 19
Source File: ClientProxy.java    From AdvancedRocketry with MIT License 4 votes vote down vote up
@Override
public void registerRenderers() {


	ClientRegistry.bindTileEntitySpecialRenderer(TileRocketBuilder.class, new RendererRocketBuilder());
	//ClientRegistry.bindTileEntitySpecialRenderer(TileModelRender.class, modelBlock);
	ClientRegistry.bindTileEntitySpecialRenderer(TilePrecisionAssembler.class, new RendererPrecisionAssembler());
	ClientRegistry.bindTileEntitySpecialRenderer(TileCuttingMachine.class, new RendererCuttingMachine());
	ClientRegistry.bindTileEntitySpecialRenderer(TileCrystallizer.class, new RendererCrystallizer());
	ClientRegistry.bindTileEntitySpecialRenderer(TileObservatory.class, new RendererObservatory());
	ClientRegistry.bindTileEntitySpecialRenderer(TileAstrobodyDataProcessor.class, new RenderPlanetAnalyser());
	ClientRegistry.bindTileEntitySpecialRenderer(TileLathe.class, new RendererLathe());
	ClientRegistry.bindTileEntitySpecialRenderer(TileRollingMachine.class, new RendererRollingMachine());
	ClientRegistry.bindTileEntitySpecialRenderer(TileElectrolyser.class, new RendererElectrolyser());
	ClientRegistry.bindTileEntitySpecialRenderer(TileWarpCore.class, new RendererWarpCore());
	ClientRegistry.bindTileEntitySpecialRenderer(TileChemicalReactor.class, new RendererChemicalReactor("advancedrocketry:models/ChemicalReactor.obj", "advancedrocketry:textures/models/ChemicalReactor.png"));
	ClientRegistry.bindTileEntitySpecialRenderer(TileSchematic.class, new RendererPhantomBlock());
	//ClientRegistry.bindTileEntitySpecialRenderer(TileDrill.class, new RendererDrill());
	ClientRegistry.bindTileEntitySpecialRenderer(TileLiquidPipe.class, new RendererPipe(new ResourceLocation("AdvancedRocketry:textures/blocks/pipeLiquid.png")));
	ClientRegistry.bindTileEntitySpecialRenderer(TileDataPipe.class, new RendererPipe(new ResourceLocation("AdvancedRocketry:textures/blocks/pipeData.png")));
	ClientRegistry.bindTileEntitySpecialRenderer(TileEnergyPipe.class, new RendererPipe(new ResourceLocation("AdvancedRocketry:textures/blocks/pipeEnergy.png")));
	ClientRegistry.bindTileEntitySpecialRenderer(TileMicrowaveReciever.class, new RendererMicrowaveReciever());
	ClientRegistry.bindTileEntitySpecialRenderer(TileSpaceLaser.class, new RenderLaserTile());
	ClientRegistry.bindTileEntitySpecialRenderer(TileBiomeScanner.class, new RenderBiomeScanner());
	ClientRegistry.bindTileEntitySpecialRenderer(TileAtmosphereTerraformer.class, new RenderTerraformerAtm());
	ClientRegistry.bindTileEntitySpecialRenderer(TileFluidTank.class, new RenderTank());
	ClientRegistry.bindTileEntitySpecialRenderer(zmaster587.advancedRocketry.tile.multiblock.TileSpaceLaser.class, new zmaster587.advancedRocketry.client.render.multiblocks.RenderLaser());
	ClientRegistry.bindTileEntitySpecialRenderer(zmaster587.advancedRocketry.tile.multiblock.TileRailgun.class, new zmaster587.advancedRocketry.client.render.multiblocks.RendererRailgun());
	ClientRegistry.bindTileEntitySpecialRenderer(zmaster587.advancedRocketry.tile.multiblock.TileGravityController.class, new zmaster587.advancedRocketry.client.render.multiblocks.RenderGravityMachine());
	ClientRegistry.bindTileEntitySpecialRenderer(zmaster587.advancedRocketry.tile.multiblock.TileSpaceElevator.class, new zmaster587.advancedRocketry.client.render.multiblocks.RendererSpaceElevator());
	ClientRegistry.bindTileEntitySpecialRenderer(zmaster587.advancedRocketry.tile.multiblock.TileBeacon.class, new zmaster587.advancedRocketry.client.render.multiblocks.RenderBeacon());

	//ClientRegistry.bindTileEntitySpecialRenderer(TileModelRenderRotatable.class, modelBlock);

	//RendererModelBlock blockRenderer = new RendererModelBlock();

	//RendererBucket bucket =  new RendererBucket();
	//MinecraftForgeClient.registerItemRenderer(AdvancedRocketryItems.itemBucketRocketFuel, bucket);
	//MinecraftForgeClient.registerItemRenderer(AdvancedRocketryItems.itemBucketNitrogen, bucket);
	//MinecraftForgeClient.registerItemRenderer(AdvancedRocketryItems.itemBucketHydrogen, bucket);
	//MinecraftForgeClient.registerItemRenderer(AdvancedRocketryItems.itemBucketOxygen, bucket);

	RenderingRegistry.registerEntityRenderingHandler(EntityRocket.class, (IRenderFactory<EntityRocket>)new RendererRocket(null));
	RenderingRegistry.registerEntityRenderingHandler(EntityLaserNode.class, (IRenderFactory<EntityLaserNode>)new RenderLaser(2.0, new float[] {1F, 0.25F, 0.25F, 0.2F}, new float[] {0.9F, 0.2F, 0.3F, 0.5F}));
	RenderingRegistry.registerEntityRenderingHandler(EntityItemAbducted.class, (IRenderFactory<EntityItemAbducted>)new RendererItem(Minecraft.getMinecraft().getRenderManager(), Minecraft.getMinecraft().getRenderItem()));
	RenderingRegistry.registerEntityRenderingHandler(EntityUIPlanet.class, (IRenderFactory<EntityUIPlanet>)new RenderPlanetUIEntity(null));
	RenderingRegistry.registerEntityRenderingHandler(EntityUIButton.class, (IRenderFactory<EntityUIButton>)new RenderButtonUIEntity(null));
	RenderingRegistry.registerEntityRenderingHandler(EntityUIStar.class, (IRenderFactory<EntityUIStar>)new RenderStarUIEntity(null));
	RenderingRegistry.registerEntityRenderingHandler(EntityElevatorCapsule.class, (IRenderFactory<EntityElevatorCapsule>)new RenderElevatorCapsule(null));
}
 
Example 20
Source File: GTProxyClient.java    From GT-Classic with GNU Lesser General Public License v3.0 4 votes vote down vote up
public void onRegisterRender() {
	ClientRegistry.bindTileEntitySpecialRenderer(GTTileDisplayScreen.class, new GTRenderDisplayScreen());
}