Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by Erfurt

  1. I would love to, but non-static, my methods are used within some commands that are static
  2. So, I have done some work on this, and I think I just need to get the LootTableManager now. But since Minecraft#world is wrong, I don't know how to get it then.
  3. I don't see those two methods, getField and getLootTables, I assume it's findField and getLootTableManager? It's my first time doing anything with reflection, so will that method still get the value?
  4. Hey guys So I have this class, where I get the chance value from a loot_table, it works perfectly, however I would like to add datapack functionality to this. And I'm pretty lost here, I know I have to add datapacks in my getManager(@Nullable World world) method, and I have no idea how to do that atm, so I could use some help achieving this It is possible that there is a vanilla/forge method where they are already stored, but it's something I haven't been able to find myself The class in question
  5. Fair enough, I just thought that you could do it without creating addon mods. Might look into hiding them.
  6. I believe I get this, but I'm not sure how I can have the blocks only be in the game if both mods are installed. I thought that I would do that with what I had done with my if statement. So I'm a bit confused at the moment. You say that all blocks always have to be registered, but what should I be doing instead then? I'm using mod1(the one that adds the new blocks) to also add block variants for mod2. So if mod2 is loaded, I want to have all the blocks, but if mod2 isn't loaded I don't want the variants for mod2. At the moment I'm not using classes or anything else from mod2. I hope you understand.
  7. So doing it like this, is wrong? Only checking if the mod is installed, if so it's registering the blocks inside the if statement. Not sure what you mean by "reflection barrier"
  8. I have decided to just make another constructor, in the classes that uses a block, so I can put in the properties manually instead, seems to be the best workaround for now. It does mean that if I want to include other mods that's not mine, I need to know the properties, but I might not want to do that anyway, so for now that's fine. EDIT: Just to be sure... All I have to do for a soft dependency is to have an if statement in the registry even, right?
  9. Ah okay, so if I want to do it this way, there's no way to have the mod work without the other mod, am I correct in that assumption? Unless I do some redesigning of my classes. I assume it's the same if I create the chimney blocks in my other mod, using the classes as that would also be a direct reference, right?
  10. I'm just passing the block through, so I can use it to get Properties.from(Block) because I want to have the same properties as the block I'm using, in this case I'm creating some chimney block variants for vanilla blocks, and I wanted to make the same for my other mod, but only if I'm able to do this with a soft dependency. And at the moment when I try to build the jar file, I get an error. So I wasn't sure if I couldn't do it with a soft dependency or if it has to do with forge 1.13.2 not being completely done.
  11. Hey again, If I want / need to access blocks or classes from the other mod, is that possible to do with a soft dependency, or do I need to make it a hard dependency for that?
  12. Well whether the names are correct or not, there's not something called getProperty, so it wont work either way, that's way I asked if you were sure you could do getProperty. I have the correct names, so that's not really an issue. Just the method that doesn't makes sense, I have tried being a little creative and do .getProperties().equals(BlockSlab.TYPE) == SlabType.BOTTOM, that just gives an incompatible error. EDIT: I'm an idiot sorry, .getProperty is just .get in 1.13.2, and it works fine
  13. Are you sure that you can do getProperty in 1.13.2, because I can't find it. All I can see is getProperties() EDIT: I'm using the latest version 25.0.219
  14. So I have been trying to get that to work, and I can only get it to check if the block above has the property, and not get the value of the property. Here's what I have, block_above.getProperties().contains(BlockSlab.TYPE) which always return true if the block above is a slab. I need to get the actual value of BlockSlab.TYPE, to see if the slab is SlabType.TOP or SlabType.BOTTOM, any ideas? Because I'm completely blank at the moment.
  15. Ok, I did that earlier and I couldn't get it to work, but I'll give it another try Thanks for now
  16. So I should do it like this? block_above.getProperties().containsKey() if so, I don't see .containsKey(), I only see .contains() and .containsAll()
  17. Hey guys, Can someone help me, I'm really stuck. I want to do a check on the block above my custom block, to see if it's a bottom or top slab. I had something working back in 1.12 block_above.getProperties().containsValue(BlockSlab.EnumBlockHalf.TOP) Where block_above is the blockstate above my custom block. This no longer works,I assume there has been made some changes to properties or the getProperties(). At least I can't seem to do .containsValue() anymore, maybe it's just me who are dumb, and there's a simple solution that I can't seem to see. I guess that I still have to do block_above.getProperties(), but after that I'm kinda clueless atm. Any help would be appreciated.
  18. Hey guys, Can someone show me how I use dependencies in 1.13.2? I want to use a soft dependency between my two mods, so that they can work independent of each other, but have extra blocks and stuff if both are installed together. I would also like to see an example of a hard dependency, just in case. I have only been able to find some out-dated information that doesn't seem to work anymore.
  19. Well... It's not just the item models I need to make, I also need to make block models, and redo all the blockstates. And when many of my blocks use multiple different models, then it quickly adds up. I understand that it might not be high on the list, however it seems that they are working on it, so I can wait till it's done.
  20. I see thanks for the information, I hope that they can get it implemented soonish
  21. This is the main "error" that I get The thing is that I have about a hundred blocks, and if I have to redo all of my blockstates and have them be "vanillafied", making new files for blocks and blockitems, that's going to take me about a week to do, as I have very limited time to work on this. So if I could use my old files, by updating a few things here and there, then that would be great. Also can anyone confirm or deny if it's implemented or not at this stage? I'm using the 1.13.2 - 25.0.90 version. No point in trying to make it work if it's not implemented.
  22. Hey guys, so I'm currently in the process of updating a modding project, and I'm having some trouble with my blockstate files. It's something that was working in 1.12.2, and isn't anymore. I know that some textures have changed names, and that the vanilla way has been updated between 1.12.2 and 1.13.2, however I had been using the forge method, and they don't seems to work now. So my question is do I need to implement the changes from vanilla in the forge method? Here's a couple of my files that is no longer working, these are taken from my 1.12.2 mod. So that's way the textures names are wrong. My other question is do I need to make item models for all the blocks now aswell or does the forge method still not need them, for certain types of blocks? So just to be clear nothing have really changed in my own naming scheme. So if nothing have changed with the method I'm using, then I must have done something wrong elsewhere. But if someone could just give me an example for a normal block, then I should be able to figure out how make it work with something like the wall blockstate.
  23. Hey guys, so I have been working on making a new passive mob/entity, everything works as I want it to. However I would like to use multiple different textures for it. After looking at some of the vanilla code for other mobs, I wasn't able to find anything solid that I could use. So how am I supposed to do this? From the information that I have been able to gather, it seems that vanilla mobs can have variants in a folder for a mob, but how would I do the same thing for my mob?
  • Create New...

Important Information

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