From d334d2165390c45c0d0a289504a410d75a5df966 Mon Sep 17 00:00:00 2001 From: Algent Date: Tue, 1 Sep 2026 13:50:41 +0200 Subject: [PATCH] refactor: port block micro material to Java --- JAVA_MIGRATION.md | 10 + JAVA_MIGRATION_DIVERGENCES.md | 51 +++++ JAVA_MIGRATION_HANDOFF.md | 29 ++- JAVA_MIGRATION_MANUAL_CHECKS.md | 5 +- .../microblock/BlockMicroMaterial$.java | 65 ++++++ .../microblock/BlockMicroMaterial.java | 201 ++++++++++++++++++ .../microblock/BlockMicroMaterial.scala | 201 ------------------ .../microblock/MaterialRenderHelper$.java | 72 +++++++ .../microblock/MaterialRenderHelper.java | 48 +++++ .../codechicken/microblock/ThreadState.java | 25 +++ 10 files changed, 493 insertions(+), 214 deletions(-) create mode 100644 src/main/scala/codechicken/microblock/BlockMicroMaterial$.java create mode 100644 src/main/scala/codechicken/microblock/BlockMicroMaterial.java delete mode 100644 src/main/scala/codechicken/microblock/BlockMicroMaterial.scala create mode 100644 src/main/scala/codechicken/microblock/MaterialRenderHelper$.java create mode 100644 src/main/scala/codechicken/microblock/MaterialRenderHelper.java create mode 100644 src/main/scala/codechicken/microblock/ThreadState.java diff --git a/JAVA_MIGRATION.md b/JAVA_MIGRATION.md index 20ad500..98a8a40 100644 --- a/JAVA_MIGRATION.md +++ b/JAVA_MIGRATION.md @@ -1077,3 +1077,13 @@ generated-trait compatibility work. Scala-runtime removal remains a later projec companions explicitly. - A clean build passes all 216 plain-JVM tests and the Java 8 Forge server passes all 102 tests. The jar class list is unchanged and all callable public descriptors match the reference. `microblock/BlockMicroMaterial.scala` is next. +- Characterized `BlockMicroMaterial` against untouched Scala. Five plain-JVM cases freeze all five retained public + types, exact methods/fields/client annotations, material delegation, thread-local render-helper state and inventory + pipeline. A frozen Scala 2.11.5 consumer calls both load-bearing companions; one Forge case freezes registered block + semantics and dedicated-server side stripping. +- Ported the material base, both facade/companion pairs and `ThreadState` to Java. The GuideNH-targeted private final + `block`/`meta` fields, public `(Block, int)` constructor, Scala `Seq` registration overloads, historical meta-0-only + overload behavior, render pipeline and Angelica override lifecycle are unchanged. +- A clean build passes all 222 plain-JVM tests and the Java 8 Forge server passes all 103 tests. Every callable public + descriptor matches the reference; only three unreferenced Scala closure/anonymous classes disappear. + `microblock/ConfigContent.scala` is next. diff --git a/JAVA_MIGRATION_DIVERGENCES.md b/JAVA_MIGRATION_DIVERGENCES.md index 48b6dc5..9be416f 100644 --- a/JAVA_MIGRATION_DIVERGENCES.md +++ b/JAVA_MIGRATION_DIVERGENCES.md @@ -2441,3 +2441,54 @@ class initializers without Scala's `ACC_PUBLIC` flag. No runtime class was added - Clean reference/port jars contain the same nine runtime classes, and raw `javap` comparison confirms identical callable public names/descriptors. - Face/corner/edge/hollow guide-line rendering remains on the manual checklist. + +## 2026-09-01 — BlockMicroMaterial Java port + +The block-backed material, its registry companion, the render-helper facade/companion and per-thread state are now +five Java types. + +### Observable behavior + +No known runtime divergence. Material keys and legacy names, metadata suffixes, all six registration overloads, +registry remaps, block/item/name/strength/light/harvest/sound/resistance delegation, colour selection and face-render +pipeline order are unchanged. The historical `createAndRegister(Block, Seq, oldName)` behavior still ignores the +sequence and registers only metadata 0; this port does not repair it. + +Icon loading still reacquires the block from its registry name in case another mod replaced the instance, resolves all +six icons through `RenderBlocks.getIconSafe`, and falls back to its null icon after any exception. The render helper +still stores pass and pipeline builder per thread, applies light only outside inventory rendering, sets the Angelica +block/meta shader override before drawing and resets it afterwards. + +### ABI and reflection compatibility + +The retained runtime types are exactly `ThreadState`, `MaterialRenderHelper`, `MaterialRenderHelper$`, +`BlockMicroMaterial`, and `BlockMicroMaterial$`. Every callable public name and descriptor matches the Scala +reference, including both static facades, both `MODULE$` fields, the Scala `Seq` overloads, default-argument methods, +the public `(Block, int)` constructor and the mangled icon helper. + +`BlockMicroMaterial` remains non-final and keeps exactly four instance fields. In particular, GuideNH's late mixin +targets remain private final fields named `block: Block` and `meta: int`; the private final `blockKey: String` and +private mutable `icont: MultiIconTransformation` retain their names and types too. `@SideOnly(CLIENT)` remains only on +the icon field, `loadIcons` and `getBreakingIcon`, matching the dedicated-server stripped surface. + +A frozen Scala 2.11.5 consumer calls `BlockMicroMaterial$.MODULE$` key/default methods and +`MaterialRenderHelper$.MODULE$` pass accessors, proving both load-bearing companion links after the port. Accepted +classfile-only differences are removed Scala signature/marker attributes, private Java constructors on the static +facade/companions, and companion class initializers without Scala's `ACC_PUBLIC` flag. + +### Compiler artifacts + +Accepted divergence: `BlockMicroMaterial$$anonfun$createAndRegister$1`, +`BlockMicroMaterial$$anonfun$loadIcons$1`, and `MaterialRenderHelper$$anon$1` disappear. Direct Java iteration and +`ThreadLocal.withInitial` need none of these compiler-generated implementation classes, and the downstream inventory +contains no reference to them. + +### Validation + +- `BlockMicroMaterialCharacterizationTest`: 5 plain-JVM tests, unchanged from the Scala baseline. +- `BlockMicroMaterialBinaryCompatibilityTest`: 1 frozen Scala-consumer test, unchanged from the Scala baseline. +- Clean complete plain-JVM suite: 222 tests, 0 failures, 0 errors. +- Java 8 Forge dedicated-server suite: 103 tests, 0 failures, 0 errors. +- Clean reference/port jars retain the same five supported types; the three compiler artifacts above disappear, and + raw `javap` comparison confirms identical callable public names/descriptors. +- Client icon reload, material face rendering and Angelica shader overrides remain on the manual checklist. diff --git a/JAVA_MIGRATION_HANDOFF.md b/JAVA_MIGRATION_HANDOFF.md index 621aa58..2110a34 100644 --- a/JAVA_MIGRATION_HANDOFF.md +++ b/JAVA_MIGRATION_HANDOFF.md @@ -12,8 +12,8 @@ what breaks, and what is left. The other documents hold the reasoning. | `JAVA_MIGRATION_MANUAL_CHECKS.md` | What no automated test can cover, and must be checked by hand in a client | | `JAVA_MIGRATION_PROFILE.md` | The focused baseline, first measured result, findings, and exact rerun command | -Branch: `algent/java`. Base: `master`. 120 commits including the API-cleanup plan and separate characterization and -port commits through `PlacementGrids`. +Branch: `algent/java`. Base: `master`. 122 commits including the API-cleanup plan and separate characterization and +port commits through `BlockMicroMaterial`. ## The one rule that matters @@ -67,7 +67,7 @@ awk -F'"' '/ 0 ? "_" + meta : ""); + } + + public String materialKey(Block block, int meta) { + return materialKey(materialKey(block), meta); + } + + public void createAndRegister(Block block, int meta, String name) { + MicroMaterialRegistry.registerMaterial(new BlockMicroMaterial(block, meta), materialKey(name, meta)); + } + + public void createAndRegister(Block block, int meta, String name, String oldName) { + MicroMaterialRegistry.remapName(materialKey(oldName, meta), materialKey(name, meta)); + createAndRegister(block, meta, name); + } + + public void createAndRegister(Block block, int meta) { + createAndRegister(block, meta, materialKey(block), oldKey(block)); + } + + public void createAndRegister(Block block, Seq meta) { + createAndRegister(block, meta, materialKey(block), oldKey(block)); + } + + public void createAndRegister(Block block, Seq meta, String oldName) { + createAndRegister(block, 0, materialKey(block), oldName); + } + + public void createAndRegister(Block block, Seq meta, String name, String oldName) { + Iterator iterator = meta.iterator(); + while (iterator.hasNext()) { + createAndRegister(block, (Integer) iterator.next(), name, oldName); + } + } +} diff --git a/src/main/scala/codechicken/microblock/BlockMicroMaterial.java b/src/main/scala/codechicken/microblock/BlockMicroMaterial.java new file mode 100644 index 0000000..3ef125d --- /dev/null +++ b/src/main/scala/codechicken/microblock/BlockMicroMaterial.java @@ -0,0 +1,201 @@ +package codechicken.microblock; + +import java.util.Arrays; + +import net.minecraft.block.Block; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; + +import codechicken.lib.render.CCRenderState; +import codechicken.lib.render.uv.MultiIconTransformation; +import codechicken.lib.vec.Cuboid6; +import codechicken.lib.vec.Vector3; +import codechicken.microblock.MicroMaterialRegistry.IMicroMaterial; +import codechicken.microblock.handler.MicroblockProxy; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import scala.collection.JavaConversions; +import scala.collection.Seq; + +/** Standard micro material class suitable for most blocks. */ +public class BlockMicroMaterial implements IMicroMaterial { + + private final Block block; + private final int meta; + private final String blockKey; + + @SideOnly(Side.CLIENT) + private MultiIconTransformation icont; + + public BlockMicroMaterial(Block block, int meta) { + this.block = block; + this.meta = meta; + blockKey = (String) Block.blockRegistry.getNameForObject(block); + } + + public static int $lessinit$greater$default$2() { + return BlockMicroMaterial$.MODULE$.$lessinit$greater$default$2(); + } + + public static int createAndRegister$default$2() { + return BlockMicroMaterial$.MODULE$.createAndRegister$default$2(); + } + + public static String oldKey(Block block) { + return BlockMicroMaterial$.MODULE$.oldKey(block); + } + + public static String materialKey(Block block) { + return BlockMicroMaterial$.MODULE$.materialKey(block); + } + + public static String materialKey(String name, int meta) { + return BlockMicroMaterial$.MODULE$.materialKey(name, meta); + } + + public static String materialKey(Block block, int meta) { + return BlockMicroMaterial$.MODULE$.materialKey(block, meta); + } + + public static void createAndRegister(Block block, int meta, String name) { + BlockMicroMaterial$.MODULE$.createAndRegister(block, meta, name); + } + + public static void createAndRegister(Block block, int meta, String name, String oldName) { + BlockMicroMaterial$.MODULE$.createAndRegister(block, meta, name, oldName); + } + + public static void createAndRegister(Block block, int meta) { + BlockMicroMaterial$.MODULE$.createAndRegister(block, meta); + } + + public static void createAndRegister(Block block, Seq meta) { + BlockMicroMaterial$.MODULE$.createAndRegister(block, meta); + } + + public static void createAndRegister(Block block, Seq meta, String oldName) { + BlockMicroMaterial$.MODULE$.createAndRegister(block, meta, oldName); + } + + public static void createAndRegister(Block block, Seq meta, String name, String oldName) { + BlockMicroMaterial$.MODULE$.createAndRegister(block, meta, name, oldName); + } + + public Block block() { + return block; + } + + public int meta() { + return meta; + } + + public String blockKey() { + return blockKey; + } + + public MultiIconTransformation icont() { + return icont; + } + + public void icont_$eq(MultiIconTransformation icont) { + this.icont = icont; + } + + @Override + @SideOnly(Side.CLIENT) + public void loadIcons() { + Block currentBlock = Block.getBlockFromName(blockKey); + IIcon[] icons = new IIcon[6]; + for (int side = 0; side < icons.length; side++) { + icons[side] = codechicken$microblock$BlockMicroMaterial$$safeIcon$1(currentBlock, side); + } + icont_$eq(new MultiIconTransformation(icons)); + } + + public final IIcon codechicken$microblock$BlockMicroMaterial$$safeIcon$1(Block block, int side) { + try { + return MicroblockProxy.renderBlocks().getIconSafe(block.getIcon(side, meta)); + } catch (Exception ignored) { + return MicroblockProxy.renderBlocks().getIconSafe(null); + } + } + + @Override + public void renderMicroFace(Vector3 pos, int pass, Cuboid6 bounds) { + MaterialRenderHelper$.MODULE$.start(pos, pass, icont).blockColour(getColour(pass)).lighting() + .blockAndMeta(block, meta).render(); + } + + public int getColour(int pass) { + if (pass == -1) { + return (block.getBlockColor() << 8) | 0xFF; + } + CCRenderState state = CCRenderState.instance(); + return (block.colorMultiplier( + state.lightMatrix.access, + state.lightMatrix.pos.x, + state.lightMatrix.pos.y, + state.lightMatrix.pos.z) << 8) | 0xFF; + } + + @Override + public boolean canRenderInPass(int pass) { + return block.canRenderInPass(pass); + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getBreakingIcon(int side) { + return block.getIcon(side, meta); + } + + @Override + public ItemStack getItem() { + return new ItemStack(block, 1, meta); + } + + @Override + public String getLocalizedName() { + return getItem().getDisplayName(); + } + + @Override + public float getStrength(EntityPlayer player) { + float hardness = 30F; + try { + hardness = block.getBlockHardness(null, 0, 0, 0); + } catch (Exception ignored) {} + return player.getBreakSpeed(block, false, meta % 16, 0, -1, 0) / hardness; + } + + @Override + public boolean isTransparent() { + return !block.isOpaqueCube(); + } + + @Override + public int getLightValue() { + return block.getLightValue(); + } + + public Seq toolClasses() { + return JavaConversions.asScalaBuffer(Arrays.asList("axe", "pickaxe", "shovel")).toList(); + } + + @Override + public int getCutterStrength() { + return block.getHarvestLevel(meta % 16); + } + + @Override + public Block.SoundType getSound() { + return block.stepSound; + } + + @Override + public float explosionResistance(Entity entity) { + return block.getExplosionResistance(entity); + } +} diff --git a/src/main/scala/codechicken/microblock/BlockMicroMaterial.scala b/src/main/scala/codechicken/microblock/BlockMicroMaterial.scala deleted file mode 100644 index 83cdc95..0000000 --- a/src/main/scala/codechicken/microblock/BlockMicroMaterial.scala +++ /dev/null @@ -1,201 +0,0 @@ -package codechicken.microblock - -import net.minecraft.block.Block -import codechicken.microblock.MicroMaterialRegistry.IMicroMaterial -import net.minecraft.util.IIcon -import cpw.mods.fml.relauncher.SideOnly -import cpw.mods.fml.relauncher.Side -import net.minecraft.item.ItemStack -import codechicken.lib.vec.{Cuboid6, Vector3} -import net.minecraft.entity.player.EntityPlayer -import codechicken.lib.render.{ - CCRenderPipeline, - CCRenderState, - ColourMultiplier -} -import codechicken.microblock.handler.{MicroblockMod, MicroblockProxy} -import net.minecraft.entity.Entity -import codechicken.lib.render.uv.{MultiIconTransformation, UVTransformation} -import cpw.mods.fml.common.registry.{GameData, GameRegistry} - -import java.util.function.Supplier - -private class ThreadState { - var pass = 0 - var builder: CCRenderPipeline#PipelineBuilder = _ -} - -object MaterialRenderHelper { - private val threadState = - ThreadLocal.withInitial[ThreadState](new Supplier[ThreadState]() { - override def get(): ThreadState = new ThreadState() - }) - def pass = threadState.get().pass - def pass_=(pass: Int) = threadState.get().pass = pass - def builder = threadState.get().builder - def builder_=(builder: CCRenderPipeline#PipelineBuilder) = - threadState.get().builder = builder - - def start(pos: Vector3, pass: Int, uvt: UVTransformation) = { - this.pass = pass - builder = CCRenderState.instance().pipeline.builder() - builder.add(pos.translation()).add(uvt) - this - } - - def blockColour(colour: Int) = { - builder.add(ColourMultiplier.instance(colour)) - this - } - - def lighting() = { - if (pass != -1) - builder.add(CCRenderState.instance().lightMatrix) - this - } - - def blockAndMeta(b: Block, meta: Int) = { - if (MicroblockMod.angelicaCompat != null) - MicroblockMod.angelicaCompat.setShaderMaterialOverride(b, meta) - this - } - - def render(): Unit = { - builder.render() - if (MicroblockMod.angelicaCompat != null) - MicroblockMod.angelicaCompat.resetShaderMaterialOverride() - } -} - -/** Standard micro material class suitable for most blocks. - */ -class BlockMicroMaterial(val block: Block, val meta: Int = 0) - extends IMicroMaterial { - val blockKey = Block.blockRegistry.getNameForObject(block) - - @SideOnly(Side.CLIENT) - var icont: MultiIconTransformation = _ - - @SideOnly(Side.CLIENT) - override def loadIcons() { - def safeIcon(block: Block, side: Int): IIcon = { - try { - return MicroblockProxy.renderBlocks.getIconSafe( - block.getIcon(side, meta) - ) - } catch { - case e: Exception => - } - return MicroblockProxy.renderBlocks.getIconSafe(null) - } - - val iblock = Block.getBlockFromName( - blockKey - ) // reacquire block instance incase a mod replcaed it - icont = new MultiIconTransformation( - Array.tabulate(6)(side => safeIcon(iblock, side)): _* - ) - } - - def renderMicroFace(pos: Vector3, pass: Int, bounds: Cuboid6) { - MaterialRenderHelper - .start(pos, pass, icont) - .blockColour(getColour(pass)) - .lighting() - .blockAndMeta(block, meta) - .render() - } - - def getColour(pass: Int) = { - if (pass == -1) - block.getBlockColor << 8 | 0xff - else { - val state = CCRenderState.instance - val pos = state.lightMatrix.pos - block.colorMultiplier( - state.lightMatrix.access, - pos.x, - pos.y, - pos.z - ) << 8 | 0xff - } - } - - override def canRenderInPass(pass: Int) = block.canRenderInPass(pass) - - @SideOnly(Side.CLIENT) - def getBreakingIcon(side: Int) = block.getIcon(side, meta) - - def getItem = new ItemStack(block, 1, meta) - - def getLocalizedName = getItem.getDisplayName - - def getStrength(player: EntityPlayer) = { - var hardness = 30f - try { - hardness = block.getBlockHardness(null, 0, 0, 0) - } catch { - case e: Exception => - } - player.getBreakSpeed(block, false, meta % 16, 0, -1, 0) / hardness - } - - def isTransparent = !block.isOpaqueCube - - def getLightValue = block.getLightValue - - def toolClasses = Seq("axe", "pickaxe", "shovel") - - // meta > 15 will throw ArrayIndexOutOfBoundsException - def getCutterStrength = block.getHarvestLevel(meta % 16) - - def getSound = block.stepSound - - def explosionResistance(entity: Entity): Float = - block.getExplosionResistance(entity) -} - -/** Utility functions for cleaner registry code - */ -object BlockMicroMaterial { - def oldKey(block: Block) = block.getUnlocalizedName - def materialKey(block: Block) = Block.blockRegistry.getNameForObject(block) - def materialKey(name: String, meta: Int) = - name + (if (meta > 0) "_" + meta else "") - def materialKey(block: Block, meta: Int): String = - materialKey(materialKey(block), meta) - - def createAndRegister(block: Block, meta: Int, name: String) = - MicroMaterialRegistry.registerMaterial( - new BlockMicroMaterial(block, meta), - materialKey(name, meta) - ) - - def createAndRegister( - block: Block, - meta: Int, - name: String, - oldName: String - ) { - MicroMaterialRegistry.remapName( - materialKey(oldName, meta), - materialKey(name, meta) - ) - createAndRegister(block, meta, name) - } - - def createAndRegister(block: Block, meta: Int = 0): Unit = - createAndRegister(block, Seq(meta)) - def createAndRegister(block: Block, meta: Seq[Int]): Unit = - createAndRegister(block, meta, materialKey(block), oldKey(block)) - def createAndRegister(block: Block, meta: Seq[Int], oldName: String): Unit = - createAndRegister(block, 0, materialKey(block), oldName) - - def createAndRegister( - block: Block, - meta: Seq[Int], - name: String, - oldName: String - ): Unit = - meta.foreach(m => createAndRegister(block, m, name, oldName)) -} diff --git a/src/main/scala/codechicken/microblock/MaterialRenderHelper$.java b/src/main/scala/codechicken/microblock/MaterialRenderHelper$.java new file mode 100644 index 0000000..0be3f9a --- /dev/null +++ b/src/main/scala/codechicken/microblock/MaterialRenderHelper$.java @@ -0,0 +1,72 @@ +package codechicken.microblock; + +import net.minecraft.block.Block; + +import codechicken.lib.render.CCRenderPipeline; +import codechicken.lib.render.CCRenderState; +import codechicken.lib.render.ColourMultiplier; +import codechicken.lib.render.uv.UVTransformation; +import codechicken.lib.vec.Vector3; +import codechicken.microblock.handler.MicroblockMod; + +public final class MaterialRenderHelper$ { + + public static final MaterialRenderHelper$ MODULE$ = new MaterialRenderHelper$(); + + private final ThreadLocal threadState = ThreadLocal.withInitial(ThreadState::new); + + private MaterialRenderHelper$() {} + + private ThreadLocal threadState() { + return threadState; + } + + public int pass() { + return threadState().get().pass(); + } + + public void pass_$eq(int pass) { + threadState().get().pass_$eq(pass); + } + + public CCRenderPipeline.PipelineBuilder builder() { + return threadState().get().builder(); + } + + public void builder_$eq(CCRenderPipeline.PipelineBuilder builder) { + threadState().get().builder_$eq(builder); + } + + public MaterialRenderHelper$ start(Vector3 pos, int pass, UVTransformation uvt) { + pass_$eq(pass); + builder_$eq(CCRenderState.instance().pipeline.builder()); + builder().add(pos.translation()).add(uvt); + return this; + } + + public MaterialRenderHelper$ blockColour(int colour) { + builder().add(ColourMultiplier.instance(colour)); + return this; + } + + public MaterialRenderHelper$ lighting() { + if (pass() != -1) { + builder().add(CCRenderState.instance().lightMatrix); + } + return this; + } + + public MaterialRenderHelper$ blockAndMeta(Block block, int meta) { + if (MicroblockMod.angelicaCompat() != null) { + MicroblockMod.angelicaCompat().setShaderMaterialOverride(block, meta); + } + return this; + } + + public void render() { + builder().render(); + if (MicroblockMod.angelicaCompat() != null) { + MicroblockMod.angelicaCompat().resetShaderMaterialOverride(); + } + } +} diff --git a/src/main/scala/codechicken/microblock/MaterialRenderHelper.java b/src/main/scala/codechicken/microblock/MaterialRenderHelper.java new file mode 100644 index 0000000..e748f52 --- /dev/null +++ b/src/main/scala/codechicken/microblock/MaterialRenderHelper.java @@ -0,0 +1,48 @@ +package codechicken.microblock; + +import net.minecraft.block.Block; + +import codechicken.lib.render.CCRenderPipeline; +import codechicken.lib.render.uv.UVTransformation; +import codechicken.lib.vec.Vector3; + +public final class MaterialRenderHelper { + + private MaterialRenderHelper() {} + + public static int pass() { + return MaterialRenderHelper$.MODULE$.pass(); + } + + public static void pass_$eq(int pass) { + MaterialRenderHelper$.MODULE$.pass_$eq(pass); + } + + public static CCRenderPipeline.PipelineBuilder builder() { + return MaterialRenderHelper$.MODULE$.builder(); + } + + public static void builder_$eq(CCRenderPipeline.PipelineBuilder builder) { + MaterialRenderHelper$.MODULE$.builder_$eq(builder); + } + + public static MaterialRenderHelper$ start(Vector3 pos, int pass, UVTransformation uvt) { + return MaterialRenderHelper$.MODULE$.start(pos, pass, uvt); + } + + public static MaterialRenderHelper$ blockColour(int colour) { + return MaterialRenderHelper$.MODULE$.blockColour(colour); + } + + public static MaterialRenderHelper$ lighting() { + return MaterialRenderHelper$.MODULE$.lighting(); + } + + public static MaterialRenderHelper$ blockAndMeta(Block block, int meta) { + return MaterialRenderHelper$.MODULE$.blockAndMeta(block, meta); + } + + public static void render() { + MaterialRenderHelper$.MODULE$.render(); + } +} diff --git a/src/main/scala/codechicken/microblock/ThreadState.java b/src/main/scala/codechicken/microblock/ThreadState.java new file mode 100644 index 0000000..f567589 --- /dev/null +++ b/src/main/scala/codechicken/microblock/ThreadState.java @@ -0,0 +1,25 @@ +package codechicken.microblock; + +import codechicken.lib.render.CCRenderPipeline; + +public class ThreadState { + + private int pass; + private CCRenderPipeline.PipelineBuilder builder; + + public int pass() { + return pass; + } + + public void pass_$eq(int pass) { + this.pass = pass; + } + + public CCRenderPipeline.PipelineBuilder builder() { + return builder; + } + + public void builder_$eq(CCRenderPipeline.PipelineBuilder builder) { + this.builder = builder; + } +}