mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-13 00:37:52 +00:00
Fixed a Forge blockstates json removing models causing an NPE in the loader.
Fixed the deep clone of a V1 Variant not cloning the submodels properly.
This commit is contained in:
1 parent
0cf1f0d51c
commit
e580d3b6b6
1 file changed
+12
-1
@@ -6,6 +6,7 @@ import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.EnumMap;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
@@ -146,6 +147,16 @@ public class ForgeBlockStateV1 extends Marker
|
||||
part.state = state;
|
||||
}
|
||||
}
|
||||
|
||||
Iterator<List<Variant>> iter = v.submodels.values().iterator();
|
||||
|
||||
while (iter.hasNext())
|
||||
{
|
||||
List<Variant> submodel = iter.next();
|
||||
|
||||
if (submodel == null)
|
||||
iter.remove();
|
||||
}
|
||||
|
||||
if (v.textures != null)
|
||||
{
|
||||
@@ -283,7 +294,7 @@ public class ForgeBlockStateV1 extends Marker
|
||||
this.uvLock = other.uvLock;
|
||||
this.weight = other.weight;
|
||||
this.textures.putAll(other.textures);
|
||||
this.submodels.putAll(other.submodels);
|
||||
this.mergeModelPartVariants(this.submodels, other.submodels);
|
||||
this.simpleSubmodels.putAll(other.simpleSubmodels);
|
||||
this.customData.putAll(other.customData);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user