Advertisement
supersaiyansubtlety

question.md

Nov 11th, 2020
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.97 KB | None | 0 0
  1. I'm trying to add a stack-crushing feature to my anvil crushing recipes mod and I'm getting an issue I *really* don't understand.
  2. First a basic explanation:
  3. - the mod lets you define recipes with block or entity ingredients and that can output in a variety of ways
  4. - I'm adding a feature that lets you specify a lit of ingredients, all of which must be crushed to obtain the output
  5. - to accomplish this, I've:
  6. - mixin'ed to `FallingBlockEntity`, saving a `crushedList` that I save/retrieve by mixing into `writeCustomDataToTag` and `readCustomDataFromTag`
  7. - mixin'ed to `AnvilBlock`, implementing `BlockEntityProvider` (I've created an `AvnilBlockEntity` class)
  8.  
  9. Now the issue:
  10. Somehow my `crushedList` is getting passed between different anvils or falling anvils.
  11. This makes recipes not work consistently when testing a single anvil, and makes trying to do multiple anvil crushing recipes at once consistently fail.
  12.  
  13. I've double checked my mixin classes and I've made nothing static.
  14. I've also double checked that my `AnvilBlockEntity` is being removed the same way other BEs are removed (or at least the same removal code is reached).
  15.  
  16. Here are
  17. - `AnvilBlockMixin` https://gitlab.com/supersaiyansubtlety/anvil_crushing_recipes/-/blob/stack-crushing-feature/src/main/java/net/sssubtlety/anvil_crushing_recipes/mixin/AnvilBlockMixin.java
  18. - `FallingBlockEntityMixin` https://gitlab.com/supersaiyansubtlety/anvil_crushing_recipes/-/blob/stack-crushing-feature/src/main/java/net/sssubtlety/anvil_crushing_recipes/mixin/FallingBlockEntityMixin.java
  19. - `AnvilCrushingRecipe` https://gitlab.com/supersaiyansubtlety/anvil_crushing_recipes/-/blob/stack-crushing-feature/src/main/java/net/sssubtlety/anvil_crushing_recipes/AnvilCrushingRecipe.java
  20.  
  21. also, here's a test world where I have a setup to drop multiple anvils at once
  22. https://gitlab.com/supersaiyansubtlety/anvil_crushing_recipes/-/tree/stack-crushing-feature/run-client/saves/1_16_3
  23.  
  24. Any pointers/suggestions would be appreciated.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement