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.

Leaderboard

Popular Content

Showing content with the highest reputation on 08/08/18 in all areas

  1. That's called a static class Interfaces are not storage places for data. They're description templates that get implemented: they tell you what another object looks like without actually being the object.
  2. @H_SerhatY What I suggested may be something you currently don't understand, but it isn't hard to learn. And once you do it you can reapply it later. First in your Items class in the constructor call setHasSubtypes(true) this allows getSubItems to be called in your Items Class Which is the next this to do. So Override getSubItems(CreativeTab NonNullList<ItemStack) and create a new ItemStack of your Item and call addEnchantment(Enchantment, int) on the ItemStack that you created. Finally check if the first parameter is the CreativeTab you wish to add it to, then add your ItemStack to the second parameter. This is the more complicated part, but still not that complicated. You need a new class that implements IRecipeFactory. This will provide you one method. This wants you to return an IRecipe and gives you a JsonContext and a JsonObject. These parameters come from a json file, which is the new way to add recipes to the game. This means you can create your own custom format for a recipe. For further understanding on how to read the data from the JsonObject search for tutorials on GSon, though it is relatively similar to nbt. Once you have your custom format which can derive from the already existing formats, you can create a new ShapedRecipe or a new ShapelessRecipe and that will be what you return in the method, but you will need to create a new ItemStack and add the Enchantment the same way you did earlier, and then pass it into the new ShapedRecipe or new ShapelessRecipe as the result.
  3. At the moment I mainly use tabula, but I see what you mean. Maybe I'll give it a try later.
  4. This, it won't look anything like the Vanilla Shield's json except maybe the translations and rotations. Or you could try to give your item a custom TileEntityItemStackRenderer by calling setTileEntityItemStackRenderer in your items constructor.
  5. oh my, i would have messed up some stuff if you did not tell me that...
  6. He was saying that the actual max value is smaller because the data is not an integer, its a short. Integer (signed) is between -(2^31) and (2^31)-1 Short (signed) is between -(2^15) and (2^15)-1 http://www.tocker.ca/2014/05/30/how-important-is-it-to-use-2-byte-and-3-byte-integers.html
  7. My bad, I didn't see that small but of text at the very bottom of his post and didn't read the quote. In which case yes a class called Utils or two classes Utils and Constants would be fine.
  8. 1 point
    It should take a look at GuiIngameForge line 139. It simply just renders the portal affect over the screen.
  9. Or he could do new Random().nextInt(max-min) + min + 1;
  10. Just do min_durability + ((max_durability - min_durability) * new Random.nextFloat(1)) This generates a random durability greater than or equal to min_durability and less than or equal to max_durability
  11. 100% wait. The fundamentals of the Minecraft codebase have changed quite a bit; as such, the Forge layer on top of it will need to change drastically. I'm almost certain that even those of us who have been using Forge for awhile will have to "re-learn" the 1.13 structure, as it were. So you may as well wait until then to start learning so you don't have to start all over

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.