net.minecraft.client.render.block.entity.BlockEntityRenderDispatcher Java Examples

The following examples show how to use net.minecraft.client.render.block.entity.BlockEntityRenderDispatcher. 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: PistonBlockEntityRenderer_movableTEMixin.java    From fabric-carpet with MIT License 6 votes vote down vote up
@Inject(method = "render", at = @At("RETURN"), locals = LocalCapture.NO_CAPTURE)
private void endMethod3576(PistonBlockEntity pistonBlockEntity_1, float partialTicks, MatrixStack matrixStack_1, VertexConsumerProvider layeredVertexConsumerStorage_1, int int_1, int init_2, CallbackInfo ci)
{
    if (((PistonBlockEntityInterface) pistonBlockEntity_1).getRenderCarriedBlockEntity())
    {
        BlockEntity carriedBlockEntity = ((PistonBlockEntityInterface) pistonBlockEntity_1).getCarriedBlockEntity();
        if (carriedBlockEntity != null)
        {
            carriedBlockEntity.setPos(pistonBlockEntity_1.getPos());
            //((BlockEntityRenderDispatcherInterface) BlockEntityRenderDispatcher.INSTANCE).renderBlockEntityOffset(carriedBlockEntity, float_1, int_1, BlockRenderLayer.field_20799, bufferBuilder_1, pistonBlockEntity_1.getRenderOffsetX(float_1), pistonBlockEntity_1.getRenderOffsetY(float_1), pistonBlockEntity_1.getRenderOffsetZ(float_1));
            matrixStack_1.translate(
                    pistonBlockEntity_1.getRenderOffsetX(partialTicks),
                    pistonBlockEntity_1.getRenderOffsetY(partialTicks),
                    pistonBlockEntity_1.getRenderOffsetZ(partialTicks)
            );
            BlockEntityRenderDispatcher.INSTANCE.render(carriedBlockEntity, partialTicks, matrixStack_1, layeredVertexConsumerStorage_1);

        }
    }
}
 
Example #2
Source File: RenderUtils.java    From bleachhack-1.14 with GNU General Public License v3.0 6 votes vote down vote up
public static void offsetRender() {
	Camera camera = BlockEntityRenderDispatcher.INSTANCE.camera;
	Vec3d camPos = camera.getPos();
	GL11.glRotated(MathHelper.wrapDegrees(camera.getPitch()), 1, 0, 0);
	GL11.glRotated(MathHelper.wrapDegrees(camera.getYaw() + 180.0), 0, 1, 0);
	GL11.glTranslated(-camPos.x, -camPos.y, -camPos.z);
}
 
Example #3
Source File: RenderUtils.java    From bleachhack-1.14 with GNU General Public License v3.0 5 votes vote down vote up
public static void offsetRender() {
	Camera camera = BlockEntityRenderDispatcher.INSTANCE.camera;
	Vec3d camPos = camera.getPos();
	GL11.glRotated(MathHelper.wrapDegrees(camera.getPitch()), 1, 0, 0);
	GL11.glRotated(MathHelper.wrapDegrees(camera.getYaw() + 180.0), 0, 1, 0);
	GL11.glTranslated(-camPos.x, -camPos.y, -camPos.z);
}
 
Example #4
Source File: BuiltinModelItemRendererMixin.java    From the-hallow with MIT License 5 votes vote down vote up
@Inject(at = @At("HEAD"), method = "render(Lnet/minecraft/item/ItemStack;Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider;II)V", cancellable = true)
private void renderTreasureChest(final ItemStack itemStack, MatrixStack matrix, VertexConsumerProvider vertexConsumerProvider, int light, int overlay, final CallbackInfo info) {
	if (itemStack.getItem().equals(HallowedBlocks.HALLOWED_TREASURE_CHEST.asItem())) {
		BlockEntityRenderDispatcher.INSTANCE.renderEntity(this.chestEntity, matrix, vertexConsumerProvider, light, overlay);
		info.cancel();
	}
}
 
