Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Fixed block particle duplication bug #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Geforce132
Copy link

This fixes the block-breaking duplication bug that occurs when there is a view in the same dimension as the player.

@@ -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());
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Formatting error. Please correct and squash. :)

@XCompWiz
Copy link
Owner

XCompWiz commented Aug 8, 2016

Looks good! :D Are there any side effect to removing and readding the renderer every frame?
I think there is logic to detect the "main world" changing. Wouldn't it be more practical to only do this on that change?

@Geforce132
Copy link
Author

Ah, yeah, that would be better, lol.

What was the logic you were thinking of? I can hopefully test it out.

@XCompWiz
Copy link
Owner

XCompWiz commented Aug 9, 2016

It's been a year, nearly, so I don't remember the exact location or if it is still in, but I recall a section of code detecting Overworld world changes (by comparison) and handling world changes somewhere. I feel the detection was probably in the ProxyWorldManager, though I think the handling was called from there and somewhere else. You shouldn't have to look far from this class, really.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants