Jump to content

Draco18s

Members
  • Posts

    16559
  • Joined

  • Last visited

  • Days Won

    156

Everything posted by Draco18s

  1. Show your code. Better yet, link a working git repository.
  2. This is a forum. You don't.
  3. Ever since they were introduced, which I believe was 1.12
  4. How much programming knowledge do you have?
  5. Don't use IInventory, use ItemStackHandler.
  6. Subscribe to the ... BreakSpeedEvent (if I remembered the name correctly) and set the event's speed (might be "newSpeed" or similar) to 0 when the condition you want (1 durability) is true.
  7. Ah, I misunderstood the problem. So basically what I said was inverted. "The server controls that code and the client knows fuckall about the data until you pick the item up." You either need to run similar code on the client or use packets.
  8. Well, if you look at the arrow entity, you'll see that it maintains a reference to the player that fired it.
  9. Which client? More than one player can be connected, you have to pick one.
  10. You registered the class itself to the event bus. This requires the event listeners to be static (because instance methods require an instance).
  11. Unloaded chunks do not exist. Its not that they don't have a state, they literally, fundamentally don't exist. An unloaded chunk can be in one of three states: Never Created Created, but not generated (Minecraft has allocated memory, but not run generation, and it is possible for a chunk to be part way through that process)* Populated, but saved to disk There is no way to differentiate between these states. The only "solution" is to load the chunk. *Technically there are ways to query block states in these chunks, but as their memory is in another thread, it is not safe to do so.
  12. If it is unloaded, it doesn't exist. You can only view loaded chunks.
  13. I know bugger all about recipe book groupings.
  14. FYI, blocks and items are registered before configuration events are fired. This is intentional.
  15. The "do it with code" way does not involve writing new blockstate json files or simulating them in any way. YOUR block has a tile entity that stores a block state of the block to "mimic." You then extract a texture from that blockstate's model and use it in a TileEntity renderer using your own geometry. You will need to figure out how to extract the desired texture from the model yourself.
  16. Its not better and easier if you get half way there and then have no clue what the next part is. I'm not even sure what you're trying to do, there.
  17. Yes. However, be aware that the default is that all conditions must be true in order for the check to pass. If you want an OR logic operator, you need to declare that too.
  18. Well, for one, you can't have two objects with the same key. So your attempt to name two items doesn't make any sense. For two, conditions is an array.
  19. Create a json loot table for what you want. Then do this: https://github.com/Draco18s/ReasonableRealism/blob/1.14.4/src/main/java/com/draco18s/harderfarming/EventHandlers.java#L51-L53
  20. Example code of what? You never asked a question.
  21. Because, fundamentally, that code runs on the client and the client controls bugger all. Only the server can modify that data.
  22. You can't make blocks that extend outside the 1x1x1 volume. No. No. Stop trying. You can't. The game doesn't support it, everything breaks. If you absolutely must have this feature, then you must use extra blocks, like how the vanilla bed and door do.
  23. Maybe some old code of mine will help. https://github.com/Draco18s/HarderStuff/blob/master/src/main/java/com/draco18s/hazards/client/HazardsClientEventHandler.java#L188
×
×
  • Create New...

Important Information

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