Jump to content

JoeAteTheBeans

Members
  • Posts

    4
  • Joined

  • Last visited

JoeAteTheBeans's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. So I recently started working on a custom armour model for my mod. But I came across an issue with the rendering of some armour pieces. The helmet and chestplate work just fine, but when I equip the leggings, it shows the model for the leggings, the chestplate and the boots, even when the chestplate and boots are not equipped. Similarly, when I equip the boots, it will also show the model for the leggings (again, even when the leggings are not equipped). The final issue is that when either the leggings or boots are equipped, the legs no longer move independently from each other. It's a weird thing to see and is hard to explain but there is an image attached to this post that shows you what I mean. Here's all the relevant classes from my mod: ItemInit: https://pastebin.com/zNjbEYiW Armour: https://pastebin.com/L4cfFJaA Model: https://pastebin.com/W28eHEEt Other than that, everything appears to be working fine. Any insight as to what's gone wrong here would be much appreciated.
  2. I'll make sure to refer back to that then if the current solution ever fails, thanks
  3. Forgive me if I'm wrong, but to me this looks like a method to get the light level of a block, not to set it. Thanks for explaining this to me, working off of what you said I managed to get it working and also learned what a lambda expression was in the process. So thank you To anyone wanted a code example of this, I'll share my working code with you (though there is probably a better way to do it): public class BlockInit { // Light level (Change the 5 to whatever light level you want). public static ToIntFunction<BlockState> lightLevel = BlockState -> 5; // Register creation. public static final DeferredRegister<Block> block = DeferredRegister.create(ForgeRegistries.BLOCKS, Mineite.modid); // Block creation. public static final Block testBlock = new Block(AbstractBlock.Properties .create(Material.IRON) .hardnessAndResistance(100f, 1200f) .harvestTool(ToolType.PICKAXE) .harvestLevel(4) .setLightLevel(lightLevel) .sound(SoundType.ANCIENT_DEBRIS)); // Adding block to register. public static final RegistryObject<Block> testBlock_registered = block.register("test_block", () -> testBlock); }
  4. Hello there, Was just wondering if anyone could explain to me how to give a block its own light level in 1.16 Forge. I read that in previous versions you could use: .setLightLevel(0.5f); with the float being a value between 0 and 1. Though in 1.16 you have to use: .setLightLevel(ToIntFunction<BlockState>); which I frankly don't understand. I'm fairly new to Java, and after reading up on block states for a while, I've come to the conclusion that I have no idea what to do here. Any help would be much appreciated
×
×
  • Create New...

Important Information

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