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.

Selim_042

Forge Modder
  • Joined

  • Last visited

Everything posted by Selim_042

  1. As part of my mod, I am using world.setBlockToAir, but it is not updating that the block is no longer there on the client. I run the server and connect two clients, one that initiates the method on which it works fine, but the other client still sees the block as there. I can still stand on it until the server kicks the client for "flying". I have already tried world.markAndNotifyBlock but I am guessing it isn't doing what I thought it would.
  2. Ok, I have it all sorted out. I am currently using block IDs temporary until I can figure out a good way of storing the block registry in NBT as it is a ResourceLocation and cannot be simply casted to a string for easy storage. Once I figure out how to store the registry, I will use that instead.
  3. Okay, I can store the block now, but I cannot figure out how to get the BlockState back from the ID and metadata. I can either the block from getBlockById, or the BlockState with getStateById, but I cannot figure out how to place that block in the world. The only method I can find is world.setBlockState, but that doesn't use the block ID.
  4. I was wondering if there is a simple way of storing a BlockState within an NBTTagCompound.
  5. I think I am going to resort back to a TESR, thanks for the help though.
  6. It is coming from a JSON string from ComputerCraft.
  7. I have a JSONObject saved in the TileEntity. I was wondering if there is a way of rendering a model right from the JSONObject rather than using a model file or a TESR. Cause a JSON model file is just a serialized JSONObject right?
  8. Is it easily possible to render a model taken right from the JSONObject rather than going from the JSON file? My end goal is to save a JSONObject to a TileEntity that will render that JSONObject as a model, without needing a TESR.
  9. Yup, I'm dumb. I had each field set as static. Thanks.
  10. I am attempting to create a ComputerCraft addon that has some peripherals in it, but my current issue is that each of my TileEntites all seem to have the same stored NBT data. Does this sound familiar to anyone else that they may just have a solution without me sharing my code?
  11. What I want to do is to combine two items, then the recipe returns one of them with a modified NBT tag. I can't seem to get it, but I do understand that it requires using the IRecipe interface. What I currently have is: http://pastebin.com/x7k8Bg8z
  12. It works now. Yay!
  13. It appears it is not being called.
  14. It does not Override properly, asks where it wants to create a new method at, then lists all the Interfaces that my class implements. Might help to note that my item is a helmet, and extends the ItemArmor class rather than Item.
  15. Well, that is looking at the NBT data of the item, and displaying lore dependant on what NBT is true. But, not even the "Modules:" text that should be displayed not caring about NBT doesn't show.
  16. I have been trying to figure out my issue with my addInformation method for the past hour and a half or so, but I just can't figure it out. Nothing at all shows up for lore on the item. I am importing the java.util.List class, and this is my method: public void addInformation(ItemStack itemStack, EntityPlayer player, List list) { list.add("Modules:"); if (itemStack.stackTagCompound != null) { boolean gogglesOfRevealing = itemStack.stackTagCompound.getBoolean("gogglesOfRevealing"); if ((gogglesOfRevealing == true) && (LoadConfig.enableGogglesOfRevealing)) { list.add(" - Goggles of Revealing"); list.add(" " + EnumChatFormatting.DARK_PURPLE + "Vis discount: 5%"); } boolean terminalGlasses = itemStack.stackTagCompound.getBoolean("terminalGlasses"); if ((terminalGlasses == true) && (LoadConfig.enableTerminalGlasses)) { list.add(" - Terminal Glasses"); Long guid = extractGuid(itemStack); if (guid != null) list.add(" " + StatCollector.translateToLocalFormatted("openperipheral.misc.key", TerminalUtils.formatTerminalId(guid))); } boolean nightVision = itemStack.stackTagCompound.getBoolean("nightVision"); if (nightVision == true) { list.add(" - Night Vision"); } } }

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.