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. if(!Minecraft.getMinecraft().sndManager.sndSystem.playing("your_music") && Mouse.isButtonDown(1)) { Minecraft.getMinecraft().sndManager.sndSystem.play("your_music"); }
  2. Read again, or learn how to use booleans. This is the null class: public class null { //Really, just void } Do you see a getItem() method here ?
  3. Do you have Java for 64bits and 32bits ?
  4. As for help files, there is a "Read me before posting" sticky. The "Container and GUIs" tutorial is merely a practical example of a simple use case. Learn what you need from it: in Forge, the simplest way to pop a GUI is to use a player instance and implement a IGuiHandler. Buttons are implemented into GuiScreen.
  5. Probably not since nothing in Minecraft would use it. You can use the "look" vector (math is required ) from the player and its position to check blocks in a straight line, and stop when said block isn't air.
  6. Well your method has a "void" as return type. So you can't return null (which is an object). The other issue is you didn't check if "weapon" isn't null before calling getItem().
  7. :'( Copy pasting and not understanding the code... That var1 is completely useless. By the way, since markBlockForUpdate(x,y,z) didn't work, that method won't either. The issue is within the TileEntity. getCurrentLightValInt() probably doesn't return same value on both sides.
  8. bench.gettingEXP() In the Gui, client side...but exp is only updated server side. Send packets.
  9. None of your slots use the player inventory. Check your layoutInventory() in NetControllerContainer.
  10. Huh ? Why do you use EntityPlayerMP instead of EntityPlayer ?
  11. Then make your own timer. @Override public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer entityPlayer) { if(time<limit) { time++; } else { //do things } return stack; }
  12. Then we set the item in use on right click. @Override public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer entityPlayer) { entityPlayer.setItemInUse(stack, this.getMaxItemUseDuration(stack)); return stack; } Then @Override public void onPlayerStoppedUsing(ItemStack stack, World world, EntityPlayer entityPlayer, int amountUsed) { //do things... if (!world.isRemote) { world.spawnEntityInWorld(new EntityTear(world, entityPlayer)); } }
  13. entityplayerbalances is null. It isn't set in WelcomeMessages before player login.
  14. Override: /** * How long it takes to use or consume an item */ public int getMaxItemUseDuration(ItemStack par1ItemStack) { return 0;//change that }
  15. Do you call registerSound() yourself ? What is in EventSounds class ?
  16. If you want the light change to happen fast, you'll need to call a block rerendering, with world.markBlockForUpdate(x,y,z), for example.
  17. You can put a setter for the drop in a custom block class file, so you can chain it into your block initialization line.
  18. Yes, initializing your mod before world generation is highly recommended.
  19. Your class which implements IExtendedEntityProperties is on both sides. I would suggest using it.
  20. extend ItemBow and change only what you need to.
  21. Show your item class.
  22. See the originals: public Block func_111022_d(String par1Str) { this.field_111026_f = par1Str; return this; } @SideOnly(Side.CLIENT) protected String func_111023_E() { return this.field_111026_f == null ? "MISSING_ICON_TILE_" + this.blockID + "_" + this.unlocalizedName : this.field_111026_f; } public void registerIcons(IconRegister iconRegister){ this.blockIcon = iconRegister.registerIcon(this.func_111023_E()); } Use func_111022_d, the texture setter.
  23. Drop the overriden method. You only have one texture, use the texture setter. (its name is obfuscated, but pretty obvious anyway) Also, @Instance should get the modid, and items and blocks should be done in PreInit.

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.