Skip to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Draco18s

Members
  • Joined

  • Last visited

Everything posted by Draco18s

  1. You need to clone the item stack before dropping it into the world.
  2. @Override public boolean isOpaqueCube(IBlockState state) { return false; } @Override public boolean isFullCube(IBlockState state) { return false; } @Override @SideOnly(Side.CLIENT) public BlockRenderLayer getBlockLayer() { return BlockRenderLayer.CUTOUT; }
  3. All three of the methods I mentioned pass a World and BlockPos arguments.
  4. By the way, why are you using "chunkx*16" in one place, but "cx" in the others?
  5. x >> 4 is division. x << 4 is multiplication.
  6. No. You override those methods on your TNT block so that when one of them is called you make it explode.
  7. @Override @SideOnly(Side.CLIENT) public BlockRenderLayer getBlockLayer() { return BlockRenderLayer.CUTOUT; } Use CUTOUT or TRANSLUCENT as appropriate.
  8. Actually, I think it only supports X and Y, no Z no matter what you tell it. Minecraft assumes that rotations on Z are actually rotations on X, plus a 90 degree rotation on Y, and thus ignores it in the json file, as "you really should just simplify that."
  9. This will let you understand the broad strokes, but honestly little about making it work: http://mcforge.readthedocs.io/en/latest/blockstates/forgeBlockstates/ This is very nuts and bolts, but won't explain the broad strokes as to why it's doing what it's doing: https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/hardlib/client/ClientEasyRegistry.java (super methods there call the setRegistryName and GameRegistry.register methods) My code there was put together very much with the help of Choonster, so help yourself. I've been adding to it as I find something new that I want to do that isn't supported by the class yet (e.g. I it won't currently support a block, with variants, and a custom item that only needs to be one variant--say, a bed--as I haven't encountered the need yet).
  10. Override protected ItemStack createStackedBlock(IBlockState state)
  11. "Damage not being saved" and "stays 0 on the server" means you're only damaging the item on the client side.
  12. Wrong. http://stackoverflow.com/questions/9748160/why-f-is-placed-after-float-values
  13. I believe so, yes. You can also use Blockstate variants if you want to, rather than multiple separate json files.
  14. You could also override getFlammability, isFlammable, or getFireSpreadSpeed (each called when the fire attempts to spread to that block, at some point) and spawn your lit entity or explosion.
  15. Uhmm, wrong thread? Don't you mean this one: http://www.minecraftforge.net/forum/index.php?topic=42618.0? ...how'd I manage that? >.<
  16. [wrong thread] 9.9
  17. Update to 1.10.2, 1.7 is no longer supported here.
  18. That's because setBlock(x, y, z, block) is now setBlockState(BlockPos, IBlockState)
  19. Something something, this is why I have to try-catch a chunk of my code, because I specifically want to know what the hardness of a block (and its harvest tool/level) is without having a valid world position to look at (so I pass null for the world and catch the null pointer exception).
  20. Probably the while loops. Like, their entire existence.
  21. No that's-- User was banned for coremodding
  22. TL;DR: Chunk data needs to exist in its own native class object during runtime. You only need to save to NBT when the chunk is saved (and then read it when its loaded again). You'll need these events: https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/flowers/FlowerEventHandler.java#L74 (CogOreGenEvent is just a deferred chunk generation event that I must use; you can use the vanilla chunk generation events) And this is what I do with them: https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/flowers/util/OreDataHooks.java There's a lot going on for me (because my data is complex) but the basics is that when the chunk is generated I create some data that gets stored. There's a "get" method for retrieving the stored value as well. Then during ChunkSave the data is added to the chunk's nbt, and on ChunkLoad it's read. At ChunkUnload the data is removed from the runtime storage (so memory isn't leaked by a player flying through the world).

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.