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

peter1745

Members
  • Posts

    53
  • Joined

  • Last visited

  • Days Won

    1

peter1745 last won the day on March 11 2019

peter1745 had the most liked content!

Converted

  • Gender
    Male
  • Location
    Sweden
  • Personal Text
    Hello

Recent Profile Visitors

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

peter1745's Achievements

Stone Miner

Stone Miner (3/8)

4

Reputation

  1. Never mind. I just realized that it's not an actual loot table but it's actually just a Resource Location... Sorry...
  2. Don't you have to register it? I want to assign the loot table to a chest in my structure generation code, it's not for a block or entity. I want to do something like this: protected void handleDataMarker(String function, BlockPos pos, IWorld worldIn, Random rand, MutableBoundingBox sbb) { if ("chest".equals(function)) { worldIn.setBlockState(pos, Blocks.CHEST.getDefaultState().with(ChestBlock.WATERLOGGED, Boolean.valueOf(worldIn.getFluidState(pos).isTagged(FluidTags.WATER))), 2); TileEntity tileentity = worldIn.getTileEntity(pos); if (tileentity instanceof ChestTileEntity) { ((ChestTileEntity)tileentity).setLootTable(this.isLarge ? LootTables.CHESTS_UNDERWATER_RUIN_BIG : LootTables.CHESTS_UNDERWATER_RUIN_SMALL, rand.nextLong()); } } } That code is taken from the Ocean Ruin Structure, as you can see they load a loot table, register it and then access it from the Ocean Ruin Structure.
  3. I'm currently working on creating my own loot table. I don't want to inject into an already existing table, I want to load my own but I haven't found any resources on it and I'm unable to figure out how to do it by looking through the code. Does anyone know how to do it? Thank you.
  4. Thanks for the tip! It seems like the easiest structure to mimic is actually the fossil structure. It's the easiest to understand at least.
  5. Hello! I'm looking for tutorials on structure generation for 1.14 or 1.15. I've found a few tutorials on the subject but none are up to date. I've tried to look at how vanilla minecraft does it, but I can't figure out how to do it myself. And I don't understand the concepts enough to do so. if anyone knows how to do this, or has any pointers to tutorials it would be very much appreciated
  6. Yeah I know vanilla isn't developed for mods, but it would still be convenient if you could easily make custom variants of certain blocks and things like effects. It's not really a big deal to have to create a brand new class, but it's still more convenient if don't have to. Especially since you might not want to add custom behavior.
  7. I was recently trying to create a custom Effect and a custom glass pane. But I had to make my own custom class that extended the Effect class since it's constructor is marked protected. I had to the same thing with my custom glass pane. I don't get why these constructors are protected? Is there actually a reason for it? Seems unnecessary to have to create empty classes just to access a constructor of a vanilla one. I mean yeah, if you're want implement some custom behavior then you obviously have to create a custom class, but I just want custom textures, not custom functionality which means that creating a brand new class is really wasteful.
  8. Managed to solve it by overriding the same functions as the AbstractGlassBlock class. Can't really say what the issue was since the function names aren't obvious.
  9. Nope. Didn't do the trick, I'll have to look into the Glass code but I think it might be a side effect of the block being water logged AND cut out. Also, in order to format actual code you can click the "<>" icon in the reply editor
  10. I'm having a strange lighting bug/issue with a block that I've added to my mod. It's a cutout block, so I've set the RenderTypeLookup for the block to cutout. I've tried overriding the methods that checks if it's a "normal" cube but that didn't solve it. Anyone know what the problem is?
  11. Yeah it is. I wasn't sure how that functionality was implemented in the game initially but water logging crops prevents water from breaking them.
  12. I would recommend taking a look at Obfuscate by MrCrayfish. I think it allows you to do things like that. But code injection and such is quite an advanced topic in modding.
  13. For 1.15? I doubt there's any tutorials of world generation yet since 1.15 is relatively new. You should take a look at how vanilla minecraft does it.
  14. I tried making a crop that could be waterlogged and that worked. I don't think blocksMovement affects whether or not water pops a crop off since things like kelp doesn't block movement. But thank you either way for the suggestion!
  15. Hello! I'm currently working on a mod that will expand upon the underwater changes 1.13 introduced, and as part of that I want to make growing crops underwater a possibility (Vanilla crops won't be able to grow under water though). I've made it so that you can till soil under water, but I'm not sure how crops breaking under water is implemented (and how to get around it). I'm wondering if crops breaking due to water is implemented in the water fluid system or if it's implemented by the parent class of all crops? I've looked around a bit but due to searge names (i think that's what they're called) it's not super clear what each function does. Anyone know roughly how it works? EDIT I'm obviously going to have to waterlog all crops that can exist under water, but I'm not sure if that will solve it.
×
×
  • Create New...

Important Information

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