Jump to content

Draco18s

Members
  • Posts

    16559
  • Joined

  • Last visited

  • Days Won

    156

Everything posted by Draco18s

  1. (Eclipse) F4 on any class name will open the type hierarchy (so if you did it on Block, you'd see all the subclasses, and if you did it on HorizontalBlock, you'd only see the subclasses of that). I can never remember the "go to definition" hotkey (it's F12 in Visual Studio, because of course I can remember that one), but hovering over a thing will give you an intellisense popup and clicking on the class identifier in that will do the same thing.
  2. I wonder what combinedLight is. https://github.com/NovaMachina-Mods/ExNihiloSequentia/blob/1.16/src/main/java/novamachina/exnihilosequentia/client/render/SieveRender.java#L34
  3. The error is caused by registering the event to the wrong bus. Change the bus, error goes away.
  4. Surprise, accessing the client thread from the server thread isn't possible. Bitch at the author of wonderfulenchantments.
  5. The game does not recognize a Z axis for rotation because the game world does not distinguish between "north/south" and "east/west" as being unique for the purpose of rendering things (that is, models should be compass orientation agnostic).
  6. Having actually benchmarked this, not really. Scanning a whole chunk from 0 to 64 takes 600,000 nanos provided you're doing virtually nothing else (e.g. don't find a matching block). Adding a position to a list is going to be pretty small as well (my benchmarking involved more complicated stuff, which included setting block states, and even for a bunch of matching blocks I never exceeded 1,200,000 nanos for a single chunk). For a full 11x11 chunk area around the player and the full chunk height you're looking at 290ms +/- 15%. It's still not a great idea, but the actual time on checking blocks is tiny.
  7. https://lmgtfy.app/?q=java+tutorial+for+beginners&iie=1
  8. I'm hesitant to share this code, as it is fucking ancient (I wrote it for 1.6.4 and someone else updated it to 1.7; yeah it's that old), but still might be helpful. (The block had 1 inventory slot and it would render that item's name on the "front" of the block). https://github.com/Draco18s/Artifacts/blob/master/main/java/com/draco18s/artifacts/client/PedestalRenderer.java#L57
  9. Those function names are called SRG names. They're the semi-reliable automated decompilation names (instead of a.a() you get Block.func_12345_c()). It is then up to the community to figure out what that function does and supply a human-readable name.
  10. Pretty sure those are the maxLevel and maxEnchantability methods (with maxEnchantability calling minEnchantability ). Names approximate, but that should give you a thing to look for.
  11. Yeah I literally wrote the code for autosmelt already. Things've changed a bit, but it was one of the "someone is going to want this, so my system better support it" test mod examples. https://github.com/MinecraftForge/MinecraftForge/blob/1.16.x/src/test/java/net/minecraftforge/debug/gameplay/loot/GlobalLootModifiersTest.java#L146-L178
  12. https://minecraft.gamepedia.com/Breaking#Speed https://minecraft.gamepedia.com/Enchanting_mechanics#Enchantability
  13. https://ericlippert.com/2008/09/10/vexing-exceptions/ File handling is exogenous. If an exception occurs, clean up what you can (eg. if you successfully opened a file, close it), then die with a fatal exception. Currently you're catching the exception, logging it, and continuing as if nothing bad happened (and thus, generally make things worse).
  14. Look at the Screen class. In general, guis haven't changed much since 1.10 The missing page has been missing for a while.
  15. There is only one event handler. If you want to store data for a player you need a capability.
  16. Except for all the situations where that space isn't air. Oh and wouldn't supply power in the desired location.
×
×
  • Create New...

Important Information

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