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.

Featured Replies

Posted

Good day,

I am working on a battery item for my mod and it uses data values for the amounts of energy it is currently holding, but the biggest problem comes when I put 2 batteries into the anvil. The damage value adds the second damage value and plus bit more.

Example:

If I put a battery with 1200 energy into the first slot and into the second slot the same battery with the same amount of energy, the outcome isn't 2400 as I would expect, but it is 3600. That means that it "generated" additional power.

Is there a way to make it, so the outcome is 2400 or even better to completely disable the anvil recipe?

Use NBT data instead of damage values.ย  The anvil works in a very specific way where two items of the same ID will repair each other in this fashion.ย  Just so you know, it isn't free.ย  It does cost the player some experience.

ย 

(And the majority of the bonus is actually from crafting two damaged items together: 10%ย  Using an anvil and an experience level upgrades that to a whopping 12%)

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.ย  If you think this is the case, JUST REPORT ME.ย  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

ย 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

ย 

DO NOT PM ME WITH PROBLEMS. No help will be given.

You'll probably have to write a custom item renderer to get the "damage bar" back, though.

ย 

On the other hand, simply HAVING nbt data might disqualify the item from being repaired.....and now that I've said that....

ย 

On moment.

ย 

Ah, there's also setNoRepair();

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.ย  If you think this is the case, JUST REPORT ME.ย  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

ย 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

ย 

DO NOT PM ME WITH PROBLEMS. No help will be given.

  • Author

setNoRepair(); is for the 2 tools in crafting table repair.

I've also tried getIsRepairable(ItemStack i1, ItemStack i2), but that doesn't seem to work.

Darn.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.ย  If you think this is the case, JUST REPORT ME.ย  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

ย 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

ย 

DO NOT PM ME WITH PROBLEMS. No help will be given.

  • Author

Is there a way to "extend" tile entities that are already in the game? For example the anvil tile entity.

Sure you can.ย  Doing it won't replace the vanilla version though.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.ย  If you think this is the case, JUST REPORT ME.ย  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

ย 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

ย 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

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.