Skip to content

Fixed block particle duplication bug#24

Open
Geforce132 wants to merge 1 commit intoXCompWiz:masterfrom
Geforce132:master
Open

Fixed block particle duplication bug#24
Geforce132 wants to merge 1 commit intoXCompWiz:masterfrom
Geforce132:master

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.

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 join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants