Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

MonkeyKnight

Members
  • Content Count

    22
  • Joined

  • Last visited

Community Reputation

1 Neutral

About MonkeyKnight

  • Rank
    Tree Puncher

Recent Profile Visitors

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

  1. Thanks. I checked the logs and solved my problem. I am not sure if multipart would help for this block but I will definingly read more about them and use them in the future! The issue was that I included a space before the age.
  2. EDIT: If anyone is having the same issue as me, the log tells you the exact combinations of the missing blockstates. I have been having issues with writing blockstates JSON files. I have searched the documentation but did not find enough information to narrow down the place that I am wrong. I have coded several items with multiple different blockstates and some of my JOSN files work fine while others never seem to work. I do not notice any major differences between the two and am writing to ask your help in figuring out how to write these files. I have coded a lamp that has th
  3. Thank you for your help. It ended up being the entity block animated that was making it not work. I did not need it and getting rid of it solved all my issues.
  4. I added override to the methods that I missed but the blockstates are still not working. Here is my new code: import javax.annotation.Nullable; import net.minecraft.block.Block; import net.minecraft.block.BlockRenderType; import net.minecraft.block.BlockState; import net.minecraft.block.HorizontalBlock; import net.minecraft.block.IWaterLoggable; import net.minecraft.fluid.FluidState; import net.minecraft.fluid.Fluids; import net.minecraft.item.BlockItemUseContext; import net.minecraft.pathfinding.PathType; import net.minecraft.state.BooleanProperty; import net.minecraft.state.Directi
  5. I have been trying to create a block that has two blockstates, a basic facing one and a waterlogged one. I have been able to get blockstates to work fine in 1.12, 1.15, and 1.16.4 but when I started coding a new mod in 1.16.5, I have not been able to get the blockstates to work. It does not show up when the block is looked at using f3. My code is below: import javax.annotation.Nullable; import net.minecraft.block.Block; import net.minecraft.block.BlockRenderType; import net.minecraft.block.BlockState; import net.minecraft.block.HorizontalBlock; import net.minecraft.block.IWaterLoggable; i
  6. Sure, here are my two classes that I used. The render event: @EventBusSubscriber(modid = Epidemics.MOD_ID, bus = Bus.FORGE) public class GuiRenderEvents { @SubscribeEvent public static void renderGameOverlay(RenderGameOverlayEvent.Post event) { if (event.getType() == RenderGameOverlayEvent.ElementType.ALL) { System.out.println(1); RenderTest render = new RenderTest(Minecraft.getInstance()); render.renderTestPumpkin(Minecraft.getInstance()); } } } The renderer: public class RenderTest extends IngameGui{ public static fin
  7. I have another update! I changed my render event code to this: @EventBusSubscriber(modid = Epidemics.MOD_ID, bus = Bus.FORGE) public class GuiRenderEvents { @SubscribeEvent public static void renderGameOverlay(RenderGameOverlayEvent.Post event) { if (event.getType() == RenderGameOverlayEvent.ElementType.HOTBAR) { System.out.println(1); RenderTest render = new RenderTest(Minecraft.getInstance()); render.renderTestPumpkin(Minecraft.getInstance()); } } } public class RenderTest extends IngameGui{ private int screenWidth; private int
  8. I have a quick update. I have narrowed down the issue to the renderGameOverlay.post event. I changed the code of the renderTest constructor to just trigger the vanilla renderPumpkin() method and there still was no pumpkin face shown. public RenderTest(Minecraft minecraft) { super(minecraft); renderPumpkin(); /* screenWidth = minecraft.getWindow().getGuiScaledWidth(); screenHeight = minecraft.getWindow().getGuiScaledHeight(); renderTest(minecraft); */ } Do you have any suggestions on what I should change in my render event?
  9. The only further suggestion I would have is to check Minecraft's code for the fire aspect enchantment. You may find what you are looking for there.
  10. I know this might be stupid but for deferedRegisters, that error normally goes away when you put .get() at the end. Something like this: if (event.getSource().equals(ItemInit.EMBERCLEAVE.get())) I have only coded blocks and potions in 1.16 so I am a little rusty on items but this might work.
  11. I have coded a little test to experiment with rendering fullscreen overlays for my mod in Minecraft. As it is my first time delving into this kind of rendering, I started off simple, basically copying the renderPumpkin() method but I am having issues. My goal is to render textures that will show up on a player's screen in certain situations. For this test, I just went with the standard pumpkinblur. I used a RenderGameOverlayEvent.Post to trigger the rendering of the pumpkin. Here is my event code: @EventBusSubscriber(modid = Epidemics.MOD_ID, bus = Bus.FORGE) public class GuiRenderEvents {
  12. I have solved the issue as I called the wrong method in the ReadNBT class. Here is my final updated code. @Override public INBT writeNBT(Capability<IDiseases> capability, IDiseases instance, Direction side) { CompoundNBT tag = new CompoundNBT(); tag.putInt("diseases", instance.getDiseases()); tag.putInt("diseasesTime", instance.getDiseasesTime()); return tag; } @Override public void readNBT(Capability<IDiseases> capability, IDiseases instance, Direction side, INBT nbt) { CompoundNBT tag = (CompoundNBT) nbt; instance.setDiseases(tag.getInt("diseases")); insta
  13. I have done some further testing and have noticed something quite strange. I have changed my readNBT method to read from the INBT. @Override public INBT writeNBT(Capability<IDiseases> capability, IDiseases instance, Direction side) { CompoundNBT tag = new CompoundNBT(); tag.putInt("diseases", instance.getDiseases()); tag.putInt("diseasesTime", instance.getDiseasesTime()); return tag; } @Override public void readNBT(Capability<IDiseases> capability, IDiseases instance, Direction side, INBT nbt) { CompoundNBT tag = (CompoundNBT) nbt; instance.setDiseases(tag.get
  14. I am not too familiar with the eclipse debugger, (The last time I modded was on 1.7.10 using Intellij). I know that my getCapability() method is working, but after adding print statements to the serializeNBT and deserializeNBT, I did not see any printouts so I do not believe they have been invoked. @Override public INBT serializeNBT() { System.out.println("serialize diseases"); return DISEASES_CAPABILITY.getStorage().writeNBT(DISEASES_CAPABILITY, this.instance.orElseThrow(() -> new IllegalArgumentException("LazyOptional must not be empty!")), null); } @Override public void de
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.