mojira.dev
MC-117872

Paths at village edges can end up with more torches than intended

See also: Forge Issue Tracker

The Symptoms
When adding a larger number of buildings, the road networks get crazy large.

The Problem
For reference: See class c => func_176067_c => generateComponent

There is a 'total weight' variable i, which is calculated from the village's structureVillageWeightedPieceList sum of weights. After a component piece has reached its limit, it is removed from the list, but the total weight is not adjusted. This leads to an increasing amount of just torch roads returned later in the method.

Solution Approach
Subtract the removed components' weight from the total weight on removal. Test if total weight reached < 0 and if so, return with null from the method.

Comments 1

I think you can close this - I might just have been tired and didn't see the early exit.

Lukas Tenbrink

(Unassigned)

Unconfirmed

Minecraft 1.11.2

Retrieved