User Tools

Site Tools


tutorial:blockentityrenderers

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
tutorial:blockentityrenderers [2019/12/14 21:51]
juuz It takes a BEType now
tutorial:blockentityrenderers [2020/03/29 15:44] (current)
jamieswhiteshirt Updated based on newer mappings
Line 98: Line 98:
     public void render(DemoBlockEntity blockEntity,​ float tickDelta, MatrixStack matrices, VertexConsumerProvider vertexConsumers,​ int light, int overlay) {     public void render(DemoBlockEntity blockEntity,​ float tickDelta, MatrixStack matrices, VertexConsumerProvider vertexConsumers,​ int light, int overlay) {
         [...]         [...]
-        MinecraftClient.getInstance().getItemRenderer().renderItem(stack,​ ModelTransformation.Type.GROUND, light, overlay, matrices, vertexConsumers);​+        MinecraftClient.getInstance().getItemRenderer().renderItem(stack,​ ModelTransformation.Mode.GROUND, light, overlay, matrices, vertexConsumers);​
  
         // Mandatory call after GL calls         // Mandatory call after GL calls
Line 119: Line 119:
         ​         ​
         int lightAbove = WorldRenderer.getLightmapCoordinates(blockEntity.getWorld(),​ blockEntity.getPos().up());​         int lightAbove = WorldRenderer.getLightmapCoordinates(blockEntity.getWorld(),​ blockEntity.getPos().up());​
-        MinecraftClient.getInstance().getItemRenderer().renderItem(stack,​ ModelTransformation.Type.GROUND, lightAbove, OverlayTexture.DEFAULT_UV,​ matrices, vertexConsumers);​+        MinecraftClient.getInstance().getItemRenderer().renderItem(stack,​ ModelTransformation.Mode.GROUND, lightAbove, OverlayTexture.DEFAULT_UV,​ matrices, vertexConsumers);​
         ​         ​
         [...]         [...]
tutorial/blockentityrenderers.txt · Last modified: 2020/03/29 15:44 by jamieswhiteshirt