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. He'd marked it in his OP. giveItem = addButton(new GuiButton(11, gui.width / 2 + 5, 187, 150, 20, "Give Items: OFF"), buttonList); LINE 101 But I don't see what could be null on that line.
  2. Uh huh. What did you expect to happen when you used BBCode inside a post? You should have used [nobbc] and previewed it first.
  3. Don't use IInventory, use Capabilities. Namely the ItemStackHandler capability.
  4. Point. That's what I get for not having Eclipse open.
  5. No, for several reasons. For one, the return of this.getPos() is a ChunkPos, you don't need to construct a new ChunkPos with it. Second, the return of cap.chunkData.get() is your value, which cannot be used as the key to put new data in. cap.chunkData.put(this.getPos(), /*new value*/); If you want to modify the value (not replace it), then cap.chunkData.put(this.getPos(), cap.chunkData.get(this.getPos()) + /*some modifier*/);
  6. Trust me, I learned more about data structures and algorithms from modding Minecraft than I ever did in college.
  7. It's because you used the unlocalized name, yes. You should change this: ModelLoader.setCustomModelResourceLocation(i, 0, new ModelResourceLocation(BasicMod.MODID + ":" + i.getUnlocalizedName(), "inventory")); To: ModelLoader.setCustomModelResourceLocation(i, 0, new ModelResourceLocation(i.getRegistryName(), "inventory")); getRegistryName() automatically appends your Mod ID (and honestly, your unlocalized name should too, e.g. someItem.setUnlocalizedName(someItem.getRegistryName()) ).
  8. I wrote one once that replaced [dirt, sand] but only if the block was directly under a water block. https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/farming/world/WorldGenMinableSalt.java#L76 Required duplicating a whole method of WorldGenMinable save for the one if-statement, but whatever.
  9. Presumably cap.chunkData.get() returns something...
  10. 1) You didn't actually include ModItems, you pasted a second copy of your obsidian sword. 2) Caused by: java.io.FileNotFoundException: basicmod:models/item/item.obsidiansword.json Your file name doesn't match the resource you told Minecraft to load.
  11. Or rather: varargs is syntactic sugar that allows the compiler to automatically wrap the parameters in a new Object[] for you. This includes 0 extra arguments.
  12. So make your timer tick off more often and only restore some of the files each time.
  13. Because you're mapping the chunk's location to the value with a hashmap. There's how.
  14. Exception loading model for variant resmel:diamondStem#age=4,facing=west Caused by: net.minecraft.client.renderer.block.model.ModelBlockDefinition$MissingVariantException You don't have a complete blockstate file. Yes there will never BE age=4,facing=west as a valid state, but you still need to supply the state in the blockstate file.
  15. Caused by: java.io.FileNotFoundException: resmel:models/item/diamondMelonBlock.json Registry names (and resource files) should be in all lower case.
  16. It's just standard file stuff. Copy the originals somewhere safe on server startup (or whenever, you may want to make this happen once when a config value is true, then set the config value to false) and then every 15 minutes (use a TickEvent Handler and keep track of the time) copy the files back. The next time the server loads the chunks, they'll be read from the file. Already-loaded chunks might persist (particularly if something changes and the server saves afterwards) but long-term things will get reset.
  17. The "fully grown" texture is indeed used for all the other growth stages. It's easy to see if you watch the animation: [/img] The color is likely provided via IBlockColor or whatever the interface is called that allows a color to be multiplied with the texture.
  18. It's called from sendUpdateWithInterval which is, itself, not called. So no.
  19. You also need to post TileEntityBase
  20. And because they're from the Object class, they will totally do what you need them to. (Hint: no they won't because vanilla hasn't overridden them to do anything) If you don't want the FOV change then you'll have to use methods 1 or 2 that I suggested. You'll need to use packets.
  21. You need to tell the player's client that they're not allowed to move. The entity motionX/Y/Z values don't actually do anything on the server with regards to the player. Couple ways to potentially handle it: 1) intercept/cancel the input during the keypress event 2) prevent the motion the key input causes (I believe that this would be the entity motionX/Y/Z values) 3) This wouldn't require custom packets at all: hit the player with X seconds of Slowness 7.
  22. You create a new ItemSlab, pass the constructor the two slab blocks...
  23. Step 1: Register the block Step 2: Create a new ItemBlock Step 3: Register it

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.