-
-
Notifications
You must be signed in to change notification settings - Fork 179
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix render bounds of more block entities (#384)
Shulker box, end gateway, spawner, trial spawner and piston
- Loading branch information
Showing
5 changed files
with
50 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
patches/net/minecraft/client/renderer/blockentity/SpawnerRenderer.java.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- a/net/minecraft/client/renderer/blockentity/SpawnerRenderer.java | ||
+++ b/net/minecraft/client/renderer/blockentity/SpawnerRenderer.java | ||
@@ -57,4 +_,10 @@ | ||
p_312703_.render(p_312223_, 0.0, 0.0, 0.0, 0.0F, p_311943_, p_312805_, p_312394_, p_311996_); | ||
p_312805_.popPose(); | ||
} | ||
+ | ||
+ @Override | ||
+ public net.minecraft.world.phys.AABB getRenderBoundingBox(SpawnerBlockEntity blockEntity) { | ||
+ net.minecraft.core.BlockPos pos = blockEntity.getBlockPos(); | ||
+ return new net.minecraft.world.phys.AABB(pos.getX() - 1.0, pos.getY() - 1.0, pos.getZ() - 1.0, pos.getX() + 2.0, pos.getY() + 2.0, pos.getZ() + 2.0); | ||
+ } | ||
} |
12 changes: 12 additions & 0 deletions
12
patches/net/minecraft/client/renderer/blockentity/TheEndGatewayRenderer.java.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- a/net/minecraft/client/renderer/blockentity/TheEndGatewayRenderer.java | ||
+++ b/net/minecraft/client/renderer/blockentity/TheEndGatewayRenderer.java | ||
@@ -51,4 +_,9 @@ | ||
public int getViewDistance() { | ||
return 256; | ||
} | ||
+ | ||
+ @Override | ||
+ public net.minecraft.world.phys.AABB getRenderBoundingBox(TheEndGatewayBlockEntity blockEntity) { | ||
+ return blockEntity.isSpawning() || blockEntity.isCoolingDown() ? INFINITE_EXTENT_AABB : super.getRenderBoundingBox(blockEntity); | ||
+ } | ||
} |
13 changes: 13 additions & 0 deletions
13
patches/net/minecraft/client/renderer/blockentity/TrialSpawnerRenderer.java.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- a/net/minecraft/client/renderer/blockentity/TrialSpawnerRenderer.java | ||
+++ b/net/minecraft/client/renderer/blockentity/TrialSpawnerRenderer.java | ||
@@ -32,4 +_,10 @@ | ||
} | ||
} | ||
} | ||
+ | ||
+ @Override | ||
+ public net.minecraft.world.phys.AABB getRenderBoundingBox(TrialSpawnerBlockEntity blockEntity) { | ||
+ net.minecraft.core.BlockPos pos = blockEntity.getBlockPos(); | ||
+ return new net.minecraft.world.phys.AABB(pos.getX() - 1.0, pos.getY() - 1.0, pos.getZ() - 1.0, pos.getX() + 2.0, pos.getY() + 2.0, pos.getZ() + 2.0); | ||
+ } | ||
} |