mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-19 03:49:14 +00:00
Make cutout mipmaps explicitly opt-in for item/entity rendering (#8845)
* Make cutout mipmaps explicitly opt-in for item/entity rendering * Default render type domain to "minecraft" in model datagens
This commit is contained in:
1 parent
daf5933b79
commit
b1113f0363
2 files changed
+4
-8
No files matched your search
@@ -50,7 +50,9 @@ public final class NamedRenderTypeManager
|
||||
{
|
||||
blockRenderTypes.put(new ResourceLocation("solid"), new RenderTypeGroup(RenderType.solid(), ForgeRenderTypes.ITEM_LAYERED_SOLID.get()));
|
||||
blockRenderTypes.put(new ResourceLocation("cutout"), new RenderTypeGroup(RenderType.cutout(), ForgeRenderTypes.ITEM_LAYERED_CUTOUT.get()));
|
||||
blockRenderTypes.put(new ResourceLocation("cutout_mipped"), new RenderTypeGroup(RenderType.cutoutMipped(), ForgeRenderTypes.ITEM_LAYERED_CUTOUT_MIPPED.get()));
|
||||
// Generally entity/item rendering shouldn't use mipmaps, so cutout_mipped has them off by default. To enforce them, use cutout_mipped_all.
|
||||
blockRenderTypes.put(new ResourceLocation("cutout_mipped"), new RenderTypeGroup(RenderType.cutoutMipped(), ForgeRenderTypes.ITEM_LAYERED_CUTOUT.get()));
|
||||
blockRenderTypes.put(new ResourceLocation("cutout_mipped_all"), new RenderTypeGroup(RenderType.cutoutMipped(), ForgeRenderTypes.ITEM_LAYERED_CUTOUT_MIPPED.get()));
|
||||
blockRenderTypes.put(new ResourceLocation("translucent"), new RenderTypeGroup(RenderType.translucent(), ForgeRenderTypes.ITEM_LAYERED_TRANSLUCENT.get()));
|
||||
blockRenderTypes.put(new ResourceLocation("tripwire"), new RenderTypeGroup(RenderType.tripwire(), ForgeRenderTypes.ITEM_LAYERED_TRANSLUCENT.get()));
|
||||
}
|
||||
|
||||
@@ -150,13 +150,7 @@ public class ModelBuilder<T extends ModelBuilder<T>> extends ModelFile {
|
||||
*/
|
||||
public T renderType(String renderType) {
|
||||
Preconditions.checkNotNull(renderType, "Render type must not be null");
|
||||
ResourceLocation asLoc;
|
||||
if (renderType.contains(":")) {
|
||||
asLoc = new ResourceLocation(renderType);
|
||||
} else {
|
||||
asLoc = new ResourceLocation(getLocation().getNamespace(), renderType);
|
||||
}
|
||||
return renderType(asLoc);
|
||||
return renderType(new ResourceLocation(renderType));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user