Jump to content

Draco18s

Members
  • Posts

    16559
  • Joined

  • Last visited

  • Days Won

    156

Everything posted by Draco18s

  1. Are you replacing the vanilla doors? No? Then you are not overriding the registry entry for vanilla doors. The "overriding vanilla blocks" issue deals with registering a block with the same registry name of a vanilla entry (eg. "minecraft:door"). You are not doing this, the problem that thread mentions is not relevant. You are extending the door class. You are overriding methods not the blocks. You can do whatever the heck you want to your own blocks, you don't even need to extend BlockDoor if you want to (though not recommended). The problem mentioned in that thread is how due to the way blockstates are serialized you can't add new states to existing blocks. You aren't adding new states to an existing block, you're adding whatever the fuck you want to your own block.
  2. That is not what you're trying to do. You're adding new doors not replacing the vanilla door.
  3. Tile Entities are more intensive, not less. The game already uses baked models for your blocks, so that won't help, other than cutting down startup time (assuming you do less to compute your models than the base game). Unfortunately beyond that, I don't think we can help.
  4. By the way, your block's voxel shape is way more complex than it needs to be. And some of the values have gotten very...mm...floating point precision error'd (like, 7.299999999999997 instead of 7.3) Grabbed one and ran it through some code I had from the Advent of Code to get an idea of what it looks like (each character represents a 0.5 pixel area). It's a mug. ############# ############# ################## ################### ################### ### ############# ### ############# ### ############# ### ############# ### ############# ################### ################### ################### ############# ############# ########### ########### ######### ######### You could just make that a single cuboid instead of making Minecraft compute the physics shape at such precision. I could see maybe wanting to make it two or three because of the handle, but 50 slices?
  5. Your coder needs to extend the relevant item class to get the behavior you want. I assume that vanilla has a special item class for the sweet berries already and it's just a matter of either using this item for your block, or extending it. But yes, showing the current code will help us address the problem.
  6. https://lmgtfy.app/?q=java+how+do+I+extend+a+class
  7. It's buried in a complex linq expression here, but example: https://github.com/MinecraftForge/MinecraftForge/blob/72598871762a98c566689acddec539fa369ed86c/src/test/java/net/minecraftforge/debug/gameplay/loot/GlobalLootModifiersTest.java#L158-L164 What that linq expression does is check the itemstack passed to the method to see if it has a smelting result (161), and if so, return the result as a new stack (162), else return the original stack (163).
  8. It's almost like I wrote all the code you need for you.
  9. What are you trying to make immune to fire? The axe? The player?
  10. Don't overwrite, extend.
  11. I'm sure the server already exists; after all, it would have to in order for you to join the world...
  12. You never assign anything to myButton. You changed this:
  13. IIRC, the Forge GitHub's samples contain a mob modifier. I don't remember what mob I did though. I vaguely remember it being zombies. But it should provide a functioning template.
  14. Ok, now think about the logic you have in your canStickTo function.
  15. Well, think about it. You want your sticky blocks to pull each other, yes?
  16. To invert this statement: if(other.getBlock() == Blocks.SLIME_BLOCK || other.getBlock() == Blocks.HONEY_BLOCK) return true; Do this: if(other.getBlock() == Blocks.SLIME_BLOCK || other.getBlock() == Blocks.HONEY_BLOCK) return false; You then need to realize that this statement doesn't do what you want: return other.isStickyBlock(); //only stick to other blocks if the other block is also sticky
  17. ...and Objects.requireNonNull does not return a non-null value when passed null. It is an assertion; if it fails, throws a null pointer exception. This is its implementation: public static <T> T requireNonNull(T obj) { if (obj == null) throw new NullPointerException(); return obj; }
  18. That boolean property could be called MADE_OF_GOLD for all the relevance it has to its name.
  19. https://mcforge.readthedocs.io/en/1.17.x/networking/
  20. I tend to forget that one, but do remember F4, which opens the type hierarchy for a focused Type, and if I know that I'm looking for a block (or PlayerEvent, or whatever), I can quickly make a variable and F4 it and browse.
  21. This block surely has code you can look at, yeah? Go look at it.
  22. MCPBot on the Forge discord server.
  23. Show your code.
×
×
  • Create New...

Important Information

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