Cazadorsniper / Furnace-Overhaul

Better Furnaces
2 stars 7 forks source link

Duping issue with ore processing upgrade #4

Closed logam555 closed 6 years ago

logam555 commented 6 years ago

All items smelted, not just ores, get doubled when smelted with this upgrade. In vanilla, I can't think of a dupe-able item. But incorporate any other mod and pretty much everything becomes dupe-able. For example, any mod that has a pulverizer and pulverizes iron, gold, diamonds, etc. then smelt the dust for double 2 of what you had before where you would have only gotten 1 back, this can go into an infinite loop of duping.

The easiest way to fix this would probably be doubling only items that are naturally spawning or have 'ore' in the name since it is an 'ore processing upgrade'.

Cazadorsniper commented 6 years ago

Sadly, I have no idea how to do that therefore it doubles everything.

kriNon commented 6 years ago

Hey Cazador, So I've downloaded your code and made some small changes to fix this problem. I have no idea how to use git, so I'm just going to send you all the changed class files (do with them what you will, I give you full rights to the code I wrote). I implemented the same system that the draconic evolution chest uses for duplicating ores. The logic for determining if an ore can be duplicated is in OreDoublingRegistry.java. Tweaks can be made in this class if you would like to.

I've also noticed that when using the doubling upgrade, the first item to be smelted will not get doubled. As such I suggest that you look over the iron furnace logic. I was going to attempt to fix it but it's very late where I live and I'm going to go to sleep.

Here you go: src.zip

Cazadorsniper commented 6 years ago

Thanks but I fixed the first item not doubling thing. I just haven't updated the github because i broke the sync. lol

kriNon commented 6 years ago

If you update the github I'm happy to redo my changes so that there isn't a dupe exploit with the ore doubling upgrade.

Cazadorsniper commented 6 years ago

updated it.

kriNon commented 6 years ago

If you have a look at the #5 I've fixed the duplication issue by implementing the same system that draconic evolution uses for ore duplication in its draconic chest. This use of the draconic evolution code is acceptable under their "Don't Be a Jerk" License. If you want to tweak it the duplication, take a look at the OreDoublingRegistry in the utils folder.