Posted October 3, 20231 yr I want to know why the item textures are not loaded. As far as I know, I did everything that I had to. (models/item/example.json & textures/items/example.json). Has something changed with /resource? https://github.com/1hwai/Firstman/tree/master/src Meanwhile, I want Datagenerator to generate only the block state of CableBlock, not the block model. Since CableBlock has too many connection states, I made auto-generating code for its block model .json file, which is written in TypeScript. And it's working very fine. But the problem is, that block state builder also builds block models too. I know this is not an error, but every time I run runData, I have to remove those files(generated\resources\assets\firstman\models\block\cable\...). I tried to fix it, but the reflection error came out. (ModBlockStates.java) protected void registerCables() { CableBlock[] cables = {BlockInit.CABLE_BLOCK.get()}; for (CableBlock cableBlock : cables) { VariantBlockStateBuilder bld = getVariantBuilder(cableBlock); Queue<ArrayList<Boolean>> queue = new LinkedList<>(); ArrayList<Boolean> start = new ArrayList<>(); queue.add(start); while (!queue.isEmpty()) { ArrayList<Boolean> element = queue.poll(); if (element.size() < 6) { ArrayList<Boolean> temp1 = new ArrayList<>(element); ArrayList<Boolean> temp2 = new ArrayList<>(element); temp1.add(true); temp2.add(false); queue.add(temp1); queue.add(temp2); } else if (element.size() == 6) { String status = (element.get(0) ? "u" : "") + (element.get(1) ? "d" : "") + (element.get(2) ? "n" : "") + (element.get(3) ? "s" : "") + (element.get(4) ? "e" : "") + (element.get(5) ? "w" : ""); if (status.equals("")) status = "none"; String path = "block/cable/" + status; BlockModelBuilder cable = models().getBuilder(path); bld.partialState().with(UP, element.get(0)).with(DOWN, element.get(1)).with(NORTH, element.get(2)).with(SOUTH, element.get(3)).with(EAST, element.get(4)).with(WEST, element.get(5)) .modelForState().modelFile(cable).addModel(); } } } }
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.