User Tools

Site Tools


zh_cn:tutorial:blockentityrenderers

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
zh_cn:tutorial:blockentityrenderers [2022/06/10 12:52] solidblockzh_cn:tutorial:blockentityrenderers [2023/08/29 10:31] (current) – [例子] wjz_p
Line 54: Line 54:
     @Override     @Override
     public void onInitializeClient() {     public void onInitializeClient() {
-        BlockEntityRendererRegistry.INSTANCE.register(DEMO_BLOCK_ENTITY, DemoBlockEntityRenderer::new);+        BlockEntityRendererRegistry.register(DEMO_BLOCK_ENTITY, DemoBlockEntityRenderer::new); 
 +        //不行就试试BlockEntityRendererRegistry.INSTANCE.register(DEMO_BLOCK_ENTITY, DemoBlockEntityRenderer::new);
     }     }
 </code> </code>
Line 79: Line 80:
  
         // 旋转物品         // 旋转物品
-        matrices.multiply(Vec3f.POSITIVE_Y.getDegreesQuaternion((blockEntity.getWorld().getTime() + tickDelta) * 4));+        matrices.multiply(RotationAxis.POSITIVE_Y.rotationDegrees((blockEntity.getWorld().getTime() + tickDelta) * 4));
     }     }
 </code> </code>
zh_cn/tutorial/blockentityrenderers.1654865548.txt.gz · Last modified: 2022/06/10 12:52 by solidblock