mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-26 23:13:07 +00:00
Merge branch 'master' into weaponry
Conflicts: src/main/java/tconstruct/tools/TinkerTools.java
This commit is contained in:
commit
65ce5f23c2
11 files changed
+163
-67
No files matched your search
@@ -78,7 +78,14 @@ public class DynamicToolPart extends CraftingItem implements IToolPart
|
||||
// general name
|
||||
else
|
||||
{
|
||||
return StatCollector.translateToLocal("toolpart." + partName).replaceAll("%%material", toolmat.prefixName());
|
||||
// specific material name for materials?
|
||||
String matName;
|
||||
if(StatCollector.canTranslate("toolpart.material." + material))
|
||||
matName = StatCollector.translateToLocal("toolpart.material." + material);
|
||||
else
|
||||
matName = toolmat.prefixName();
|
||||
|
||||
return StatCollector.translateToLocal("toolpart." + partName).replaceAll("%%material", matName);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -98,8 +105,11 @@ public class DynamicToolPart extends CraftingItem implements IToolPart
|
||||
return;
|
||||
|
||||
// material id == metadata
|
||||
for(Integer matID : TConstructRegistry.toolMaterials.keySet())
|
||||
list.add(new ItemStack(item, 1, matID));
|
||||
for(Integer matID : TConstructRegistry.defaultToolPartMaterials) {
|
||||
ItemStack stack = new ItemStack(item, 1, matID);
|
||||
if (this.getMaterialID(stack) != -1)
|
||||
list.add(stack);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -258,6 +258,10 @@ public abstract class HarvestTool extends ToolCore
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// callback to the tool the player uses. Called on both sides. This damages the tool n stuff.
|
||||
player.getCurrentEquippedItem().func_150999_a(world, block, x, y, z, player);
|
||||
|
||||
// server sided handling
|
||||
if (!world.isRemote) {
|
||||
// serverside we reproduce ItemInWorldManager.tryHarvestBlock
|
||||
|
||||
Reference in new issue
Block a user