Jump to content

Draco18s

Members
  • Posts

    16559
  • Joined

  • Last visited

  • Days Won

    155

Everything posted by Draco18s

  1. Yes I know how that works. The problem was that you used the language in an ambiguous way such as to convey a lack of distinction between overriding the behavior of the existing vanilla doors vs. overriding the behavior by class extension for new doors. The restriction, as stated by diesieben07, was in direct response to "I got this error." That error only applies to the situation of replacing vanilla blocks with your own to modify the behavior of the vanilla blocks. If you had read further down, you'd have found this: Which precisely details the type of state extension you are interested in performing with the comment "this works."
  2. 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.
  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. 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).
  7. What are you trying to make immune to fire? The axe? The player?
  8. I'm sure the server already exists; after all, it would have to in order for you to join the world...
  9. You never assign anything to myButton. You changed this:
  10. 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.
  11. Ok, now think about the logic you have in your canStickTo function.
  12. Well, think about it. You want your sticky blocks to pull each other, yes?
  13. 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
  14. ...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; }
  15. That boolean property could be called MADE_OF_GOLD for all the relevance it has to its name.
  16. https://mcforge.readthedocs.io/en/1.17.x/networking/
  17. 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.
×
×
  • Create New...

Important Information

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