Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

IFuelHandler deprecated??


reapersremorse
 Share

Recommended Posts

2 minutes ago, reapersremorse said:

if this is true, how do other mods use this number as their max in, like ee3/projecte and any mod that add energy storage??

sorry?

Mojang decided that they wanted shorts for their damage values. not all integers are shorts. if your looking for the highest possible value for an integer it is Integer.MAX_VALUE

 

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Link to comment
Share on other sites

1 minute ago, reapersremorse said:

if this is true, how do other mods use this number as their max in, like ee3/projecte and any mod that add energy storage??

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.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

2 minutes ago, reapersremorse said:

lol why would minecraft do that, it limits them in many ways.

Packets and network data, as well as saving to disk, and the pure fact that they dont need anything higher than the durability of a diamond pickaxe.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

Just now, reapersremorse said:

lol why would minecraft do that, it limits them in many ways.

Storage space & bandwidth for one, NBT is a massive storage hole compared with how small/optimised (not really) Minecraft's other data storage formats are.

Honestly any attempts to optimise anything in Minecraft is pretty much a lost cause, but using shorts instead of integers does cut the size of all the data in half. They couldn't use bytes because they already have durabilities greater than 256. (Bytes are have 256 possible values and are stored in 1 byte, Shorts have 65536 possible values are stored in 2 bytes, Integers have 4294967296 possible values and are stored in 4 bytes)

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Link to comment
Share on other sites

3 minutes ago, Animefan8888 said:

Packets and network data, as well as saving to disk, and the pure fact that they dont need anything higher than the durability of a diamond pickaxe.

Sorry, I keep posting basically the same thing as you, slightly later.

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Link to comment
Share on other sites

2 minutes ago, Cadiboo said:

Sorry, I keep posting basically the same thing as you, slightly later.

It's ok, I have done it to.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

i didnt realize that, networking is currently beyond me. funny though, i have a cheaty set of items that are uncraftable. and this is the material i use
and i get no errors or problems with it

 

public static final Item.ToolMaterial MATERIAL_BASE = EnumHelper.addToolMaterial
        (
                "material_base", 
                2147483647, 
                -1, 
                2147483647.0f,
                2147483647.0f, 
                2147483647
        );
Link to comment
Share on other sites

Just now, reapersremorse said:

i didnt realize that, networking is currently beyond me. funny though, i have a cheaty set of items that are uncraftable. and this is the material i use
and i get no errors or problems with it

 


public static final Item.ToolMaterial MATERIAL_BASE = EnumHelper.addToolMaterial
        (
                "material_base", 
                2147483647, 
                -1, 
                2147483647.0f,
                2147483647.0f, 
                2147483647
        );

It compiling doesn't mean it will work in game or when saving/sending packets or when loading from a save/recieving packets.

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Link to comment
Share on other sites

1 minute ago, reapersremorse said:

no, it runs, all values are set to max int or infinate

That screenshot is of armor and neither of those are the item damage amount.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

3 minutes ago, reapersremorse said:

this kind of damage or did you mean attack damage

2018-08-08_06_38_27.png.39e4f01a813da23520d2d884e35fae8a.png

Save and reload the world, I’m interested what’s going to happen

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Link to comment
Share on other sites

1 minute ago, reapersremorse said:

if you have discord, i can screenshare with ya

 

My Discord’s in my signature, but I’m not at my computer rn, feel free to contact me though

Edited by Cadiboo

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Link to comment
Share on other sites

Just now, reapersremorse said:

ahh i do not have your 4 digit tag so i cant add you. mine is also my gamertag reapersremorse#1596
ill go ahead and reload and send you another pic
//before pic

2018-08-08_06_50_40.thumb.png.70624b5c087edb8c9eb0f6598757f761.png

after i shear the tree of all leaves

2018-08-08_06_50_15.thumb.png.b3796fe0941072bc62a8d9af807e8432.png

Cadiboo#8887

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Link to comment
Share on other sites

@reapersremorse The items damage is actually how much damage the item has taken I believe that when you save and load the world after having the item take 32768 it will either reset to full durability or to having taken 32768 damage. And also if the items damage is ever over 65535 the ItemStack will be considered empty and would then no longer really exist.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

35 minutes ago, reapersremorse said:

?ill test it

I have tested it, it goes back to full on reload, and disappears after taking Short.MAX_VALUE * 2 + 2 or 65535.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

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
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share




×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.