mirror of
https://github.com/GTNewHorizons/IguanaTweaksTConstruct.git
synced 2026-11-25 22:34:38 +00:00
Fix Bolts turning into Wooden ones when updating incorrect bolts #62
This commit is contained in:
1 parent
563c10c4a8
commit
3271fefef4
1 file changed
+6
@@ -14,8 +14,10 @@ import tconstruct.items.tools.Arrow;
|
||||
import tconstruct.items.tools.Hammer;
|
||||
import tconstruct.items.tools.Pickaxe;
|
||||
import tconstruct.library.TConstructRegistry;
|
||||
import tconstruct.library.tools.DualMaterialToolPart;
|
||||
import tconstruct.library.tools.ToolCore;
|
||||
import tconstruct.util.config.PHConstruct;
|
||||
import tconstruct.weaponry.ammo.BoltAmmo;
|
||||
|
||||
public class OldToolConversionHandler {
|
||||
// todo: re-enable when this stuff is 100% reliable >_<
|
||||
@@ -100,6 +102,10 @@ public class OldToolConversionHandler {
|
||||
// recreate the head itemstack
|
||||
ItemStack newHead = new ItemStack(tool.getHeadItem(), 1, tags.getInteger("Head"));
|
||||
|
||||
// bolts are special..
|
||||
if(tool instanceof BoltAmmo)
|
||||
newHead = DualMaterialToolPart.createDualMaterial(tool.getHeadItem(), tags.getInteger("Handle"), tags.getInteger("Head"));
|
||||
|
||||
// and replace. We can always do this, since it shouldn't have any unwanted side effects if we disable the reduction
|
||||
int oldXpPenality = Config.partReplacementXpPenality;
|
||||
int oldBoostXpPenality = Config.partReplacementBoostXpPenality;
|
||||
|
||||
Reference in new issue
Block a user