Example #5
Source File: InfusionPillarBlockEntityRenderer.java    From the-hallow with MIT License 4 votes vote down vote up
public InfusionPillarBlockEntityRenderer(BlockEntityRenderDispatcher blockEntityRenderDispatcher) {
	super(blockEntityRenderDispatcher);
}
 
Example #6
Source File: PonySkullRenderer.java    From MineLittlePony with MIT License 4 votes vote down vote up
public PonySkullRenderer(BlockEntityRenderDispatcher dispatcher) {
    super(dispatcher);

    INSTANCE = this;
}
 
Example #7
Source File: PistonBlockEntityRenderer_movableTEMixin.java    From fabric-carpet with MIT License 4 votes vote down vote up
public PistonBlockEntityRenderer_movableTEMixin(BlockEntityRenderDispatcher blockEntityRenderDispatcher_1)
{
    super(blockEntityRenderDispatcher_1);
}
 
Example #8
Source File: HallowedTreasureChestBlockEntityRenderer.java    From the-hallow with MIT License 4 votes vote down vote up
public HallowedTreasureChestBlockEntityRenderer(BlockEntityRenderDispatcher dispatcher) {
	super(dispatcher);
}
 
Example #9
Source File: ConfigurableElectricMachineBlockEntityRenderer.java    From Galacticraft-Rewoven with MIT License 4 votes vote down vote up
public ConfigurableElectricMachineBlockEntityRenderer(BlockEntityRenderDispatcher dispatcher) {
    super(dispatcher);
}
 
Example #10
Source File: TinyPumpkinRenderer.java    From the-hallow with MIT License 4 votes vote down vote up
public TinyPumpkinRenderer(BlockEntityRenderDispatcher dispatcher) {
	super(dispatcher);
}
 
Example #11
Source File: InfusionAltarBlockEntityRenderer.java    From the-hallow with MIT License 4 votes vote down vote up
public InfusionAltarBlockEntityRenderer(BlockEntityRenderDispatcher blockEntityRenderDispatcher) {
	super(blockEntityRenderDispatcher);
}
 
Example #12
Source File: RefineryBlockEntityRenderer.java    From Galacticraft-Rewoven with MIT License 4 votes vote down vote up
public RefineryBlockEntityRenderer(BlockEntityRenderDispatcher dispatcher) {
    super(dispatcher);
}
 
Example #13
Source File: BasicSolarPanelBlockEntityRenderer.java    From Galacticraft-Rewoven with MIT License 4 votes vote down vote up
public BasicSolarPanelBlockEntityRenderer(BlockEntityRenderDispatcher dispatcher) {
    super(dispatcher);
    this.panelMain = new ModelPart(256, 128, 0, 0);
    this.panelMain.addCuboid(-23F, -0.5F, -23F, 46, 1, 46);
    this.panelMain.setPivot(0F, 0F, 0F);
    this.panelMain.setTextureSize(256, 128);
    this.panelMain.mirror = true;
    this.setRotation(this.panelMain);
    this.sideHorizontal0 = new ModelPart(256, 128, 0, 48);
    this.sideHorizontal0.addCuboid(-24F, -1.111F, -23F, 1, 1, 46);
    this.sideHorizontal0.setPivot(0F, 0F, 0F);
    this.sideHorizontal0.setTextureSize(256, 128);
    this.sideHorizontal0.mirror = true;
    this.setRotation(this.sideHorizontal0);
    this.sideVertical0 = new ModelPart(256, 128, 94, 48);
    this.sideVertical0.addCuboid(-24F, -1.1F, 23F, 48, 1, 1);
    this.sideVertical0.setPivot(0F, 0F, 0F);
    this.sideVertical0.setTextureSize(256, 128);
    this.sideVertical0.mirror = true;
    this.setRotation(this.sideVertical0);
    this.sideVertical2 = new ModelPart(256, 128, 94, 48);
    this.sideVertical2.addCuboid(-24F, -1.1F, -24F, 48, 1, 1);
    this.sideVertical2.setPivot(0F, 0F, 0F);
    this.sideVertical2.setTextureSize(256, 128);
    this.sideVertical2.mirror = true;
    this.setRotation(this.sideVertical2);
    this.sideVertical1 = new ModelPart(256, 128, 94, 48);
    this.sideVertical1.addCuboid(-24F, -1.1F, -0.5F, 48, 1, 1);
    this.sideVertical1.setPivot(0F, 0F, 0F);
    this.sideVertical1.setTextureSize(256, 128);
    this.sideVertical1.mirror = true;
    this.setRotation(this.sideVertical1);
    this.sideHorizontal1 = new ModelPart(256, 128, 0, 48);
    this.sideHorizontal1.addCuboid(-9F, -1.111F, -23F, 1, 1, 46);
    this.sideHorizontal1.setPivot(0F, 0F, 0F);
    this.sideHorizontal1.setTextureSize(256, 128);
    this.sideHorizontal1.mirror = true;
    this.setRotation(this.sideHorizontal1);
    this.sideHorizontal3 = new ModelPart(256, 128, 0, 48);
    this.sideHorizontal3.addCuboid(23F, -1.111F, -23F, 1, 1, 46);
    this.sideHorizontal3.setPivot(0F, 0F, 0F);
    this.sideHorizontal3.setTextureSize(256, 128);
    this.sideHorizontal3.mirror = true;
    this.setRotation(this.sideHorizontal3);
    this.sideHorizontal2 = new ModelPart(256, 128, 0, 48);
    this.sideHorizontal2.addCuboid(8F, -1.111F, -23F, 1, 1, 46);
    this.sideHorizontal2.setPivot(0F, 0F, 0F);
    this.sideHorizontal2.setTextureSize(256, 128);
    this.sideHorizontal2.mirror = true;
    this.setRotation(this.sideHorizontal2);
    this.pole = new ModelPart(256, 128, 94, 50);
    this.pole.addCuboid(-1.5F, 0.0F, -1.5F, 3, 24, 3);
    this.pole.setPivot(0F, 0F, 0F);
    this.pole.setTextureSize(256, 128);
    this.pole.mirror = true;
    this.setRotation(this.pole);
}
 
Example #14
Source File: CoalGeneratorBlockEntityRenderer.java    From Galacticraft-Rewoven with MIT License 4 votes vote down vote up
public CoalGeneratorBlockEntityRenderer(BlockEntityRenderDispatcher dispatcher) {
    super(dispatcher);
}
 
Example #15
Source File: OxygenCollectorBlockEntityRenderer.java    From Galacticraft-Rewoven with MIT License 4 votes vote down vote up
public OxygenCollectorBlockEntityRenderer(BlockEntityRenderDispatcher dispatcher) {
    super(dispatcher);
}
 
Example #16
Source File: CircuitFabricatorBlockEntityRenderer.java    From Galacticraft-Rewoven with MIT License 4 votes vote down vote up
public CircuitFabricatorBlockEntityRenderer(BlockEntityRenderDispatcher dispatcher) {
    super(dispatcher);
}
 
Example #17
Source File: EnergyStorageModuleBlockEntityRenderer.java    From Galacticraft-Rewoven with MIT License 4 votes vote down vote up
public EnergyStorageModuleBlockEntityRenderer(BlockEntityRenderDispatcher dispatcher) {
    super(dispatcher);
}
 
Example #18
Source File: ClientRegistry.java    From patchwork-api with GNU Lesser General Public License v2.1 2 votes vote down vote up
/**
 * Registers a {@link BlockEntityRenderer}
 * Call this during {@link net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent}.
 * This method is safe to call during parallel mod loading.
 */
public static synchronized <T extends BlockEntity> void bindTileEntitySpecialRenderer(Class<T> tileEntityClass, BlockEntityRenderer<? super T> specialRenderer) {
	BlockEntityRendererRegistry.INSTANCE.register(tileEntityClass, specialRenderer);
	specialRenderer.setRenderManager(BlockEntityRenderDispatcher.INSTANCE);
}