Missed renames

This commit is contained in:
PepperCode1 2023-11-18 11:53:01 -08:00
parent 66f11018fe
commit 9afbc66b14
2 changed files with 22 additions and 22 deletions

View file

@ -41,42 +41,42 @@ public final class Materials {
.vertexShader(Files.SHADED_VERTEX) .vertexShader(Files.SHADED_VERTEX)
.fragmentShader(Files.DEFAULT_FRAGMENT) .fragmentShader(Files.DEFAULT_FRAGMENT)
.addShard(Shards.diffuseTex(InventoryMenu.BLOCK_ATLAS, false, true)) .addShard(Shards.diffuseTex(InventoryMenu.BLOCK_ATLAS, false, true))
.batchingRenderType(RenderType.solid()) .fallbackRenderType(RenderType.solid())
.vertexTransformer(SHADING_TRANSFORMER) .vertexTransformer(SHADING_TRANSFORMER)
.register(); .register();
public static final Material CHUNK_SOLID_UNSHADED = SimpleMaterial.builder() public static final Material CHUNK_SOLID_UNSHADED = SimpleMaterial.builder()
.vertexShader(Files.DEFAULT_VERTEX) .vertexShader(Files.DEFAULT_VERTEX)
.fragmentShader(Files.DEFAULT_FRAGMENT) .fragmentShader(Files.DEFAULT_FRAGMENT)
.addShard(Shards.diffuseTex(InventoryMenu.BLOCK_ATLAS, false, true)) .addShard(Shards.diffuseTex(InventoryMenu.BLOCK_ATLAS, false, true))
.batchingRenderType(RenderType.solid()) .fallbackRenderType(RenderType.solid())
.register(); .register();
public static final Material CHUNK_CUTOUT_MIPPED_SHADED = SimpleMaterial.builder() public static final Material CHUNK_CUTOUT_MIPPED_SHADED = SimpleMaterial.builder()
.vertexShader(Files.SHADED_VERTEX) .vertexShader(Files.SHADED_VERTEX)
.fragmentShader(Files.CUTOUT_FRAGMENT) .fragmentShader(Files.CUTOUT_FRAGMENT)
.addShard(Shards.diffuseTex(InventoryMenu.BLOCK_ATLAS, false, true)) .addShard(Shards.diffuseTex(InventoryMenu.BLOCK_ATLAS, false, true))
.batchingRenderType(RenderType.cutoutMipped()) .fallbackRenderType(RenderType.cutoutMipped())
.vertexTransformer(SHADING_TRANSFORMER) .vertexTransformer(SHADING_TRANSFORMER)
.register(); .register();
public static final Material CHUNK_CUTOUT_MIPPED_UNSHADED = SimpleMaterial.builder() public static final Material CHUNK_CUTOUT_MIPPED_UNSHADED = SimpleMaterial.builder()
.vertexShader(Files.DEFAULT_VERTEX) .vertexShader(Files.DEFAULT_VERTEX)
.fragmentShader(Files.CUTOUT_FRAGMENT) .fragmentShader(Files.CUTOUT_FRAGMENT)
.addShard(Shards.diffuseTex(InventoryMenu.BLOCK_ATLAS, false, true)) .addShard(Shards.diffuseTex(InventoryMenu.BLOCK_ATLAS, false, true))
.batchingRenderType(RenderType.cutoutMipped()) .fallbackRenderType(RenderType.cutoutMipped())
.register(); .register();
public static final Material CHUNK_CUTOUT_SHADED = SimpleMaterial.builder() public static final Material CHUNK_CUTOUT_SHADED = SimpleMaterial.builder()
.vertexShader(Files.SHADED_VERTEX) .vertexShader(Files.SHADED_VERTEX)
.fragmentShader(Files.CUTOUT_FRAGMENT) .fragmentShader(Files.CUTOUT_FRAGMENT)
.addShard(Shards.diffuseTex(InventoryMenu.BLOCK_ATLAS, false, false)) .addShard(Shards.diffuseTex(InventoryMenu.BLOCK_ATLAS, false, false))
.batchingRenderType(RenderType.cutout()) .fallbackRenderType(RenderType.cutout())
.vertexTransformer(SHADING_TRANSFORMER) .vertexTransformer(SHADING_TRANSFORMER)
.register(); .register();
public static final Material CHUNK_CUTOUT_UNSHADED = SimpleMaterial.builder() public static final Material CHUNK_CUTOUT_UNSHADED = SimpleMaterial.builder()
.vertexShader(Files.DEFAULT_VERTEX) .vertexShader(Files.DEFAULT_VERTEX)
.fragmentShader(Files.CUTOUT_FRAGMENT) .fragmentShader(Files.CUTOUT_FRAGMENT)
.addShard(Shards.diffuseTex(InventoryMenu.BLOCK_ATLAS, false, false)) .addShard(Shards.diffuseTex(InventoryMenu.BLOCK_ATLAS, false, false))
.batchingRenderType(RenderType.cutout()) .fallbackRenderType(RenderType.cutout())
.register(); .register();
public static final Material CHUNK_TRANSLUCENT_SHADED = SimpleMaterial.builder() public static final Material CHUNK_TRANSLUCENT_SHADED = SimpleMaterial.builder()
@ -84,7 +84,7 @@ public final class Materials {
.fragmentShader(Files.DEFAULT_FRAGMENT) .fragmentShader(Files.DEFAULT_FRAGMENT)
.addShard(Shards.diffuseTex(InventoryMenu.BLOCK_ATLAS, false, true)) .addShard(Shards.diffuseTex(InventoryMenu.BLOCK_ATLAS, false, true))
.addShard(Shards.TRANSLUCENT_TRANSPARENCY) .addShard(Shards.TRANSLUCENT_TRANSPARENCY)
.batchingRenderType(RenderType.translucent()) .fallbackRenderType(RenderType.translucent())
.vertexTransformer(SHADING_TRANSFORMER) .vertexTransformer(SHADING_TRANSFORMER)
.register(); .register();
public static final Material CHUNK_TRANSLUCENT_UNSHADED = SimpleMaterial.builder() public static final Material CHUNK_TRANSLUCENT_UNSHADED = SimpleMaterial.builder()
@ -92,7 +92,7 @@ public final class Materials {
.fragmentShader(Files.DEFAULT_FRAGMENT) .fragmentShader(Files.DEFAULT_FRAGMENT)
.addShard(Shards.diffuseTex(InventoryMenu.BLOCK_ATLAS, false, true)) .addShard(Shards.diffuseTex(InventoryMenu.BLOCK_ATLAS, false, true))
.addShard(Shards.TRANSLUCENT_TRANSPARENCY) .addShard(Shards.TRANSLUCENT_TRANSPARENCY)
.batchingRenderType(RenderType.translucent()) .fallbackRenderType(RenderType.translucent())
.register(); .register();
public static final Material CHUNK_TRIPWIRE_SHADED = SimpleMaterial.builder() public static final Material CHUNK_TRIPWIRE_SHADED = SimpleMaterial.builder()
@ -100,7 +100,7 @@ public final class Materials {
.fragmentShader(Files.CUTOUT_FRAGMENT) .fragmentShader(Files.CUTOUT_FRAGMENT)
.addShard(Shards.diffuseTex(InventoryMenu.BLOCK_ATLAS, false, true)) .addShard(Shards.diffuseTex(InventoryMenu.BLOCK_ATLAS, false, true))
.addShard(Shards.TRANSLUCENT_TRANSPARENCY) .addShard(Shards.TRANSLUCENT_TRANSPARENCY)
.batchingRenderType(RenderType.tripwire()) .fallbackRenderType(RenderType.tripwire())
.vertexTransformer(SHADING_TRANSFORMER) .vertexTransformer(SHADING_TRANSFORMER)
.register(); .register();
public static final Material CHUNK_TRIPWIRE_UNSHADED = SimpleMaterial.builder() public static final Material CHUNK_TRIPWIRE_UNSHADED = SimpleMaterial.builder()
@ -108,30 +108,30 @@ public final class Materials {
.fragmentShader(Files.CUTOUT_FRAGMENT) .fragmentShader(Files.CUTOUT_FRAGMENT)
.addShard(Shards.diffuseTex(InventoryMenu.BLOCK_ATLAS, false, true)) .addShard(Shards.diffuseTex(InventoryMenu.BLOCK_ATLAS, false, true))
.addShard(Shards.TRANSLUCENT_TRANSPARENCY) .addShard(Shards.TRANSLUCENT_TRANSPARENCY)
.batchingRenderType(RenderType.tripwire()) .fallbackRenderType(RenderType.tripwire())
.register(); .register();
public static final Material CHEST = SimpleMaterial.builder() public static final Material CHEST = SimpleMaterial.builder()
.vertexShader(Files.SHADED_VERTEX) .vertexShader(Files.SHADED_VERTEX)
.addShard(Shards.diffuseTex(Sheets.CHEST_SHEET, false, false)) .addShard(Shards.diffuseTex(Sheets.CHEST_SHEET, false, false))
.batchingRenderType(Sheets.chestSheet()) .fallbackRenderType(Sheets.chestSheet())
.register(); .register();
public static final Material SHULKER = SimpleMaterial.builder() public static final Material SHULKER = SimpleMaterial.builder()
.vertexShader(Files.SHADED_VERTEX) .vertexShader(Files.SHADED_VERTEX)
.fragmentShader(Files.CUTOUT_FRAGMENT) .fragmentShader(Files.CUTOUT_FRAGMENT)
.addShard(Shards.diffuseTex(Sheets.SHULKER_SHEET, false, false)) .addShard(Shards.diffuseTex(Sheets.SHULKER_SHEET, false, false))
.addShard(Shards.DISABLE_CULL) .addShard(Shards.DISABLE_CULL)
.batchingRenderType(Sheets.shulkerBoxSheet()) .fallbackRenderType(Sheets.shulkerBoxSheet())
.register(); .register();
public static final Material BELL = SimpleMaterial.builder() public static final Material BELL = SimpleMaterial.builder()
.vertexShader(Files.SHADED_VERTEX) .vertexShader(Files.SHADED_VERTEX)
.addShard(Shards.diffuseTex(InventoryMenu.BLOCK_ATLAS, false, false)) .addShard(Shards.diffuseTex(InventoryMenu.BLOCK_ATLAS, false, false))
.batchingRenderType(Sheets.solidBlockSheet()) .fallbackRenderType(Sheets.solidBlockSheet())
.register(); .register();
public static final Material MINECART = SimpleMaterial.builder() public static final Material MINECART = SimpleMaterial.builder()
.vertexShader(Files.SHADED_VERTEX) .vertexShader(Files.SHADED_VERTEX)
.addShard(Shards.diffuseTex(MINECART_LOCATION, false, false)) .addShard(Shards.diffuseTex(MINECART_LOCATION, false, false))
.batchingRenderType(RenderType.entitySolid(MINECART_LOCATION)) .fallbackRenderType(RenderType.entitySolid(MINECART_LOCATION))
.register(); .register();
private Materials() { private Materials() {

View file

@ -12,15 +12,15 @@ public class SimpleMaterial implements Material {
protected final ResourceLocation fragmentShader; protected final ResourceLocation fragmentShader;
protected final Runnable setup; protected final Runnable setup;
protected final Runnable clear; protected final Runnable clear;
protected final RenderType batchingRenderType; protected final RenderType fallbackRenderType;
protected final MaterialVertexTransformer vertexTransformer; protected final MaterialVertexTransformer vertexTransformer;
public SimpleMaterial(ResourceLocation vertexShader, ResourceLocation fragmentShader, Runnable setup, Runnable clear, RenderType batchingRenderType, MaterialVertexTransformer vertexTransformer) { public SimpleMaterial(ResourceLocation vertexShader, ResourceLocation fragmentShader, Runnable setup, Runnable clear, RenderType fallbackRenderType, MaterialVertexTransformer vertexTransformer) {
this.vertexShader = vertexShader; this.vertexShader = vertexShader;
this.fragmentShader = fragmentShader; this.fragmentShader = fragmentShader;
this.setup = setup; this.setup = setup;
this.clear = clear; this.clear = clear;
this.batchingRenderType = batchingRenderType; this.fallbackRenderType = fallbackRenderType;
this.vertexTransformer = vertexTransformer; this.vertexTransformer = vertexTransformer;
} }
@ -50,7 +50,7 @@ public class SimpleMaterial implements Material {
@Override @Override
public RenderType getFallbackRenderType() { public RenderType getFallbackRenderType() {
return batchingRenderType; return fallbackRenderType;
} }
@Override @Override
@ -63,7 +63,7 @@ public class SimpleMaterial implements Material {
protected ResourceLocation fragmentShader = Materials.Files.DEFAULT_FRAGMENT; protected ResourceLocation fragmentShader = Materials.Files.DEFAULT_FRAGMENT;
protected Runnable setup = () -> {}; protected Runnable setup = () -> {};
protected Runnable clear = () -> {}; protected Runnable clear = () -> {};
protected RenderType batchingRenderType = RenderType.solid(); protected RenderType fallbackRenderType = RenderType.solid();
protected MaterialVertexTransformer vertexTransformer = (vertexList, level) -> {}; protected MaterialVertexTransformer vertexTransformer = (vertexList, level) -> {};
public Builder() { public Builder() {
@ -95,8 +95,8 @@ public class SimpleMaterial implements Material {
return this; return this;
} }
public Builder batchingRenderType(RenderType type) { public Builder fallbackRenderType(RenderType type) {
this.batchingRenderType = type; this.fallbackRenderType = type;
return this; return this;
} }
@ -106,7 +106,7 @@ public class SimpleMaterial implements Material {
} }
public SimpleMaterial register() { public SimpleMaterial register() {
return Material.REGISTRY.registerAndGet(new SimpleMaterial(vertexShader, fragmentShader, setup, clear, batchingRenderType, vertexTransformer)); return Material.REGISTRY.registerAndGet(new SimpleMaterial(vertexShader, fragmentShader, setup, clear, fallbackRenderType, vertexTransformer));
} }
private static Runnable chain(Runnable runnable1, Runnable runnable2) { private static Runnable chain(Runnable runnable1, Runnable runnable2) {