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

ImNotJahan

Members
  • Posts

    68
  • Joined

  • Last visited

Everything posted by ImNotJahan

  1. I'm not sure what he meant but could you show what code the 76th line of NameBabyScreen is
  2. Fixed it, just had to override the triggerEvent method in the blocks class so it'd happen in the tile entity, so that the lid data would be synced between the client and server
  3. I'm implementing the IChestLid interface, and doing everything basically the same as in the vanilla chest and in the iron chests mod, yet still whenever it gets the openness value in the tile entity renderer it's always 0. This is where I get the openness value: And everywhere I set the value of the lid angle And lastly where I get the value: Any help's appreciated
  4. FMLClientSetupEvent is only called once, and is only called on the client (you'll want to give potion effects on the server), so the event you should use is TickEvent.PlayerTickEvent, then event.player.getHealth() to get the health, and lastly to add a potion effect you can also call .addEffect on the player instance provided by the event
  5. Okay yea that got it looking correctly, and the NullPointerException was just due to me forgetting to stop clearing the slots
  6. I've tried changing the x and y of the slots instead, but whenever I do this I get java.lang.NullPointerException: Rendering screen at net.minecraft.inventory.container.Slot.getItem(Slot.java:53) whilst rendering
  7. You're supposed to report issues with the mod here https://github.com/TinyModularThings/UniqueEnchantments/issues, and if they don't fix it then there isn't really anything you can do except remove the mod.
  8. Like what the title says I need the slots in a container to all be removed so I can then add in new ones. I have a method for whenever they should change, and it just runs slots.clear(); switch(menuIndex) { case 0: setupSwordInv(playerInventory); break; ... and more of this for a few more lines The setupSwordInv functions and others just place the slots, and I know that each function is being ran when it's meant to but all the slots seem to be in the exact same position from what they're set at during the start. I'm guessing there's something I have to do with syncing the container and screen after changing them, but I'm not sure what so any help is appreciated.
  9. You misspelled minecraft there which is probably what caused that recipe to not work, but also what you should do is upload the log
  10. Some of the code was made at a time I didn't know how to make exceptions so back then I just used ArithmeticExceptions for capabilities. I do got an exception for that now tho so I should probably change it so thanks for pointing that out. I did fix it and the solution was a large mix of things so I'm not exactly sure what fixed it, but I know a few of the things I needed to do were this: private static final LazyOptional<IStatus> lazyStatus = LazyOptional.of(Status::new); This line in my capability provider was static which was what was causing it to transfer over worlds, making it not static however made it stop saving. To fix that I had to change the parameters in both my readNBT and writeNBT calls from STATUS_CAP, this.instance, Status.capSide, nbt to STATUS_CAP, this.lazyStatus.orElseThrow(MissingStatus::new), Status.capSide, nbt because instance was a variable I for some reason created, which was never used other than in these functions, that was the default value of the capability After that I just had to fix up networking a bunch to get everything completely working, and the only problem there is I had no way to discern the packets being sent at the time, but yea fixing that got them all working correctly
  11. I have a capability which gets attached to the player, and yea it stays the same even when you go to another world Here are all the events todo with refreshing the capability Here are the packets And here's the rest of the source code https://github.com/ImNotJahan/danmachi-mod/tree/master/v1.16.5/src/main/java/imnotjahan/mod/danmachi
  12. Please don't take an image of your code, just copy and paste it. But the problem here is that your modid has capitals, while modids need to be all lowercase. Try changing it from GolemMod to golem_mod or something like that and see if that fixes it.
  13. It'd be a lot easier to test out my mods by using the help of other ones, but whenever I add a mod to the run/mods folder I get a ton of ClassNotFoundException(s). Same thing also used to happen back when I did 1.12.2 modding, so I'm guessing either you just can't with the forge mdk, or that I've got something wrong in my build.gradle/run configurations.
  14. Actually yea that's a good point, I'll just call super instead, but also I've figured out why it wasn't working By looking at SweetBerryBush I figured out that you have to replace the block to change the block state, so I just changed my previous state.setValue to world.setBlock(pos, state.setValue(POWER, Math.min(state.getValue(POWER) + 1, 100)), 2); and it all works now.
  15. I added this.registerDefaultState(this.defaultBlockState().setValue(UNSTABLE, Boolean.valueOf(false)) .setValue(POWER, 4)); to the constructor right after the super, but nothing has seemed to change.
  16. I have a custom TNT block which is meant to increase its power by 1 whenever given gunpowder, and I tried to make it put its power in a property instead of just a variable so I'd save, but nothing seems to change despite everything else working correctly. I know the explosion size changes correctly as it worked previously before using properties, and the only thing I've really done since it stopped working was add properties. Block class: TNT entity class Properties class:
  17. I've got capabilities and I was just wondering if there's a way to add a statistic with the value of that capability to the stat menu, so I can make my mod more useable with FTB quests and other similar mods which can take in a statistic to trigger an event
  18. Is there a specific function that's for scrolling because the onMouseScroll and onMouseDrag which I found in it both seem to do nothing
  19. Got it working by using the PlayerInteractEvent.RightClickItem event instead
  20. I'm trying to stop the onItemUse method from a sword that comes from ano ther mod from firing. I've tried cancelling the LivingEntityUseItemEvent but that doesn't seem to stop anything.
  21. What the title says, I want a scrollable screen to fit a bunch of buttons onto.
  22. Post the full log, as that just means some mod is messing with registries and breaking something (I think)
×
×
  • Create New...

Important Information

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