Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Erfurt

Members
  • Content Count

    246
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Erfurt

  • Rank
    Creeper Killer

Converted

  • Gender
    Male
  • Location
    Denmark
  • Personal Text
    I am new!

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. 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?
  2. 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
  3. Fair enough, I just thought that you could do it without creating addon mods. Might look into hiding them.
  4. 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 hop
  5. 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"
  6. 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?
  7. 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?
  8. 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.
  9. 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?
  10. 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
  11. 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
  12. 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.
  13. Ok, I did that earlier and I couldn't get it to work, but I'll give it another try Thanks for now
  14. So I should do it like this? block_above.getProperties().containsKey() if so, I don't see .containsKey(), I only see .contains() and .containsAll()
  15. 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 gue
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.