Jump to content

mrburgerUS

Members
  • Posts

    19
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

mrburgerUS's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Exactly! This problem took 5 days to solve, but I am super please with the results. It dynamically swaps out Baked Models, and it is beautiful.
  2. I fixed it! it ended up being a simple JSON error, I used the grass_block as an example for my model, and the "parent": "block/block", line was causing parsing issues! The textures now load perfectly. Its awesome!
  3. Ah, I see. The methodology makes sense, but how do I deserialize the textures from the block's JSON for loading? ICustomModelLoader? I am not opposed to creating a Parser if I have to. EDIT: Model does not have a getTextures Method anymore, only the IUnbakedModel implementation has that method.
  4. Hi Cadiboo, I have read over this before, in the days between my last post. I have created my own ModelsCache, that uses IUnbakedModel instead of IModel for the model cache, because I had issues with using it as written. As I understand it, I load the model manually in TextureStitchEvent, putting it into the Models Cache for retrieval during bake. Is this correct?
  5. Hi everyone, I have started a new topic because I feel this issue, while related, is sufficiently different. I am able to replace the Grass model with a "wrapper" (sets which quads to provide based on world) in ModelBakeEvent BUT, I have hit a wall of creating a "headless" model for the Alpha Textured Grass block. In 1.13.2, this would be easy if I just registered a new block, the system would automatically load it and everything would work. My problem is that I need to turn a JSON not associated with any block into an IBakedModel. I have spent 2 days trying to figure out how to parse and convert the JSON, but it appears everything is done behind the scenes now. Is this even possible? For reference, ModelBlock.class has a deserialize method, should I use that?
  6. I have a new ModelAlphaGrass, that extends IUnBakedModel, but I don't know how the details on how to properly get a model JSON, block state JSON, and textures to properly interact. I register my textures in TextureStitchEvent, but on load the game says I am missing alpha_grass_block in domain betaplus, but I cannot for the life of me figure out the problem! my file structure emulates every 1.13 mod perfectly, but it still cannot find the textures, and it absolutely isn't picking up the JSON files. Sorry to keep asking for help, I really want to figure out the whole rendering and IStateMapper-less system, but it just isn't working.
  7. Thanks! This helps a lot. Turns out I am not as versed in Java 1.8 Syntax as I thought, with Functions and Lambdas. I am a hobbyist coder for sure, but using your examples and a few examples from TheGreyGhost, I have made some progress in clearing the BakedQuads of the Grass Block using event.getModelRegistry().replace(grassLocation, customModel); Where customModel is an object that implements IBakedModel. The next step, as I interpret it, is to get the textures onto the block, and then swap the models based on world, like you said. While I still may need some guidance, I definitely see a clear direction now.
  8. Hi Cadiboo, I have subscribed the the ModelBakeEvent, but I am still very much overwhelmed with the concept of "Baking" models. I currently have spent the past 3 hours researching exactly how Minecraft and Forge render Unbaked Models, since I would replace the grass model using event.getModelLoader().setupModelRegistry().replace([STUFF]) at least as far as I know. I have currently tried: ResourceLocation grassLoc = Blocks.GRASS_BLOCK.getRegistryName(); ResourceLocation newGrass = new ResourceLocation(ResourceHelper.getResourceStringBetaPlus("alpha_grass_block")); IBlockState state = Blocks.GRASS_BLOCK.getDefaultState(); // Variant is not snowy. ModelResourceLocation location = new ModelResourceLocation(grassLoc, BlockModelShapes.getPropertyMapString(state.getValues())); String s = event.getModelManager().getBlockModelShapes().getTexture(Blocks.GRASS_BLOCK.getDefaultState()).getName().toString(); ModelBlock modelBlock = event.getModelLoader().getUnbakedModel(grassLoc).bake(); //event.getModelManager().getModel(Blocks.GRASS_BLOCK.getRenderLayer()) //event.getModelManager().getBlockModelShapes().getModel(Blocks.GRASS_BLOCK.getDefaultState()) //event.getModelRegistry().replace(new ModelResourceLocation("")) //s = event.getModelManager().getModel(new ModelResourceLocation(grassLoc, "")).getQuads(state, EnumFacing.UP, new Random()).toString(); //s = event.getModelRegistry().get(location).toString(); //s = event.getModelManager().getModel(location). //GameRegistry.findRegistry(Block.class); //event.getModelLoader().getUnbakedModel(grassLoc); // Definitely incorrect. //Blocks.GRASS_BLOCK.setRegistryName(newGrass); //event.getModelLoader().getUnbakedModel(grassLoc).getOverrideLocations().clear(); //event.getModelRegistry().replace(location, ); All of these methods, and I am still 0% confident in my ability to create a new BakedModel object, and replace it. Is there a guide that could give me the general idea?
  9. If I am understanding correctly, I need to make a model JSON model named "alpha_grass_block.json", where I will declare it similarly to the vanilla grass block, except with the tintindex call removed and my grass textures included. Then, when I detect an Alpha world as stated above, I tell the game to replace all instances of rendering grass blocks with my model. This part is not making total sense since I have looked all around in the client/renderer packages and I cannot seem to find any methods to hook into and replace the grass model. I have attached a link to my GitHub repo, if that helps. Everything of value should be in BetaPlus.java, if you're interested. https://github.com/mrburger/Beta-Plus
  10. Hello everyone, I am currently in the process of updating my mod to 1.13.2, that adds the Beta and Alpha terrain generators back in. I would like to be able to overwrite the grass block side textures if and only if the player is in an "Alpha" world type. So far, I have working code to detect this: if(mc.world.isRemote && mc.world.getWorld().getWorldType() instanceof WorldTypeAlphaPlus) But, I do not know how to soft-overwrite the texture. I have tried to "recreate" the lime grass using IBlockColor.getColor() and a myriad of various values, but the color is always "washed out", and doesn't give that nostalgic feel. Therefore, I feel it would be most appropriate to set the tint to -1 (no tint), and then overwrite the top and side texture with my own. Any help would be greatly appreciated, I am at wit's end! Thank you.
  11. Hello everyone, I am in the process of creating a Beta-Remix mod which re adds Beta terrain with modern features. The code for normal generation has been complete, but after starting on remixing the Temples (aka Scattered Features), I have hit a snag. Temples are generated from a single point that can be found using /locate, but on the negative X or Z before that NOTHING generates, so I get "half structures". Initially I thought it could possibly be chunk boundaries, but as the picture shows, the area of no-generation is fully within a chunk. My source code can be viewed at: https://github.com/mrburger/Beta-Plus, specifically in the https://github.com/mrburger/Beta-Plus/tree/master/src/main/java/com/mrburgerUS/betaplus/beta/feature/structure folder. Thank you for your help!
  12. Hi Major Tuvok, I tried using the Line to retrieve pixel data, but it seems Minecraft.getMinecraft().getTextureManager().bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE); does not want to work! I get a nullPointer due to a ticking player, and a fatal error is thrown: java.lang.RuntimeException: No OpenGL context found in the current thread. I've truly hit a wall with my Minecraft coding knowledge here.
  13. Your idea isn't half bad, actually. Items on the touch bar cannot be animated due to Apple code restrictions, so pulling the png from the assets pack seemed like the easiest way, until 3D blocks enter the scene.
  14. Hi, I am not following your process, sadly. I can take the TextureMap, but I cannot seem to piece together how I am supposed to bind the Texturemap and then use OpenGL to get the texture. Attached is a picture of my code.
  15. Hello all, I am in the process of adding Touch Bar integration to Minecraft. I have the touch bar hooked into the Minecraft window, and have it dynamically show which slot on the hotter is selected. Now, I want to add an icon to the Touch Bar button that corresponds to the held item's icon, but Apple and the JTouchBar API can only accept .png file paths or a byte array. Searching into the conversion of 2D int array textures to a 1D byte array seems fruitless. Is it possible to retrieve the PNG texture of an Item or Block from the ItemStack? So far I have a "TextureAtlasSprite" object, which has a "getIconName()" method, but this returns a string in the format "[domain]:[item_name]" such as "minecraft:diamond". I somehow want this to become a path to "assets/minecraft/textures/items/diamond.png", if it is even possible without extensive String manipulation. Thank you!
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.