Skip 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.

Animefan8888

Forge Modder
  • Joined

  • Last visited

Everything posted by Animefan8888

  1. As far as I know they dont use the damage value directly they use NBT data to store a full sized integer and then create a fraction min/max and multiply that by the actual max damage. So say we have a tool that has a durability of 40,000. And it currently has 20,000 left. And the max damage the item can have is 100. So 20,000/40,000 is. 5 or 50%. Then we multiply .5 by 100 and get 50. So our damage value is 50, but our actual durability is 20,000.
  2. 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.
  3. In this case Constants makes more sense. Utils implies there would be a functional application of the class ie methods, but this class only contains Constants. Though this is ultimately a personal choice like putting an I in front of an interface. I am unsure of this value, due to minecraft truncating there metadata value to 2 bytes aka a Short.
  4. That is just the texture, the actual distortion is done in EntityRenderer#setupCameraTransform which just does some GL rotations and scales. Though you might be able to do this, though you should do it in GameOverlayEvent.Pre so it doesn't mess with the hotbar, etc. Also you may want to create your own thread because this is getting off topic and might be considered Thread Hijacking.
  5. It should take a look at GuiIngameForge line 139. It simply just renders the portal affect over the screen.
  6. Or he could do new Random().nextInt(max-min) + min + 1;
  7. Yes that is exactly how this works. Its called variable shadowing, you can read a bit on it here. Edit: Wait I read that wrong. No they do not you actually end up with two variables with the same name.
  8. Ahh I see, my bad I've never seen someone have two ModelRegistryEvents and separated them between Blocks and Items. Speaking of which, don't, you only need one. Your problem is that since you are calling the super method in your client proxy the item is being added to the common proxies items and not the client proxies. Don't have two instances, only have one Registry Event per type.
  9. You need to have a ModelRegistryEvent to register your models. Also take a look at Code Styles #1 and #3.
  10. Everything below 1.8.9 is not supported on this forum. Update if you want to receive assistance. This thread will later be locked by a forum moderator.
  11. No, this is not how a Container works. A Container is essentially a server side GUI that just simply holds the information, such as ItemStacks so that the Client can't cheat. You should be using GuiContainer and Container for this.
  12. This means that the it can't find the file at the path provided. Is there a file called fish_bowl.json at assets/fishoverload/models/item/?
  13. Well if I am not mistaken you could remove the recipe add your recipe and then add the old recipe back and that might fix your problem. This would be because it would find your recipe first in the for loop.
  14. Stop making more topics about the same problem. Be patient. @diesieben07 Could you delete this thread for the sake of organization, H_SerhatY as made three threads on the same topic.
  15. The first one should still be the same, however for creating crafting recipes that already have enchantments you should create a custom implementation of IRecipeFactory and handle the json data accordingly.
  16. You want to draw on the screen directly/an overlay. Use RenderGameOverlayEvent.Post
  17. Could you post all of your code please, preferably on github.
  18. There is a damage validation of sorts it simply doesnt allow damage less than 0. You should call setHealth or heal whichever exists.
  19. My bad sent this as I received your message.
  20. Force them to use a Block or Ite instance then you can limit that by making methods that add them, but only take a Block or an Item. Hence why I said And make the constructor of the OreDictManager be protected so only classes extending it or in the same package can access instances of it.
  21. I dont see why this is a problem actually, are you the only one using this code? If so then you should know that the only two types it can accept are Blocks and Items. Ultimately you could make two classes that extend your OreDictManager that explicitly uses Item and Block respectively and possibly make your OreDictManager abstract unless there won't be a difference between the two functionally.
  22. You should use the Animation System, I have a tutorial about this on this forum it is here. It explains how to use it, hopefully decently well. If you have any questions ask.

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

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.