Skip to content
This repository has been archived by the owner on Mar 10, 2021. It is now read-only.

Commit

Permalink
Update to Tcon build 622 with api changes
Browse files Browse the repository at this point in the history
  • Loading branch information
bonii-xx committed Sep 4, 2014
1 parent ae47077 commit 72f7b53
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion build.properties
Expand Up @@ -2,4 +2,4 @@ mod_version=2.0.2
minecraft_version=1.7.10
forge_version=10.13.0.1208
mantle_version=0.3.1.jenkins180
tconstruct_version=1.6.0.build611
tconstruct_version=1.6.0.build622
Expand Up @@ -197,7 +197,7 @@ private static void updateMaterial(int harvestLevel, String matName, int newDura
int durability = Math.round(newDurability * durabilityMod);
int speed = Math.round(newSpeed * speedMod);
// round everything
ToolMaterial newMaterial = new ToolMaterial(old.materialName, old.displayName, harvestLevel, durability, speed, newAttack, newHandleModifier, old.reinforced, old.stonebound, old.tipStyle, old.ability);
ToolMaterial newMaterial = new ToolMaterial(old.materialName, harvestLevel, durability, speed, newAttack, newHandleModifier, old.reinforced, old.stonebound, old.tipStyle);

// replace old material
Integer id = getMaterialID(old);
Expand Down
Expand Up @@ -86,7 +86,7 @@ else if (mob instanceof EntityEnderman) {
skullId = IguanaSkull.META_ENDERMAN;

// sometimes, very very rarely, you'll only get the jaw :D
if(IguanaTweaksTConstruct.random.nextInt(2) == 0)
if(IguanaTweaksTConstruct.random.nextInt(1000) == 0)
{
skullItem = IguanaMobHeads.wearables;
skullId = 2;
Expand Down
Expand Up @@ -105,7 +105,7 @@ private ToolMaterial processMaterial(String category, ToolMaterial mat, Configur
tipStyle = mat.style();

// reconstruct the material
return new ToolMaterial(mat.materialName, harvestLevel, durability, miningspeed, attack, handleModifier, reinforced, stonebound, tipStyle, mat.ability());
return new ToolMaterial(mat.materialName, harvestLevel, durability, miningspeed, attack, handleModifier, reinforced, stonebound, tipStyle);
}

private EnumChatFormatting stringToEnum(String s)
Expand Down
Expand Up @@ -18,6 +18,7 @@
import tconstruct.library.tools.ToolMaterial;
import tconstruct.modifiers.tools.ModAttack;
import tconstruct.modifiers.tools.ModRedstone;
import tconstruct.tools.logic.ToolStationLogic;

import static iguanaman.iguanatweakstconstruct.replacing.ReplacementLogic.PartTypes.*;

Expand Down Expand Up @@ -195,11 +196,10 @@ public static void exchangeToolPart(ToolCore tool, NBTTagCompound tags, PartType

// Update the tool name if we replaced the head and it was a automagic name
if(type == HEAD) {
String materialName = TConstructRegistry.getMaterial(oldMaterialId).displayName;
String toolName = tool.getToolName();
if (toolStack.getDisplayName().endsWith(materialName + toolName)) {
materialName = TConstructRegistry.getMaterial(partMaterialId).displayName;
toolStack.setStackDisplayName("\u00a7r" + materialName + toolName);
String defaultName = ToolBuilder.defaultToolName(TConstructRegistry.getMaterial(oldMaterialId), tool);
if (toolStack.getDisplayName().endsWith(defaultName)) {
defaultName = ToolBuilder.defaultToolName(TConstructRegistry.getMaterial(partMaterialId), tool);
toolStack.setStackDisplayName("\u00a7r" + defaultName);
}
}
}
Expand Down Expand Up @@ -228,6 +228,7 @@ private static void handleMaterialTraits(NBTTagCompound tags, int oldMaterialId,
// stonebound/jagged has to be handeled separately, see exchangeToolPart

/************ first add the new traits *************/
// todo: rewrite this to use material IDs.
String ability = newMat.ability();
// writeable & thaumic (equal since we only exchange 1 part)
if(ability.equals(StatCollector.translateToLocal("materialtraits.writable")) ||
Expand Down

0 comments on commit 72f7b53

Please sign in to comment.