Jump 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. That depends, what does the console say when you start the game?
  2. There's also no reason not to use .getDefaultState() in the onBlockPlaced method: the itemblock shouldn't ever have metadata associated with it. Also, you allow any facing when the block is placed, and even save that value into metadata. But when reloading the world you enforce the facing to be either UP or DOWN (any other direction gets set to DOWN).
  3. The ResourceLocation class adds the /texture and .png for you.
  4. You didn't declare your block state properties. @Override protected BlockStateContainer createBlockState() { return new BlockStateContainer(this, new IProperty[] {FACING}); }
  5. Well.... You're not calling registerRenders from anywhere You shouldn't be using the ModelMesher for rendering anyway (use ModelLoader.setCustomModelResourceLocation) Your rendering code shouldn't be in common code, it should be in your client proxy You have several spots where you're using the wrong character (you appear to be using something from UTF-8 not ASCII when ASCII is required). Namely in your @Mod annotation and here: ModHD1Items(String unlocalizedName, String registryName){ //why aren't these two lines ended with ; ? this.unlocalizedname=unlocalizedName%3B this.registryname=registryName%3B } Why are you using item.getUnlocalizedName().substring(5) ? Use getRegistryName like you're supposed to
  6. You need to clone the item stack before dropping it into the world.
  7. @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; }
  8. All three of the methods I mentioned pass a World and BlockPos arguments.
  9. By the way, why are you using "chunkx*16" in one place, but "cx" in the others?
  10. x >> 4 is division. x << 4 is multiplication.
  11. No. You override those methods on your TNT block so that when one of them is called you make it explode.
  12. @Override @SideOnly(Side.CLIENT) public BlockRenderLayer getBlockLayer() { return BlockRenderLayer.CUTOUT; } Use CUTOUT or TRANSLUCENT as appropriate.
  13. 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."
  14. 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).
  15. Override protected ItemStack createStackedBlock(IBlockState state)
  16. "Damage not being saved" and "stays 0 on the server" means you're only damaging the item on the client side.
  17. Wrong. http://stackoverflow.com/questions/9748160/why-f-is-placed-after-float-values
  18. I believe so, yes. You can also use Blockstate variants if you want to, rather than multiple separate json files.
  19. 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.
  20. Uhmm, wrong thread? Don't you mean this one: http://www.minecraftforge.net/forum/index.php?topic=42618.0? ...how'd I manage that? >.<
  21. [wrong thread] 9.9
  22. Update to 1.10.2, 1.7 is no longer supported here.
  23. That's because setBlock(x, y, z, block) is now setBlockState(BlockPos, IBlockState)

Important Information

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

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.