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. The client that sent the packet is the player that sent the packet. Duh.
  2. He means that stairs and the furnace have their "forward" pointing away from the camera when using metadata 0. In order for the item icon to render properly it needs to be "rotated" 90 degrees clockwise (IIRC). The solution is to make your item use a metadata other than 0.
  3. Oooh, that's handy. I probably won't ever do it that way, but so slick, so clean. The only event I'm are of that could get fired before your own mod's preInit that you might want to know about would be the OreDict registration event (as a mod loading before yours could register an ore during preInit).
  4. Actually what usually happens is that they've set up their code in such a way that swapping the two results in a similar, but different, crash. Because they're trying to pass the seed to the block constructor and the block to the seed constructor. Not the case here (they posted the block class, which is not taking the seed as a parameter) but they didn't post the Item class, so who knows what it's doing.
  5. See also: https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/hardlib/RecipesUtil.java
  6. 1) Mark dirty says "this needs to be saved to disk" not "send this to the client." 2) I believe the method you want is now called worldObj.markAndNotifyBlock(pos, chunk, iblockstate, newState, flags); 3) The client isn't updating its own values on its end because you did if (worldObj.isRemote) return; (you can safely remove that for the most part)
  7. That AABB is both 0 in size and centered near the origin of the world. You should be using new AxisAlignedBB(playerIn.pos.getX() - 10, playerIn.pos.getY() - 10, playerIn.pos.getZ() - 10, playerIn.pos.getX() + 10, playerIn.pos.getY() + 10, playerIn.pos.getZ() + 10)
  8. Sigh. Why do people subvert the proxy system by putting client side code in a common location that's only called from the client proxy? That common location still needs to contain valid code as far as the server is concerned, which references to non-existent classes is not.
  9. Override getUpdatePacket and getUpdateTag() getUpdatePacket will return a new package with the contents returned from getUpdateTag, where you write all the TE's information in it. You can get away with just using the same nbt that's saved to disk, as long as there isn't a ton of data the client doesn't need.
  10. That depends: Does the client ever need to know this information?
  11. JSON is not OBJ so don't call it a "JSON OBJ model." It's a JSON model. You have also posted literally no code.
  12. Hash-tag: no one is surprised.
  13. Its because you set your item's registry name as "Hoja" with a capital (go look at your code).
  14. make sure your file and folder names are in all lower case.
  15. Item Variants. Duh. Did you really think that all 16 wool colors had the same unlocalized name? No, they don't. Also, setUnlocalizedName will not throw an error if an unlocalized name has already been set. setRegistryName absolutely will.
  16. Step 1: Hold the data in your own, native data structure during runtime Step 2: When the chunk saves, loads, or unloads do the appropriate thing with that data to save it into the chunk's nbt. https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/flowers/util/OreDataHooks.java https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/flowers/FlowerEventHandler.java#L71-L97
  17. The ID value is yours, it will never clash with another mod's. Just make it a fixed value, there's no reason for it to be random.
  18. If you're replacing an item in the hotbar (the currently active item) you should be able to figure out which slot is currently active. Even if not you can loop over the hotbar and compare item stack instances directly (one will return true for stack == otherStack )
  19. From what I understand it has to be called in Init, but before some things and after others and was just prone to problems that if not properly dealt with would cause issues. You might have code that works fine in 1.8, but you should update to using ModelLoader.setCustomModelResourceLocation on newer version of MC anyway.
  20. You need to look at the item's metadata and convert from meta to state.
  21. Yes, because using the ModelMesher directly has issues. Which is why the ModelLoader method exists.
  22. You can just replace the itemstack in the player's inventory.
  23. You should rename that to "lib" or "library."

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.