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.

GotoLink

Members
  • Joined

  • Last visited

Everything posted by GotoLink

  1. That can't work. The base principle of crafting is to return a defined result, not a "general" item. What is the "proper" planks anyway ?
  2. PlayerDestroyItemEvent There are couple tutorials about events on the wiki, and some threads about it here.
  3. Item#setHasSubtypes(true) You need that so merging check for the item damage beforehand.
  4. cGeneral.stringInInputFieldText; Don't reference the gui class in your packet handler. Write that field into the packet, then read it into the packet handler. You can use Packet.writeString(String, DataOutput) for that.
  5. Change things on server side: if(!world.isRemote){ }
  6. You have trouble constructing objects and fixing a null exception. That isn't an issue with Forge. registerBLock(blockSewageWater, "FluidSewageWater"); Does that method exist ?
  7. You have to do it yourself from the ground up. Nothing in vanilla does it. Start by adding buttons to the list of buttons in the main inventory gui after it is opened. You can use custom buttons that render like tabs, and open another gui on click.
  8. Your thing isn't mod compatible at all. You are replacing the entire class simply to add a method. Use ASM to add the method into the vanilla class.
  9. You don't need a TileEntity. But the updateTick needs a first call so then the ticks will be scheduled. For example with Block#onBlockPlacedBy(...)
  10. Minecraft#mcDataDir Links to Minecraft active folder. Then you can use whatever child path you want.
  11. Huh...no, quite the opposite actually. By the way, gui is client side only, so you don't need to check.
  12. MinecraftForge.setToolClass(myItemTool, "pickaxe", 3); I did miss that on your post. This ForgeHooks thing only applies to Item, not ItemStack with NBT and all that. You'd better use PlayerEvent.HarvestCheck and PlayerEvent.BreakSpeed rather than this. If you still want to use it, you'd have to set the bricks harvest level too. MinecraftForge.setBlockHarvestLevel(Block.bricks, "pickaxe", 0); I've already explained why any pick can harvest bricks, without relying on this hook. With ItemPickaxe#canHarvestBlock returning true for any block with material as rock, except a few ores block.
  13. I'd add buttons that renders like that, their position being set relative to the current gui size. Each one links to a different gui, while all gui contains all buttons, with the button linking to the current gui is disabled.
  14. Not really backwards you know...if you can harvest a block without any str, then you don't need to check the str required If you try a diamond pickaxe on obsidian, it won't get the str check. That is expected. Always return false, and you'll always get the str check.
  15. In Block#updateTick(World,...) use World#playSound(String,...) then World#scheduleBlockUpdate(...) try to set the delay to something close to the sound length in ticks.
  16. I'd suggest override: Block#onNeighborBlockUpdate(...) check if neighbour is the fluid source, then set the block to air.
  17. "Better" building process than Maven and "better" dependency management than Ant, supposedly ? You can migrate from both to Gradle. That's all i know.
  18. Of course snow block does that. Snow material is set to being replaceable.
  19. When do you initialize your GuiHandler ?
  20. par1Block.blockMaterial == Material.rock ? true: If that is from the ItemPickaxe, then you get the expected result. You might want to do things differently.
  21. What is the block material ?
  22. Item#canHarvestBlock(Block, ItemStack) If you return true, you won't get the str check. Same goes if the block Material#isAdventureModeExempt(). Vanilla material for bricks is rock, which is not exempt, IIRC. From EntityPlayer: if (block.blockMaterial.isAdventureModeExempt()) { return true; } if (this.getCurrentEquippedItem() != null) { ItemStack itemstack = this.getCurrentEquippedItem(); if (itemstack.canHarvestBlock(block) || itemstack.getStrVsBlock(block) > 1.0F) { return true; } }
  23. Yes, you can write on the NBT which is stored on the "persisted tag" key.
  24. I thought Forge was compatible with vanilla...maybe you should report this as a bug.
  25. Or maybe changing every biome to being "snowable" ? BiomeGenBase#setEnableSnow() BiomeGenBase#setTemperatureRainfall(0.0F, wtvF)

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.