Fix GT tools with duplicates in TFC cannot set on the tool racks
Fix GT tools with duplicates in TFC cannot set on the tool racks. Since original program will throw ReferenceError. Tested on TFG 0.7.2 with TFC & GTM manually updated to newest version. However, tools appear only in GTM still cannot put on the tool racks. Need further investigation.
This commit is contained in:
@@ -30,7 +30,7 @@ global.GTCEU_TOOLTYPES_WHICH_HAS_TFC_DUPS = {
|
||||
"tfc:axes" : GTToolType.AXE,
|
||||
"tfc:shovels" : GTToolType.SHOVEL,
|
||||
"tfc:hoes" : GTToolType.HOE,
|
||||
"tfc:hammers" : GTToolType.MINING_HAMMER,
|
||||
"tfc:hammers" : GTToolType.HARD_HAMMER,
|
||||
"tfc:knives" : GTToolType.KNIFE,
|
||||
"tfc:saws" : GTToolType.SAW,
|
||||
"tfc:scythes" : GTToolType.SCYTHE
|
||||
|
||||
@@ -6,7 +6,7 @@ const registerTFCItemTags = (event) => {
|
||||
GTMaterialRegistry.getRegisteredMaterials().forEach(material => {
|
||||
if (material.hasProperty(PropertyKey.TOOL)) {
|
||||
for (let [key, value] of Object.entries(global.GTCEU_TOOLTYPES_WHICH_HAS_TFC_DUPS)) {
|
||||
var tool = ToolHelper.get(value, material)
|
||||
var tool = $ToolHelper.get(value, material)
|
||||
if (!tool.isEmpty()) event.add(key, tool.getId())
|
||||
|
||||
event.add('tfc:usable_on_tool_rack', `#${key}`)
|
||||
|
||||
Reference in New Issue
Block a user