sor1n / Jewelrycraft

Minecraft mod
8 stars 4 forks source link

Smeltery keeping track of molten liquid in a weird way. #9

Closed Darkhax closed 9 years ago

Darkhax commented 9 years ago

I was doing some tests while adding support for Wawla, and I noticed that the smelter keeps tracks of the liquid metals in a weird way that can cause some potential issues.

From what I can tell, the smelter keeps track of the value in two locations, the first is in the moltenMetal tag compound, under the Count tag as an Integer. While this integer reflects the proper amount of ingots stored, it seems to get set to 1 when the smelter pours some liquid out. And then set to 0 again when there is none left.

The second place that this is stored is in the quantity tag. The quantity tag stores the ore amount as a float which makes it less accurate when used in calculations. I am not sure if this is by design, or due to an accuracy issue, however it seems that 10% of an ingot is lost every time the player pours something into a mold. This means that if the player were to melt 11 ingots, and pour 10 things, one of those ingots would completely vanish. Furthermore, it seems a piece of jewelry can be poured with less than one ingot stored in the smelter. So if the player has 0.1 ingots they will be able to pour as if they had a full one.

Hopefully this will help you with something :)

sor1n commented 9 years ago

Hah, weird. So is this in Jewelrycraft 1 or 2? Because this is definitely a problem and I'll look into fixing it soon. Also, people should never be able to smelt 11 ingots, only 9 at most :p

Darkhax commented 9 years ago

Right, people should only be able to do 9 at a time, however you can pour one ingot out, and then add another one in. This is for Jewelrycraft 1, although I thought I was working with Jewelrycraft 2, didn't realize you had two curse forge pages. I will test out 2 in a bit.

sor1n commented 9 years ago

Yeah, things should be different for Jewelrycraft 2, because I reworked the system a bit, so if this is just for Jewelrycraft 1 I will close the issue, because I don't plan on continuing updating that :)

sor1n commented 9 years ago

I will assume this only happens with Jewelrycraft 1, so I will close this issue.