Closed FledgeXu closed 3 years ago
那么问题出现了,GH-6 和 GH-7 之间只能选一个,选哪个?
Donk
I don’t think it will cause render performance issues. People will not hold the block too long. But, Indeed there is a better way to achieve it. However, I need to do more tests. On Oct 24, 2020, 15:24 +0800, Seraph_JACK notifications@github.com, wrote:
@SeraphJACK commented on this pull request. In src/main/java/org/teacon/slides/render/ProjectorWorldRender.java:
- World world = player.getEntityWorld();
- matrixStack.push();
- Vec3d projectedView = Minecraft.getInstance().gameRenderer.getActiveRenderInfo().getProjectedView();
- matrixStack.translate(-projectedView.x, -projectedView.y, -projectedView.z); // In default situation, the original position of matrix in world origin point. We should translate it.
- Matrix4f matrix = matrixStack.getLast().getMatrix();
- BlockPos.Mutable pos = new BlockPos.Mutable();
- for (int dx = -10; dx <= 10; dx++) {
- for (int dy = -10; dy <= 10; dy++) {
- for (int dz = -10; dz <= 10; dz++) {
- pos.setPos(px + dx, py + dy, pz + dz);
- //Check ProjectorTileEntity
- if (world.getTileEntity(pos) != null && world.getTileEntity(pos).getType() == ProjectorTileEntity.theType) { Won't this cause render performance issues? I think @ustc-zzzz 's solution is more efficient. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
Merged to 1.15-forge branch manually.
This PR solve https://github.com/teaconmc/SlideShow/issues/4. Comparing to https://github.com/teaconmc/SlideShow/pull/6, this solution doesn't need any dummy entity. Before:
After: