Skip to content
This repository has been archived by the owner on Nov 5, 2024. It is now read-only.

Commit

Permalink
updated antimatter
Browse files Browse the repository at this point in the history
  • Loading branch information
Trinsdar committed Aug 12, 2023
1 parent dbc9168 commit ca2b054
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions common/src/main/java/muramasa/gregtech/data/ToolTypes.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public ItemStack build(CraftingContainer inv, MaterialRecipe.Result mats) {
Material m = (Material) mats.mats.get("secondary");
Tuple<Long, Long> battery = (Tuple<Long, Long>) mats.mats.get("battery");
String domain = Ref.ID;
IAntimatterTool type = AntimatterAPI.get(IAntimatterTool.class, id.replace('-', '_'), domain);
IAntimatterTool type = AntimatterAPI.get(IAntimatterTool.class, id.replace('-', '_'));
return type.resolveStack((Material) mats.mats.get("primary"), m == null ? NULL : m, battery.getA(), battery.getB());
}

Expand All @@ -58,7 +58,7 @@ public Map<String, Object> getFromResult(@Nonnull ItemStack stack) {
@Override
public ItemStack build(CraftingContainer inv, MaterialRecipe.Result mats) {
Tuple<Long, Tuple<Long, Material>> t = (Tuple<Long, Tuple<Long, Material>>) mats.mats.get("secondary");
IAntimatterTool type = AntimatterAPI.get(IAntimatterTool.class, id.replace('-', '_'), Ref.ID);
IAntimatterTool type = AntimatterAPI.get(IAntimatterTool.class, id.replace('-', '_'));
t.getB().getB();
return type.resolveStack((Material) mats.mats.get("primary"), t.getB().getB(), t.getA(), t.getB().getA());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ public static void loadRecipes(Consumer<FinishedRecipe> output, AntimatterRecipe
});
CriterionTriggerInstance in = provider.hasSafeItem(AntimatterDefaultTools.SCREWDRIVER.getTag());

IAntimatterTool drill_lv = AntimatterAPI.get(IAntimatterTool.class, "drill_lv", Ref.ID);
IAntimatterTool drill_mv = AntimatterAPI.get(IAntimatterTool.class, "drill_mv", Ref.ID);
IAntimatterTool drill_hv = AntimatterAPI.get(IAntimatterTool.class, "drill_hv", Ref.ID);
IAntimatterTool drill_lv = AntimatterAPI.get(IAntimatterTool.class, "drill_lv");
IAntimatterTool drill_mv = AntimatterAPI.get(IAntimatterTool.class, "drill_mv");
IAntimatterTool drill_hv = AntimatterAPI.get(IAntimatterTool.class, "drill_hv");
provider.addToolRecipe(ToolTypes.POWERED_TOOL_BUILDER.get(AntimatterDefaultTools.DRILL.getId() + "-lv"),output, GTIRef.ID, AntimatterDefaultTools.DRILL.getId() + "_lv_" + "recipe", "antimatter_drills",
"has_screwdriver", in, Collections.singletonList(resolveStack(drill_lv, Material.NULL, Aluminium, 0, 100000)),
ImmutableMap.<Character, Object>builder()
Expand Down Expand Up @@ -108,9 +108,9 @@ public static void loadRecipes(Consumer<FinishedRecipe> output, AntimatterRecipe
"has_screwdriver", in, Collections.singletonList(resolveStack(drill_hv, Material.NULL, Titanium, 0, 100000)), of('B', PropertyIngredient.of(AntimatterMaterialTypes.DRILLBIT, "primary"), 'S', AntimatterDefaultTools.SCREWDRIVER.getTag(), 'P', PropertyIngredient.builder("secondary").itemTags(POWER_UNIT_HV).build()), "BS", "P ");


IAntimatterTool chainsaw_lv = AntimatterAPI.get(IAntimatterTool.class, "chainsaw_lv", Ref.ID);
IAntimatterTool chainsaw_mv = AntimatterAPI.get(IAntimatterTool.class, "chainsaw_mv", Ref.ID);
IAntimatterTool chainsaw_hv = AntimatterAPI.get(IAntimatterTool.class, "chainsaw_hv", Ref.ID);
IAntimatterTool chainsaw_lv = AntimatterAPI.get(IAntimatterTool.class, "chainsaw_lv");
IAntimatterTool chainsaw_mv = AntimatterAPI.get(IAntimatterTool.class, "chainsaw_mv");
IAntimatterTool chainsaw_hv = AntimatterAPI.get(IAntimatterTool.class, "chainsaw_hv");
provider.addToolRecipe(ToolTypes.POWERED_TOOL_BUILDER.get(AntimatterDefaultTools.CHAINSAW.getId() + "-lv"),output, GTIRef.ID, AntimatterDefaultTools.CHAINSAW.getId() + "_lv_" + "recipe", "antimatter_chainsaws",
"has_screwdriver", in, Collections.singletonList(resolveStack(chainsaw_lv, Material.NULL, Aluminium, 0, 100000)),
ImmutableMap.<Character, Object>builder()
Expand Down Expand Up @@ -148,9 +148,9 @@ public static void loadRecipes(Consumer<FinishedRecipe> output, AntimatterRecipe
provider.addToolRecipe(ToolTypes.UNIT_POWERED_TOOL_BUILDER.get(AntimatterDefaultTools.CHAINSAW.getId() + "-hv"),output, GTIRef.ID, AntimatterDefaultTools.CHAINSAW.getId() + "_hv_power_unit_" + "recipe", "antimatter_chainsaws",
"has_screwdriver", in, Collections.singletonList(resolveStack(chainsaw_hv, Material.NULL, Titanium, 0, 100000)), of('B', PropertyIngredient.of(AntimatterMaterialTypes.CHAINSAWBIT, "primary"), 'S', AntimatterDefaultTools.SCREWDRIVER.getTag(), 'P', PropertyIngredient.builder("secondary").itemTags(POWER_UNIT_HV).build()), "BS", "P ");

IAntimatterTool electric_wrench_lv = AntimatterAPI.get(IAntimatterTool.class, "electric_wrench_lv", Ref.ID);
IAntimatterTool electric_wrench_mv = AntimatterAPI.get(IAntimatterTool.class, "electric_wrench_mv", Ref.ID);
IAntimatterTool electric_wrench_hv = AntimatterAPI.get(IAntimatterTool.class, "electric_wrench_hv", Ref.ID);
IAntimatterTool electric_wrench_lv = AntimatterAPI.get(IAntimatterTool.class, "electric_wrench_lv");
IAntimatterTool electric_wrench_mv = AntimatterAPI.get(IAntimatterTool.class, "electric_wrench_mv");
IAntimatterTool electric_wrench_hv = AntimatterAPI.get(IAntimatterTool.class, "electric_wrench_hv");
provider.addToolRecipe(ToolTypes.POWERED_TOOL_BUILDER.get(AntimatterDefaultTools.ELECTRIC_WRENCH.getId() + "-lv"),output, GTIRef.ID, AntimatterDefaultTools.ELECTRIC_WRENCH.getId() + "_lv_" + "recipe", "antimatter_electric_wrenches",
"has_screwdriver", in, Collections.singletonList(resolveStack(electric_wrench_lv, Material.NULL, Aluminium, 0, 100000)),
ImmutableMap.<Character, Object>builder()
Expand Down Expand Up @@ -189,9 +189,9 @@ public static void loadRecipes(Consumer<FinishedRecipe> output, AntimatterRecipe
"has_screwdriver", in, Collections.singletonList(resolveStack(electric_wrench_hv, Material.NULL, Titanium, 0, 100000)), of('B', PropertyIngredient.of(AntimatterMaterialTypes.WRENCHBIT, "primary"), 'S', AntimatterDefaultTools.SCREWDRIVER.getTag(), 'P', PropertyIngredient.builder("secondary").itemTags(POWER_UNIT_HV).build()), "BS", "P ");


IAntimatterTool buzzsaw_lv = AntimatterAPI.get(IAntimatterTool.class, "buzzsaw_lv", Ref.ID);
IAntimatterTool buzzsaw_mv = AntimatterAPI.get(IAntimatterTool.class, "buzzsaw_mv", Ref.ID);
IAntimatterTool buzzsaw_hv = AntimatterAPI.get(IAntimatterTool.class, "buzzsaw_hv", Ref.ID);
IAntimatterTool buzzsaw_lv = AntimatterAPI.get(IAntimatterTool.class, "buzzsaw_lv");
IAntimatterTool buzzsaw_mv = AntimatterAPI.get(IAntimatterTool.class, "buzzsaw_mv");
IAntimatterTool buzzsaw_hv = AntimatterAPI.get(IAntimatterTool.class, "buzzsaw_hv");
provider.addToolRecipe(ToolTypes.POWERED_TOOL_BUILDER.get(AntimatterDefaultTools.BUZZSAW.getId() + "-lv"),output, GTIRef.ID, "", "antimatter_buzzsaws",
"has_screwdriver", in, Collections.singletonList(resolveStack(buzzsaw_lv, Material.NULL, Aluminium, 0, 100000)),
ImmutableMap.<Character, Object>builder()
Expand Down Expand Up @@ -229,7 +229,7 @@ public static void loadRecipes(Consumer<FinishedRecipe> output, AntimatterRecipe
provider.addToolRecipe(ToolTypes.UNIT_POWERED_TOOL_BUILDER.get(AntimatterDefaultTools.BUZZSAW.getId() + "-hv"),output, GTIRef.ID, AntimatterDefaultTools.BUZZSAW.getId() + "_hv_power_unit_" + "recipe", "antimatter_buzzsaws",
"has_screwdriver", in, Collections.singletonList(resolveStack(buzzsaw_hv, Material.NULL, Titanium, 0, 100000)), of('B', PropertyIngredient.of(BUZZSAW_BLADE, "primary"), 'S', AntimatterDefaultTools.SCREWDRIVER.getTag(), 'P', PropertyIngredient.builder("secondary").itemTags(POWER_UNIT_HV).build()), "PS", "B ");

IAntimatterTool electric_screwdriver_lv = AntimatterAPI.get(IAntimatterTool.class, "electric_screwdriver_lv", Ref.ID);
IAntimatterTool electric_screwdriver_lv = AntimatterAPI.get(IAntimatterTool.class, "electric_screwdriver_lv");

provider.addToolRecipe(ToolTypes.POWERED_TOOL_BUILDER.get(AntimatterDefaultTools.ELECTRIC_SCREWDRIVER.getId() + "-lv"), output, GTIRef.ID, "", "antimatter_electric_screwdrivers",
"has_material_" + Aluminium.getId(), provider.hasSafeItem(PLATE.getMaterialTag(Aluminium)), electric_screwdriver_lv.resolveStack(Material.NULL, Aluminium, 0, 100000),
Expand All @@ -244,7 +244,7 @@ public static void loadRecipes(Consumer<FinishedRecipe> output, AntimatterRecipe
provider.addToolRecipe(ToolTypes.UNIT_POWERED_TOOL_BUILDER.get(AntimatterDefaultTools.ELECTRIC_SCREWDRIVER.getId() + "-lv"), output, GTIRef.ID, AntimatterDefaultTools.ELECTRIC_SCREWDRIVER.getId() + "_power_unit_lv", "antimatter_electric_screwdrivers",
"has_material_" + Aluminium.getId(), provider.hasSafeItem(PLATE.getMaterialTag(Aluminium)), electric_screwdriver_lv.resolveStack(Material.NULL, Aluminium, 0, 100000), of('R', PropertyIngredient.builder("primary").types(ROD_LONG).tool(AntimatterDefaultTools.ELECTRIC_SCREWDRIVER, true).build(),'S', PropertyIngredient.builder("secondary").itemTags(POWER_UNIT_SMALL).build()), "R ", " S");

IAntimatterTool jackhammer_lv = AntimatterAPI.get(IAntimatterTool.class, "jackhammer_hv", Ref.ID);
IAntimatterTool jackhammer_lv = AntimatterAPI.get(IAntimatterTool.class, "jackhammer_hv");
provider.addToolRecipe(ToolTypes.POWERED_TOOL_BUILDER.get(AntimatterDefaultTools.JACKHAMMER.getId() + "-hv"), output, GTIRef.ID, "", "antimatter_jackhammers",
"has_battery_small", provider.hasSafeItem(BATTERIES_SMALL), jackhammer_lv.resolveStack(Material.NULL, Titanium, 0, 100000),
ImmutableMap.<Character, Object>builder()
Expand Down

0 comments on commit ca2b054

Please sign in to comment.