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 method only works in Single Player. As soon as a server is involved (including "Open to LAN") it will crash.
  2. onNeighborBlockChange is a Block function, not a TileEntity function.
  3. java.io.FileNotFoundException: powerapples:models/item/DiamondApple.json
  4. Speaking of: Eclipse doesn't like opening the mcmod.info files in its internal editor. I can, but not easily, and I can't set it as default (it complains that it doesn't recognize the file type).
  5. Also, most of the flamable stuff is handled by code in the BlockFire class. Blocks.fire.setFireInfo(myBlock, spread_rate, consume_rate); spread rate is the chance that a fire block not burning the target block will spread over and start burning it. The consume rate is an integer that represent 0.33% chance per tick that the fire will consume the block. Most full-block blocks are 60 or less (flowers, etc. are 100). Spread rates are also typically 60 or lower (a number > 300 is effectively "as soon as the check is made, the fire spreads over, but I never did figure out how the probability was determined, it's complex).
  6. Could methods: 1) Ask 2) Decompile the mod and look 3) Print out every god damn block name in the block list
  7. unlocalized name != block registry name GameRegistry.registerItem((new Item()).setUnlocalizedName("iron_nugget")), "my_iron_nugget");
  8. Only call the code if ExtraUtils is loaded.
  9. sifterRecipes.entrySet().iterator() ?
  10. Have you tried printing out what the IDs on the item are and comparing them to the ID you're looking for?
  11. Checking the stack for null after you reference it isn't going to do anything useful.
  12. Actually, I bet it would crash. You didn't check to make sure that the item in the currently equipped slot isn't null, and then you access its stackNBT.
  13. If you start doing any packet-sending code, then it could be your fault. Just remember not to send a packet all the time every time ten times over and you'll be fine.
  14. Let me guess: if you punch a zombie, it crashes. ItemStack stack = player.getCurrentEquippedItem(); //what value does stack contain when you punch a zombie? //what value does stack contain when a zombie punches you? NBTTagList ench = stack.getEnchantmentTagList();
  15. With Java, you can do anything. new File(DimensionManager.getWorldSaveDirectory()+"/region/r.0.0.mca").delete();//warning: will probably do bad thigns
  16. As for the bottom: you need to not render the bottom in the second pass.
  17. ConcurrentModificationException: You are modifying an array while another thread is trying to iterate through it.
  18. That's the Item renderer, show also the TileEntitySpecialRenderer class.
  19. It's not sided. But it gets sent any time the server sees that it needs to be sent. You'll want to call worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); if you make any changes to the data and it needs to update right away.
  20. You need to save the data in an NBT tag (read/write to/from NBT methods) and then add: @Override public Packet getDescriptionPacket() { NBTTagCompound nbtTag = new NBTTagCompound(); writeToNBT(nbtTag); return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 1, nbtTag); } @Override public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity packet) { readFromNBT(packet.func_148857_g()); } So that the data is passed from server to client.
  21. http://1.bp.blogspot.com/_D_Z-D2tzi14/S8TZcKXqR-I/AAAAAAAACwg/F7AqxDrPjhg/s320/ALOT13.png[/img]
  22. You haven't overriden public void getSubItems(Item item, CreativeTabs tab, List list)
  23. Well, the class-level variable will turn sour as soon as you have multiple copies of the item and a server with multiple players. Second, you should check that the entity is of the desired type before casting. Third, I'm not sure that setting sneaking like that works. Mostly because it's a state that gets updated all the time based on your keyboard input.

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.