Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,15 @@ public static WorldView createWorldView(int dimid, ChunkCoordinates spawn, int w
EntityLivingBase backup = mc.renderViewEntity;
mc.renderViewEntity = view.camera;
view.getRenderGlobal().setWorldAndLoadRenderers(proxyworld);
if(proxyworld.provider.dimensionId == Minecraft.getMinecraft().thePlayer.dimension) {
proxyworld.removeWorldAccess(view.getRenderGlobal());
}
else if(proxyworld.provider.dimensionId != Minecraft.getMinecraft().thePlayer.dimension){
// Since there is no "getWorldAccess" or "hasWorldAccess(dim)" method in WorldClient,
// this is a makeshift way to prevent duplicate world accesses being added
proxyworld.removeWorldAccess(view.getRenderGlobal());
proxyworld.addWorldAccess(view.getRenderGlobal());
}
mc.renderViewEntity = backup;

// Inform the server of the new view
Expand Down