Jump to content

ItsWormy

Members
  • Posts

    10
  • Joined

  • Last visited

Recent Profile Visitors

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

ItsWormy's Achievements

Tree Puncher

Tree Puncher (2/8)

1

Reputation

  1. // Line 37 to line 39 private ItemStackHandler inputStackHandler = new ItemStackHandler(TE_INPUT_SLOT_COUNT) { @Override protected void onContentsChanged(int slot) { super.onContentsChanged(slot); markDirty(); } }; private ItemStackHandler inventoryStackHandler = new ItemStackHandler(TE_INVENTORY_SLOT_COUNT) { @Override protected void onContentsChanged(int slot) { super.onContentsChanged(slot); markDirty(); } }; private ItemStackHandler outputStackHandler = new ItemStackHandler(TE_OUTPUT_SLOT_COUNT) { @Override protected void onContentsChanged(int slot) { super.onContentsChanged(slot); markDirty(); } }; This should do it. At least I hope it does.
  2. You need to override the method onContentsChanged in your ItemStackHandlers and run markDirty.
  3. That is why I stated that I used 1.12.2 And I said that it might only exist for 1.12.2 Edit: I thank you for the feedback about the other options though, I had no idea what the second one would do. And I had no idea that the first option was considered making a new custom class.
  4. Have you read this? https://mcforge.readthedocs.io/en/latest/datastorage/capabilities/#persisting-chunk-and-tileentity-capabilities
  5. I am only coding for version 1.12.2 and the net.minecraftforge.common.ForgeHooks.setBlockToolSetter() does not seem to exist, so I cannot help you with that. But I do have some alternatives for setting the harvest level without making custom classes (that may or may not work). First Option: // First Option Block option1 = new Block(Material.STONE) { @Override public int getHarvestLevel(IBlockState state) { //Return whatever } }; Second Option: // Second Option (might not work, never tried this before) Block option2 = new Block(Material.STONE) { private int[] harvestLevel = new int[] {/* Your values here */}; }; Third Option: // Third Option (might be 1.12.2 only) Block option3 = new Block(Material.STONE).setHarvestLevel(String, int/*, IBlockState*/); I hope one of these works!
  6. Try doing GlStateManager.setFogDensity(float); Look at what Minecraft uses for water (in net.minecraft.client.renderer.EntityRenderer):
  7. Hmmm.... could there be a problem with your events not being static? To be honest, not sure what the difference is between a static and non-static event is (I know the difference between static fields and methods).
  8. Well, if you need to check, just do the getRed/Green/Blue method and see what it returns. And if you need to convert your RGB to a value between 0-1 range, it is as simple as dividing by 255.
  9. So everything is working now? If not, I had the same issue and figured it out on my own so I might be able to help you (same tutorial). Any other issues you might be having, for example, the color of the fluid not changing (had that problem, but looked at some of other mods source code and figured it out) I might be able to help.
×
×
  • Create New...

Important Information

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