mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-18 19:39:22 +00:00
Disable guiLight3d for generated item models (#9231)
This commit is contained in:
1 parent
16bc7cf783
commit
b5073c10ef
2 files changed
+10
-2
No files matched your search
+2
-1
@@ -1,10 +1,11 @@
|
||||
--- a/net/minecraft/client/renderer/block/model/ItemModelGenerator.java
|
||||
+++ b/net/minecraft/client/renderer/block/model/ItemModelGenerator.java
|
||||
@@ -39,6 +_,7 @@
|
||||
@@ -39,6 +_,8 @@
|
||||
map.put("particle", p_111672_.m_111477_("particle") ? Either.left(p_111672_.m_111480_("particle")) : map.get("layer0"));
|
||||
BlockModel blockmodel = new BlockModel((ResourceLocation)null, list, map, false, p_111672_.m_111479_(), p_111672_.m_111491_(), p_111672_.m_111484_());
|
||||
blockmodel.f_111416_ = p_111672_.f_111416_;
|
||||
+ blockmodel.customData.copyFrom(p_111672_.customData);
|
||||
+ blockmodel.customData.setGui3d(false);
|
||||
return blockmodel;
|
||||
}
|
||||
|
||||
+8
-1
@@ -42,6 +42,7 @@ public class BlockGeometryBakingContext implements IGeometryBakingContext
|
||||
private Transformation rootTransform;
|
||||
@Nullable
|
||||
private ResourceLocation renderTypeHint;
|
||||
private boolean gui3d = true;
|
||||
|
||||
@ApiStatus.Internal
|
||||
public BlockGeometryBakingContext(BlockModel owner)
|
||||
@@ -94,7 +95,7 @@ public class BlockGeometryBakingContext implements IGeometryBakingContext
|
||||
@Override
|
||||
public boolean isGui3d()
|
||||
{
|
||||
return true;
|
||||
return gui3d;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -142,12 +143,18 @@ public class BlockGeometryBakingContext implements IGeometryBakingContext
|
||||
this.renderTypeHint = renderTypeHint;
|
||||
}
|
||||
|
||||
public void setGui3d(boolean gui3d)
|
||||
{
|
||||
this.gui3d = gui3d;
|
||||
}
|
||||
|
||||
public void copyFrom(BlockGeometryBakingContext other)
|
||||
{
|
||||
this.customGeometry = other.customGeometry;
|
||||
this.rootTransform = other.rootTransform;
|
||||
this.visibilityData.copyFrom(other.visibilityData);
|
||||
this.renderTypeHint = other.renderTypeHint;
|
||||
this.gui3d = other.gui3d;
|
||||
}
|
||||
|
||||
public Collection<Material> getTextureDependencies(Function<ResourceLocation, UnbakedModel> modelGetter, Set<Pair<String, String>> missingTextureErrors)
|
||||
|
||||
Reference in new issue
Block a user