diff --git a/src/generated/resources/assets/rankine/blockstates/battery_charger.json b/src/generated/resources/assets/rankine/blockstates/battery_charger.json new file mode 100644 index 0000000000..af2ae85b88 --- /dev/null +++ b/src/generated/resources/assets/rankine/blockstates/battery_charger.json @@ -0,0 +1,30 @@ +{ + "variants": { + "facing=down": { + "model": "rankine:block/battery_charger", + "x": 180 + }, + "facing=up": { + "model": "rankine:block/battery_charger" + }, + "facing=north": { + "model": "rankine:block/battery_charger", + "x": 90 + }, + "facing=south": { + "model": "rankine:block/battery_charger", + "x": 90, + "y": 180 + }, + "facing=west": { + "model": "rankine:block/battery_charger", + "x": 90, + "y": 270 + }, + "facing=east": { + "model": "rankine:block/battery_charger", + "x": 90, + "y": 90 + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/rankine/blockstates/neptunium_alloy_bars.json b/src/generated/resources/assets/rankine/blockstates/neptunium_alloy_bars.json new file mode 100644 index 0000000000..f5f57bc3d7 --- /dev/null +++ b/src/generated/resources/assets/rankine/blockstates/neptunium_alloy_bars.json @@ -0,0 +1,100 @@ +{ + "multipart": [ + { + "apply": { + "model": "rankine:block/neptunium_alloy_bars_post_ends" + } + }, + { + "when": { + "north": "false", + "east": "false", + "west": "false", + "south": "false" + }, + "apply": { + "model": "rankine:block/neptunium_alloy_bars_post" + } + }, + { + "when": { + "north": "true", + "east": "false", + "west": "false", + "south": "false" + }, + "apply": { + "model": "rankine:block/neptunium_alloy_bars_cap" + } + }, + { + "when": { + "north": "false", + "east": "true", + "west": "false", + "south": "false" + }, + "apply": { + "model": "rankine:block/neptunium_alloy_bars_cap", + "y": 90 + } + }, + { + "when": { + "north": "false", + "east": "false", + "west": "false", + "south": "true" + }, + "apply": { + "model": "rankine:block/neptunium_alloy_bars_cap_alt" + } + }, + { + "when": { + "north": "false", + "east": "false", + "west": "true", + "south": "false" + }, + "apply": { + "model": "rankine:block/neptunium_alloy_bars_cap_alt", + "y": 90 + } + }, + { + "when": { + "north": "true" + }, + "apply": { + "model": "rankine:block/neptunium_alloy_bars_side" + } + }, + { + "when": { + "south": "true" + }, + "apply": { + "model": "rankine:block/neptunium_alloy_bars_side_alt" + } + }, + { + "when": { + "west": "true" + }, + "apply": { + "model": "rankine:block/neptunium_alloy_bars_side_alt", + "y": 90 + } + }, + { + "when": { + "east": "true" + }, + "apply": { + "model": "rankine:block/neptunium_alloy_bars_side", + "y": 90 + } + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/assets/rankine/blockstates/neptunium_alloy_block.json b/src/generated/resources/assets/rankine/blockstates/neptunium_alloy_block.json new file mode 100644 index 0000000000..f5998d3efc --- /dev/null +++ b/src/generated/resources/assets/rankine/blockstates/neptunium_alloy_block.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "rankine:block/neptunium_alloy_block" + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/rankine/blockstates/neptunium_alloy_pedestal.json b/src/generated/resources/assets/rankine/blockstates/neptunium_alloy_pedestal.json new file mode 100644 index 0000000000..c6d50c2a61 --- /dev/null +++ b/src/generated/resources/assets/rankine/blockstates/neptunium_alloy_pedestal.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "rankine:block/neptunium_alloy_pedestal" + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/rankine/blockstates/neptunium_alloy_pole.json b/src/generated/resources/assets/rankine/blockstates/neptunium_alloy_pole.json new file mode 100644 index 0000000000..04fa411f85 --- /dev/null +++ b/src/generated/resources/assets/rankine/blockstates/neptunium_alloy_pole.json @@ -0,0 +1,28 @@ +{ + "variants": { + "style=0": { + "model": "rankine:block/neptunium_alloy_pole0" + }, + "style=1": { + "model": "rankine:block/neptunium_alloy_pole1" + }, + "style=2": { + "model": "rankine:block/neptunium_alloy_pole2" + }, + "style=3": { + "model": "rankine:block/neptunium_alloy_pole3" + }, + "style=4": { + "model": "rankine:block/neptunium_alloy_pole4" + }, + "style=5": { + "model": "rankine:block/neptunium_alloy_pole5" + }, + "style=6": { + "model": "rankine:block/neptunium_alloy_pole6" + }, + "style=7": { + "model": "rankine:block/neptunium_alloy_pole7" + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/rankine/blockstates/neptunium_alloy_sheetmetal.json b/src/generated/resources/assets/rankine/blockstates/neptunium_alloy_sheetmetal.json new file mode 100644 index 0000000000..8667357ef0 --- /dev/null +++ b/src/generated/resources/assets/rankine/blockstates/neptunium_alloy_sheetmetal.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "rankine:block/neptunium_alloy_sheetmetal" + } + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/rankine/lang/en_us.json b/src/generated/resources/assets/rankine/lang/en_us.json index 9c188645cb..2c025cb1be 100644 --- a/src/generated/resources/assets/rankine/lang/en_us.json +++ b/src/generated/resources/assets/rankine/lang/en_us.json @@ -146,6 +146,7 @@ "block.rankine.basalt_bricks_stairs": "Basalt Bricks Stairs", "block.rankine.basalt_bricks_wall": "Basalt Bricks Wall", "block.rankine.basaltic_tuff": "Basaltic Tuff", + "block.rankine.battery_charger": "Battery Charger", "block.rankine.bauxite_block": "Block Of Bauxite", "block.rankine.bauxite_ore": "Bauxite Ore", "block.rankine.beehive_oven_pit": "Beehive Oven Pit", @@ -1742,6 +1743,11 @@ "block.rankine.nepheline_syenite_slab": "Nepheline Syenite Slab", "block.rankine.nepheline_syenite_stairs": "Nepheline Syenite Stairs", "block.rankine.nepheline_syenite_wall": "Nepheline Syenite Wall", + "block.rankine.neptunium_alloy_bars": "Neptunium Alloy Bars", + "block.rankine.neptunium_alloy_block": "Block of %1$s", + "block.rankine.neptunium_alloy_pedestal": "Neptunium Alloy Pedestal", + "block.rankine.neptunium_alloy_pole": "Neptunium Alloy Pole", + "block.rankine.neptunium_alloy_sheetmetal": "Neptunium Alloy Sheetmetal", "block.rankine.neptunium_block": "Block Of Neptunium", "block.rankine.nether_gold_ore": "Nether Gold Ore", "block.rankine.nether_quartz_ore": "Nether Quartz Ore", @@ -3199,7 +3205,6 @@ "item.rankine.alloy_rod_steel": "Steel Rod", "item.rankine.alloy_shovel": "%1$s Shovel", "item.rankine.alloy_spear": "%1$s Spear", - "item.rankine.alloy_surf_rod": "%1$s Surf Rod", "item.rankine.alloy_sword": "%1$s Sword", "item.rankine.alloy_template": "Alloy Template", "item.rankine.alloy_wire": "%1$s Wire", @@ -3555,6 +3560,8 @@ "item.rankine.gallium_nugget": "Gallium Nugget", "item.rankine.garland": "Garland", "item.rankine.garnet": "Garnet", + "item.rankine.gas_detector": "Gas Detector", + "item.rankine.gas_detector.message": "%1$s was detected at x:%2$s y:%3$s z:%4$s", "item.rankine.gas_mask": "Gas Mask", "item.rankine.germanium": "Germanium", "item.rankine.germanium_nugget": "Germanium Nugget", @@ -3720,6 +3727,9 @@ "item.rankine.neon_ingot": "Neon Ingot", "item.rankine.neon_nugget": "Neon Nugget", "item.rankine.nepheline": "Nepheline", + "item.rankine.neptunium_alloy_alloying": "Neptunium Alloy", + "item.rankine.neptunium_alloy_ingot": "%1$s Ingot", + "item.rankine.neptunium_alloy_nugget": "%1$s Nugget", "item.rankine.neptunium_ingot": "Neptunium Ingot", "item.rankine.neptunium_nugget": "Neptunium Nugget", "item.rankine.netherite_nugget": "Netherite Nugget", @@ -4106,6 +4116,8 @@ "item.rankine.totem_of_levitating": "Totem Of Levitating", "item.rankine.totem_of_levitating.tooltip": "For keeping your feet clean", "item.rankine.totem_of_mending.tooltip": "Regenerate your losses", + "item.rankine.totem_of_powering": "Totem Of Powering", + "item.rankine.totem_of_powering.tooltip": "The sea heart calls and infuses", "item.rankine.totem_of_promising": "Totem Of Promising", "item.rankine.totem_of_promising.tooltip": "Fortune is on your side", "item.rankine.totem_of_repulsing": "Totem Of Repulsing", @@ -4206,7 +4218,6 @@ "itemGroup.rankine_misc": "Project Rankine: Miscellaneous", "itemGroup.rankine_world": "Project Rankine Building", "jei.description.crushing_basic": "Can be obtained by crushing ores using a machine or a Bronze Hammer.", - "multiblocks.modonomicon.blockentity": "Blockentity Multiblock.", "rankine.advancements.challenges.alloy_collector.description": "Create all of the different types of alloys", "rankine.advancements.challenges.alloy_collector.title": "Worldmoulder", "rankine.advancements.challenges.bronze_harvest.description": "Make a Bronze Pickaxe with a Harvest Level of 3 (or Steel equivalent)", @@ -4361,12 +4372,15 @@ "rankine.advancements.story.treads.description": "Aquire boots with the four enchantments from feet equipment", "rankine.advancements.story.treads.title": "Don't Tread On Me", "rankine.alloys": "Alloys", + "rankine.battery.charge": "Charge: %1$s/%2$s", "rankine.jei.air_distillation": "Air Distillation", "rankine.jei.alloying": "Alloying", "rankine.jei.alloying_bonus_stats": "Bonus Stats", "rankine.jei.alloying_enchantments": "Bonus Enchantments", + "rankine.jei.battery": "Battery", "rankine.jei.beeoven": "Beehive Oven", "rankine.jei.crucible": "Crucible", + "rankine.jei.crucible_tooltip_additional": "Additional (Pick %s Unique Ingredients)", "rankine.jei.crushing": "Crushing", "rankine.jei.element": "Elements", "rankine.jei.evaporation": "Evaporation", @@ -4374,6 +4388,18 @@ "rankine.jei.foraging": "Foraging", "rankine.jei.fusion_furnace": "Fusion Furnace", "rankine.jei.induction_alloying": "Advanced Alloying", + "rankine.jei.info_amber": "Resin can be placed in a cauldron. If a heat source is placed adjacent to the cauldron, Resin is turned into Amber.", + "rankine.jei.info_battery_energy": "Total Charge: %1$s [?]", + "rankine.jei.info_battery_fusion": "%1$s Fusion Furnace processes", + "rankine.jei.info_battery_induction": "%1$s Induction Furnace processes", + "rankine.jei.info_battery_rechargeable": "Rechargeable", + "rankine.jei.info_battery_rtg": "Single-use", + "rankine.jei.info_dry_rubber": "Latex can be placed in a cauldron. If a heat source is placed adjacent to the cauldron, Latex is turned into Dry Rubber.", + "rankine.jei.info_juglone": "Can be placed in a cauldron. If a heat source is placed adjacent to the cauldron, the fluid is turned into Brown Dye.", + "rankine.jei.info_latex": "Can be placed in a cauldron. If a heat source is placed adjacent to the cauldron, the fluid is turned into Dry Rubber.", + "rankine.jei.info_maple_sap": "Can be placed in a cauldron. If a heat source is placed adjacent to the cauldron, the fluid is turned into Maple Syrup, which can be bottled out.", + "rankine.jei.info_resin": "Can be placed in a cauldron. If a heat source is placed adjacent to the cauldron, the fluid is turned into Amber.", + "rankine.jei.info_sap": "Can be placed in a cauldron. If a heat source is placed adjacent to the cauldron, the fluid is turned into Sugar.", "rankine.jei.intrusive_igneous": "Intrusive Igneous Rock Generator", "rankine.jei.metamorphic": "Metamorphic Rock Generator", "rankine.jei.mixing": "Mixing", @@ -4385,19 +4411,26 @@ "rankine.jei.tooltip_biomes_info": "Biomes: ", "rankine.jei.tooltip_biomes_tags_info": "Biome Tags: ", "rankine.jei.tooltip_chance": "Chance: ", + "rankine.jei.tooltip_dimension_info": "Dimension: ", "rankine.jei.tooltip_enchantability_interval": "Gains a level every %s enchantability", "rankine.jei.tooltip_enchantment_required": "Requires Foraging enchantment", "rankine.jei.tooltip_failure_chance": "Failure Chance: ", "rankine.jei.tooltip_guaranteed": "Guaranteed", - "rankine.jei.tooltip_limited": "Can obtain once", + "rankine.jei.tooltip_limited": "Can only drop once per block", + "rankine.jei.tooltip_material_info": "Material Count: ", "rankine.jei.tooltip_max_level": "Max Level: ", "rankine.jei.tooltip_max_rolls": "Max outputs: ", + "rankine.jei.tooltip_mixing_time": "Base Mixing Time: %s redstone power per ingredient total", "rankine.jei.tooltip_none": "None", - "rankine.jei.tooltip_nonlimited": "Can obtain multiple times", + "rankine.jei.tooltip_nonlimited": "Can drop multiple times per block", "rankine.jei.tooltip_nothing": "Skip Output", "rankine.jei.tooltip_required": "Required", "rankine.jei.tooltip_starting_enchantability": "Obtained at %s enchantability", "rankine.jei.tooltip_tier": "Tier: ", + "rankine.jei.tooltip_total_button_lever": "(%s button presses or lever flicks)", + "rankine.jei.tooltip_total_ingredients": "%s total ingredients", + "rankine.jei.tooltip_total_mixing_time": "Total Mixing Time: %s redstone power", + "rankine.jei.tooltip_total_output": "%s total output", "rankine.jei.treetapping": "Treetap", "rankine.jei.volcanic": "Volcanic Rock Generator", "rankine.journal.cat_biota.crops.aloe": "", diff --git a/src/generated/resources/assets/rankine/models/block/battery_charger.json b/src/generated/resources/assets/rankine/models/block/battery_charger.json new file mode 100644 index 0000000000..45fedd057d --- /dev/null +++ b/src/generated/resources/assets/rankine/models/block/battery_charger.json @@ -0,0 +1,8 @@ +{ + "parent": "minecraft:block/orientable", + "textures": { + "side": "rankine:block/battery_charger_side", + "front": "rankine:block/battery_charger_front", + "top": "rankine:block/battery_charger_top" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/rankine/models/block/neptunium_alloy_bars_cap.json b/src/generated/resources/assets/rankine/models/block/neptunium_alloy_bars_cap.json new file mode 100644 index 0000000000..a7f5cfa156 --- /dev/null +++ b/src/generated/resources/assets/rankine/models/block/neptunium_alloy_bars_cap.json @@ -0,0 +1,6 @@ +{ + "parent": "rankine:block/template_tinted_bars_cap", + "textures": { + "bars": "rankine:block/alloy_bars1" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/rankine/models/block/neptunium_alloy_bars_cap_alt.json b/src/generated/resources/assets/rankine/models/block/neptunium_alloy_bars_cap_alt.json new file mode 100644 index 0000000000..3f6907e89e --- /dev/null +++ b/src/generated/resources/assets/rankine/models/block/neptunium_alloy_bars_cap_alt.json @@ -0,0 +1,6 @@ +{ + "parent": "rankine:block/template_tinted_bars_cap_alt", + "textures": { + "bars": "rankine:block/alloy_bars1" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/rankine/models/block/neptunium_alloy_bars_post.json b/src/generated/resources/assets/rankine/models/block/neptunium_alloy_bars_post.json new file mode 100644 index 0000000000..9ddcab08ad --- /dev/null +++ b/src/generated/resources/assets/rankine/models/block/neptunium_alloy_bars_post.json @@ -0,0 +1,6 @@ +{ + "parent": "rankine:block/template_tinted_bars_post", + "textures": { + "bars": "rankine:block/alloy_bars1" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/rankine/models/block/neptunium_alloy_bars_post_ends.json b/src/generated/resources/assets/rankine/models/block/neptunium_alloy_bars_post_ends.json new file mode 100644 index 0000000000..30af95ff04 --- /dev/null +++ b/src/generated/resources/assets/rankine/models/block/neptunium_alloy_bars_post_ends.json @@ -0,0 +1,6 @@ +{ + "parent": "rankine:block/template_tinted_bars_post_ends", + "textures": { + "edge": "rankine:block/alloy_bars_edge" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/rankine/models/block/neptunium_alloy_bars_side.json b/src/generated/resources/assets/rankine/models/block/neptunium_alloy_bars_side.json new file mode 100644 index 0000000000..b3da1de148 --- /dev/null +++ b/src/generated/resources/assets/rankine/models/block/neptunium_alloy_bars_side.json @@ -0,0 +1,7 @@ +{ + "parent": "rankine:block/template_tinted_bars_side", + "textures": { + "bars": "rankine:block/alloy_bars1", + "edge": "rankine:block/alloy_bars_edge" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/rankine/models/block/neptunium_alloy_bars_side_alt.json b/src/generated/resources/assets/rankine/models/block/neptunium_alloy_bars_side_alt.json new file mode 100644 index 0000000000..5594d5882c --- /dev/null +++ b/src/generated/resources/assets/rankine/models/block/neptunium_alloy_bars_side_alt.json @@ -0,0 +1,7 @@ +{ + "parent": "rankine:block/template_tinted_bars_side_alt", + "textures": { + "bars": "rankine:block/alloy_bars1", + "edge": "rankine:block/alloy_bars_edge" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/rankine/models/block/neptunium_alloy_block.json b/src/generated/resources/assets/rankine/models/block/neptunium_alloy_block.json new file mode 100644 index 0000000000..48ffb22183 --- /dev/null +++ b/src/generated/resources/assets/rankine/models/block/neptunium_alloy_block.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "rankine:block/neptunium_alloy_block" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/rankine/models/block/neptunium_alloy_pedestal.json b/src/generated/resources/assets/rankine/models/block/neptunium_alloy_pedestal.json new file mode 100644 index 0000000000..226d7a580a --- /dev/null +++ b/src/generated/resources/assets/rankine/models/block/neptunium_alloy_pedestal.json @@ -0,0 +1,6 @@ +{ + "parent": "rankine:block/template_pedestal", + "textures": { + "all": "rankine:block/neptunium_alloy_block" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/rankine/models/block/neptunium_alloy_pole0.json b/src/generated/resources/assets/rankine/models/block/neptunium_alloy_pole0.json new file mode 100644 index 0000000000..df3238b550 --- /dev/null +++ b/src/generated/resources/assets/rankine/models/block/neptunium_alloy_pole0.json @@ -0,0 +1,6 @@ +{ + "parent": "rankine:block/template_metal_pole", + "textures": { + "side": "rankine:block/template_pole" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/rankine/models/block/neptunium_alloy_pole1.json b/src/generated/resources/assets/rankine/models/block/neptunium_alloy_pole1.json new file mode 100644 index 0000000000..37a855a522 --- /dev/null +++ b/src/generated/resources/assets/rankine/models/block/neptunium_alloy_pole1.json @@ -0,0 +1,7 @@ +{ + "parent": "rankine:block/template_metal_pole_overlay", + "textures": { + "side": "rankine:block/template_pole", + "overlay": "rankine:block/metal_pole1" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/rankine/models/block/neptunium_alloy_pole2.json b/src/generated/resources/assets/rankine/models/block/neptunium_alloy_pole2.json new file mode 100644 index 0000000000..f8bd1998fe --- /dev/null +++ b/src/generated/resources/assets/rankine/models/block/neptunium_alloy_pole2.json @@ -0,0 +1,7 @@ +{ + "parent": "rankine:block/template_metal_pole_overlay", + "textures": { + "side": "rankine:block/template_pole", + "overlay": "rankine:block/metal_pole2" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/rankine/models/block/neptunium_alloy_pole3.json b/src/generated/resources/assets/rankine/models/block/neptunium_alloy_pole3.json new file mode 100644 index 0000000000..fd895661ff --- /dev/null +++ b/src/generated/resources/assets/rankine/models/block/neptunium_alloy_pole3.json @@ -0,0 +1,7 @@ +{ + "parent": "rankine:block/template_metal_pole_overlay", + "textures": { + "side": "rankine:block/template_pole", + "overlay": "rankine:block/metal_pole3" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/rankine/models/block/neptunium_alloy_pole4.json b/src/generated/resources/assets/rankine/models/block/neptunium_alloy_pole4.json new file mode 100644 index 0000000000..c59ce44d54 --- /dev/null +++ b/src/generated/resources/assets/rankine/models/block/neptunium_alloy_pole4.json @@ -0,0 +1,7 @@ +{ + "parent": "rankine:block/template_metal_pole_overlay", + "textures": { + "side": "rankine:block/template_pole", + "overlay": "rankine:block/metal_pole4" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/rankine/models/block/neptunium_alloy_pole5.json b/src/generated/resources/assets/rankine/models/block/neptunium_alloy_pole5.json new file mode 100644 index 0000000000..2bb7989c67 --- /dev/null +++ b/src/generated/resources/assets/rankine/models/block/neptunium_alloy_pole5.json @@ -0,0 +1,7 @@ +{ + "parent": "rankine:block/template_metal_pole_overlay", + "textures": { + "side": "rankine:block/template_pole", + "overlay": "rankine:block/metal_pole5" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/rankine/models/block/neptunium_alloy_pole6.json b/src/generated/resources/assets/rankine/models/block/neptunium_alloy_pole6.json new file mode 100644 index 0000000000..900fe1db5c --- /dev/null +++ b/src/generated/resources/assets/rankine/models/block/neptunium_alloy_pole6.json @@ -0,0 +1,7 @@ +{ + "parent": "rankine:block/template_metal_pole_overlay", + "textures": { + "side": "rankine:block/template_pole", + "overlay": "rankine:block/metal_pole6" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/rankine/models/block/neptunium_alloy_pole7.json b/src/generated/resources/assets/rankine/models/block/neptunium_alloy_pole7.json new file mode 100644 index 0000000000..e31567eff6 --- /dev/null +++ b/src/generated/resources/assets/rankine/models/block/neptunium_alloy_pole7.json @@ -0,0 +1,7 @@ +{ + "parent": "rankine:block/template_metal_pole_overlay", + "textures": { + "side": "rankine:block/template_pole", + "overlay": "rankine:block/metal_pole7" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/rankine/models/block/neptunium_alloy_sheetmetal.json b/src/generated/resources/assets/rankine/models/block/neptunium_alloy_sheetmetal.json new file mode 100644 index 0000000000..29f623a4be --- /dev/null +++ b/src/generated/resources/assets/rankine/models/block/neptunium_alloy_sheetmetal.json @@ -0,0 +1,3 @@ +{ + "parent": "rankine:block/alloy_sheetmetal" +} \ No newline at end of file diff --git a/src/generated/resources/assets/rankine/models/block/sediment_fan.json b/src/generated/resources/assets/rankine/models/block/sediment_fan.json index 4c79e0ede2..30243dc290 100644 --- a/src/generated/resources/assets/rankine/models/block/sediment_fan.json +++ b/src/generated/resources/assets/rankine/models/block/sediment_fan.json @@ -1,6 +1,7 @@ { - "parent": "minecraft:block/cube_all", + "parent": "minecraft:block/cube_column", "textures": { - "all": "rankine:block/sediment_fan" + "side": "rankine:block/sediment_fan_front", + "end": "rankine:block/sediment_fan_side" } } \ No newline at end of file diff --git a/src/generated/resources/assets/rankine/models/item/alloy_surf_rod.json b/src/generated/resources/assets/rankine/models/item/alloy_surf_rod.json deleted file mode 100644 index c978a9f828..0000000000 --- a/src/generated/resources/assets/rankine/models/item/alloy_surf_rod.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "minecraft:item/handheld_rod", - "textures": { - "layer0": "rankine:item/alloy_surf_rod" - } -} \ No newline at end of file diff --git a/src/generated/resources/assets/rankine/models/item/battery_charger.json b/src/generated/resources/assets/rankine/models/item/battery_charger.json new file mode 100644 index 0000000000..0bc1faa930 --- /dev/null +++ b/src/generated/resources/assets/rankine/models/item/battery_charger.json @@ -0,0 +1,3 @@ +{ + "parent": "rankine:block/battery_charger" +} \ No newline at end of file diff --git a/src/generated/resources/assets/rankine/models/item/gas_detector.json b/src/generated/resources/assets/rankine/models/item/gas_detector.json new file mode 100644 index 0000000000..61f4ad9cb7 --- /dev/null +++ b/src/generated/resources/assets/rankine/models/item/gas_detector.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "rankine:item/gas_detector" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/rankine/models/item/neptunium_alloy_bars.json b/src/generated/resources/assets/rankine/models/item/neptunium_alloy_bars.json new file mode 100644 index 0000000000..dc92e63684 --- /dev/null +++ b/src/generated/resources/assets/rankine/models/item/neptunium_alloy_bars.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "rankine:block/alloy_bars1" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/rankine/models/item/neptunium_alloy_block.json b/src/generated/resources/assets/rankine/models/item/neptunium_alloy_block.json new file mode 100644 index 0000000000..12ff9842be --- /dev/null +++ b/src/generated/resources/assets/rankine/models/item/neptunium_alloy_block.json @@ -0,0 +1,3 @@ +{ + "parent": "rankine:block/neptunium_alloy_block" +} \ No newline at end of file diff --git a/src/generated/resources/assets/rankine/models/item/neptunium_alloy_ingot.json b/src/generated/resources/assets/rankine/models/item/neptunium_alloy_ingot.json new file mode 100644 index 0000000000..c914f430c4 --- /dev/null +++ b/src/generated/resources/assets/rankine/models/item/neptunium_alloy_ingot.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "rankine:item/neptunium_alloy_ingot" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/rankine/models/item/neptunium_alloy_nugget.json b/src/generated/resources/assets/rankine/models/item/neptunium_alloy_nugget.json new file mode 100644 index 0000000000..da4715dfc1 --- /dev/null +++ b/src/generated/resources/assets/rankine/models/item/neptunium_alloy_nugget.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "rankine:item/neptunium_alloy_nugget" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/rankine/models/item/neptunium_alloy_pedestal.json b/src/generated/resources/assets/rankine/models/item/neptunium_alloy_pedestal.json new file mode 100644 index 0000000000..9daf603235 --- /dev/null +++ b/src/generated/resources/assets/rankine/models/item/neptunium_alloy_pedestal.json @@ -0,0 +1,3 @@ +{ + "parent": "rankine:block/neptunium_alloy_pedestal" +} \ No newline at end of file diff --git a/src/generated/resources/assets/rankine/models/item/neptunium_alloy_pole.json b/src/generated/resources/assets/rankine/models/item/neptunium_alloy_pole.json new file mode 100644 index 0000000000..010c2b35ea --- /dev/null +++ b/src/generated/resources/assets/rankine/models/item/neptunium_alloy_pole.json @@ -0,0 +1,3 @@ +{ + "parent": "rankine:block/neptunium_alloy_pole0" +} \ No newline at end of file diff --git a/src/generated/resources/assets/rankine/models/item/neptunium_alloy_sheetmetal.json b/src/generated/resources/assets/rankine/models/item/neptunium_alloy_sheetmetal.json new file mode 100644 index 0000000000..f1c32d3190 --- /dev/null +++ b/src/generated/resources/assets/rankine/models/item/neptunium_alloy_sheetmetal.json @@ -0,0 +1,3 @@ +{ + "parent": "rankine:block/neptunium_alloy_sheetmetal" +} \ No newline at end of file diff --git a/src/generated/resources/assets/rankine/models/item/totem_of_powering.json b/src/generated/resources/assets/rankine/models/item/totem_of_powering.json new file mode 100644 index 0000000000..18510992ae --- /dev/null +++ b/src/generated/resources/assets/rankine/models/item/totem_of_powering.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "rankine:item/totem_of_powering" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/forge/loot_modifiers/global_loot_modifiers.json b/src/generated/resources/data/forge/loot_modifiers/global_loot_modifiers.json index 25899a9138..e6be58cd2a 100644 --- a/src/generated/resources/data/forge/loot_modifiers/global_loot_modifiers.json +++ b/src/generated/resources/data/forge/loot_modifiers/global_loot_modifiers.json @@ -1,6 +1,4 @@ { "replace": false, - "entries": [ - "rankine:surf_rod_modifier" - ] + "entries": [] } \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/blocks/metal_bars.json b/src/generated/resources/data/forge/tags/blocks/metal_bars.json index 31891c3f39..99649ca8f6 100644 --- a/src/generated/resources/data/forge/tags/blocks/metal_bars.json +++ b/src/generated/resources/data/forge/tags/blocks/metal_bars.json @@ -21,6 +21,7 @@ "rankine:galinstan_bars", "rankine:osmiridium_bars", "rankine:sodium_potassium_alloy_bars", + "rankine:neptunium_alloy_bars", "rankine:amalgam_bars", "rankine:ender_amalgam_bars", "rankine:rose_gold_bars", diff --git a/src/generated/resources/data/forge/tags/blocks/metal_poles.json b/src/generated/resources/data/forge/tags/blocks/metal_poles.json index c0ce9def68..54c5c197a0 100644 --- a/src/generated/resources/data/forge/tags/blocks/metal_poles.json +++ b/src/generated/resources/data/forge/tags/blocks/metal_poles.json @@ -21,6 +21,7 @@ "rankine:galinstan_pole", "rankine:osmiridium_pole", "rankine:sodium_potassium_alloy_pole", + "rankine:neptunium_alloy_pole", "rankine:amalgam_pole", "rankine:ender_amalgam_pole", "rankine:rose_gold_pole", diff --git a/src/generated/resources/data/forge/tags/blocks/sheetmetal.json b/src/generated/resources/data/forge/tags/blocks/sheetmetal.json index be6b31385b..6798059ac0 100644 --- a/src/generated/resources/data/forge/tags/blocks/sheetmetal.json +++ b/src/generated/resources/data/forge/tags/blocks/sheetmetal.json @@ -30,6 +30,7 @@ "#forge:sheetmetals/galinstan", "#forge:sheetmetals/osmiridium", "#forge:sheetmetals/sodium_potassium_alloy", + "#forge:sheetmetals/neptunium_alloy", "#forge:sheetmetals/amalgam", "#forge:sheetmetals/ender_amalgam", "#forge:sheetmetals/rose_gold", diff --git a/src/generated/resources/data/forge/tags/blocks/sheetmetals/neptunium_alloy.json b/src/generated/resources/data/forge/tags/blocks/sheetmetals/neptunium_alloy.json new file mode 100644 index 0000000000..da81ccd22e --- /dev/null +++ b/src/generated/resources/data/forge/tags/blocks/sheetmetals/neptunium_alloy.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "rankine:neptunium_alloy_sheetmetal" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/items/fishing_rods.json b/src/generated/resources/data/forge/tags/items/fishing_rods.json deleted file mode 100644 index 5b1e5d3dc9..0000000000 --- a/src/generated/resources/data/forge/tags/items/fishing_rods.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "replace": false, - "values": [ - "minecraft:fishing_rod", - "rankine:alloy_surf_rod" - ] -} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/items/ingots/neptunium_alloy.json b/src/generated/resources/data/forge/tags/items/ingots/neptunium_alloy.json new file mode 100644 index 0000000000..f2c1d1b691 --- /dev/null +++ b/src/generated/resources/data/forge/tags/items/ingots/neptunium_alloy.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "rankine:neptunium_alloy_ingot" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/items/metal_bars.json b/src/generated/resources/data/forge/tags/items/metal_bars.json index 31891c3f39..99649ca8f6 100644 --- a/src/generated/resources/data/forge/tags/items/metal_bars.json +++ b/src/generated/resources/data/forge/tags/items/metal_bars.json @@ -21,6 +21,7 @@ "rankine:galinstan_bars", "rankine:osmiridium_bars", "rankine:sodium_potassium_alloy_bars", + "rankine:neptunium_alloy_bars", "rankine:amalgam_bars", "rankine:ender_amalgam_bars", "rankine:rose_gold_bars", diff --git a/src/generated/resources/data/forge/tags/items/metal_poles.json b/src/generated/resources/data/forge/tags/items/metal_poles.json index c0ce9def68..54c5c197a0 100644 --- a/src/generated/resources/data/forge/tags/items/metal_poles.json +++ b/src/generated/resources/data/forge/tags/items/metal_poles.json @@ -21,6 +21,7 @@ "rankine:galinstan_pole", "rankine:osmiridium_pole", "rankine:sodium_potassium_alloy_pole", + "rankine:neptunium_alloy_pole", "rankine:amalgam_pole", "rankine:ender_amalgam_pole", "rankine:rose_gold_pole", diff --git a/src/generated/resources/data/forge/tags/items/nuggets/neptunium_alloy.json b/src/generated/resources/data/forge/tags/items/nuggets/neptunium_alloy.json new file mode 100644 index 0000000000..36fcecde68 --- /dev/null +++ b/src/generated/resources/data/forge/tags/items/nuggets/neptunium_alloy.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "rankine:neptunium_alloy_nugget" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/items/sheetmetal.json b/src/generated/resources/data/forge/tags/items/sheetmetal.json index be6b31385b..6798059ac0 100644 --- a/src/generated/resources/data/forge/tags/items/sheetmetal.json +++ b/src/generated/resources/data/forge/tags/items/sheetmetal.json @@ -30,6 +30,7 @@ "#forge:sheetmetals/galinstan", "#forge:sheetmetals/osmiridium", "#forge:sheetmetals/sodium_potassium_alloy", + "#forge:sheetmetals/neptunium_alloy", "#forge:sheetmetals/amalgam", "#forge:sheetmetals/ender_amalgam", "#forge:sheetmetals/rose_gold", diff --git a/src/generated/resources/data/forge/tags/items/sheetmetals/neptunium_alloy.json b/src/generated/resources/data/forge/tags/items/sheetmetals/neptunium_alloy.json new file mode 100644 index 0000000000..da81ccd22e --- /dev/null +++ b/src/generated/resources/data/forge/tags/items/sheetmetals/neptunium_alloy.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "rankine:neptunium_alloy_sheetmetal" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/minecraft/tags/blocks/beacon_base_blocks.json b/src/generated/resources/data/minecraft/tags/blocks/beacon_base_blocks.json index 8ba4869710..95490775ca 100644 --- a/src/generated/resources/data/minecraft/tags/blocks/beacon_base_blocks.json +++ b/src/generated/resources/data/minecraft/tags/blocks/beacon_base_blocks.json @@ -137,6 +137,7 @@ "rankine:galinstan_block", "rankine:osmiridium_block", "rankine:sodium_potassium_alloy_block", + "rankine:neptunium_alloy_block", "rankine:amalgam_block", "rankine:ender_amalgam_block", "rankine:rose_gold_block", diff --git a/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json b/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json index cfb82f2aaa..a637277341 100644 --- a/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json +++ b/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json @@ -1464,6 +1464,7 @@ "rankine:galinstan_sheetmetal", "rankine:osmiridium_sheetmetal", "rankine:sodium_potassium_alloy_sheetmetal", + "rankine:neptunium_alloy_sheetmetal", "rankine:amalgam_sheetmetal", "rankine:ender_amalgam_sheetmetal", "rankine:rose_gold_sheetmetal", @@ -1682,6 +1683,7 @@ "rankine:galinstan_block", "rankine:osmiridium_block", "rankine:sodium_potassium_alloy_block", + "rankine:neptunium_alloy_block", "rankine:amalgam_block", "rankine:ender_amalgam_block", "rankine:rose_gold_block", @@ -1717,6 +1719,7 @@ "rankine:galinstan_bars", "rankine:osmiridium_bars", "rankine:sodium_potassium_alloy_bars", + "rankine:neptunium_alloy_bars", "rankine:amalgam_bars", "rankine:ender_amalgam_bars", "rankine:rose_gold_bars", @@ -1751,6 +1754,7 @@ "rankine:galinstan_pole", "rankine:osmiridium_pole", "rankine:sodium_potassium_alloy_pole", + "rankine:neptunium_alloy_pole", "rankine:amalgam_pole", "rankine:ender_amalgam_pole", "rankine:rose_gold_pole", @@ -1785,6 +1789,7 @@ "rankine:galinstan_pedestal", "rankine:osmiridium_pedestal", "rankine:sodium_potassium_alloy_pedestal", + "rankine:neptunium_alloy_pedestal", "rankine:amalgam_pedestal", "rankine:ender_amalgam_pedestal", "rankine:rose_gold_pedestal", @@ -2115,6 +2120,7 @@ "rankine:reaction_chamber_core", "rankine:air_distillation_packing", "rankine:distillation_tower", + "rankine:battery_charger", "rankine:fusion_furnace", "rankine:particle_accelerator", "rankine:diamond_anvil_cell", diff --git a/src/generated/resources/data/minecraft/tags/items/beacon_payment_items.json b/src/generated/resources/data/minecraft/tags/items/beacon_payment_items.json index 2cd5c2cb04..572895924b 100644 --- a/src/generated/resources/data/minecraft/tags/items/beacon_payment_items.json +++ b/src/generated/resources/data/minecraft/tags/items/beacon_payment_items.json @@ -137,6 +137,7 @@ "rankine:galinstan_ingot", "rankine:osmiridium_ingot", "rankine:sodium_potassium_alloy_ingot", + "rankine:neptunium_alloy_ingot", "rankine:amalgam_ingot", "rankine:ender_amalgam_ingot", "rankine:rose_gold_ingot", diff --git a/src/generated/resources/data/rankine/advancements/challenges/alloy_collector.json b/src/generated/resources/data/rankine/advancements/challenges/alloy_collector.json index 087701a9c3..bac0a20387 100644 --- a/src/generated/resources/data/rankine/advancements/challenges/alloy_collector.json +++ b/src/generated/resources/data/rankine/advancements/challenges/alloy_collector.json @@ -259,6 +259,18 @@ ] } }, + "neptunium_alloy_ingot": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "items": [ + "rankine:neptunium_alloy_ingot" + ] + } + ] + } + }, "amalgam_ingot": { "trigger": "minecraft:inventory_changed", "conditions": { @@ -501,6 +513,9 @@ [ "sodium_potassium_alloy_ingot" ], + [ + "neptunium_alloy_ingot" + ], [ "amalgam_ingot" ], diff --git a/src/generated/resources/data/rankine/advancements/challenges/totem_collector.json b/src/generated/resources/data/rankine/advancements/challenges/totem_collector.json index 5ad592d550..487ec20414 100644 --- a/src/generated/resources/data/rankine/advancements/challenges/totem_collector.json +++ b/src/generated/resources/data/rankine/advancements/challenges/totem_collector.json @@ -55,6 +55,18 @@ ] } }, + "totem_of_powering": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "items": [ + "rankine:totem_of_powering" + ] + } + ] + } + }, "totem_of_cobbling": { "trigger": "minecraft:inventory_changed", "conditions": { @@ -162,6 +174,9 @@ [ "totem_of_promising" ], + [ + "totem_of_powering" + ], [ "totem_of_cobbling" ], diff --git a/src/generated/resources/data/rankine/advancements/recipes/rankine_misc/amalgam_surf_rod.json b/src/generated/resources/data/rankine/advancements/recipes/rankine_metallurgy/neptunium_alloy_block.json similarity index 70% rename from src/generated/resources/data/rankine/advancements/recipes/rankine_misc/amalgam_surf_rod.json rename to src/generated/resources/data/rankine/advancements/recipes/rankine_metallurgy/neptunium_alloy_block.json index 616eab011b..1e362fcf3e 100644 --- a/src/generated/resources/data/rankine/advancements/recipes/rankine_misc/amalgam_surf_rod.json +++ b/src/generated/resources/data/rankine/advancements/recipes/rankine_metallurgy/neptunium_alloy_block.json @@ -2,17 +2,17 @@ "parent": "minecraft:recipes/root", "rewards": { "recipes": [ - "rankine:amalgam_surf_rod" + "rankine:neptunium_alloy_block" ] }, "criteria": { - "has_alloy": { + "has_ingredient": { "trigger": "minecraft:inventory_changed", "conditions": { "items": [ { "items": [ - "rankine:amalgam_ingot" + "rankine:neptunium_alloy_ingot" ] } ] @@ -21,13 +21,13 @@ "has_the_recipe": { "trigger": "minecraft:recipe_unlocked", "conditions": { - "recipe": "rankine:amalgam_surf_rod" + "recipe": "rankine:neptunium_alloy_block" } } }, "requirements": [ [ - "has_alloy", + "has_ingredient", "has_the_recipe" ] ] diff --git a/src/generated/resources/data/rankine/advancements/recipes/rankine_metallurgy/neptunium_alloy_ingot_from_neptunium_alloy_block.json b/src/generated/resources/data/rankine/advancements/recipes/rankine_metallurgy/neptunium_alloy_ingot_from_neptunium_alloy_block.json new file mode 100644 index 0000000000..109084e34d --- /dev/null +++ b/src/generated/resources/data/rankine/advancements/recipes/rankine_metallurgy/neptunium_alloy_ingot_from_neptunium_alloy_block.json @@ -0,0 +1,34 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "rankine:neptunium_alloy_ingot_from_neptunium_alloy_block" + ] + }, + "criteria": { + "has_ingredient": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "items": [ + "rankine:neptunium_alloy_block" + ] + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "rankine:neptunium_alloy_ingot_from_neptunium_alloy_block" + } + } + }, + "requirements": [ + [ + "has_ingredient", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/rankine/advancements/recipes/rankine_metallurgy/neptunium_alloy_ingot_from_neptunium_alloy_nugget.json b/src/generated/resources/data/rankine/advancements/recipes/rankine_metallurgy/neptunium_alloy_ingot_from_neptunium_alloy_nugget.json new file mode 100644 index 0000000000..067c9b7eab --- /dev/null +++ b/src/generated/resources/data/rankine/advancements/recipes/rankine_metallurgy/neptunium_alloy_ingot_from_neptunium_alloy_nugget.json @@ -0,0 +1,34 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "rankine:neptunium_alloy_ingot_from_neptunium_alloy_nugget" + ] + }, + "criteria": { + "has_ingredient": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "items": [ + "rankine:neptunium_alloy_nugget" + ] + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "rankine:neptunium_alloy_ingot_from_neptunium_alloy_nugget" + } + } + }, + "requirements": [ + [ + "has_ingredient", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/rankine/advancements/recipes/rankine_misc/black_gold_surf_rod.json b/src/generated/resources/data/rankine/advancements/recipes/rankine_metallurgy/neptunium_alloy_nugget.json similarity index 70% rename from src/generated/resources/data/rankine/advancements/recipes/rankine_misc/black_gold_surf_rod.json rename to src/generated/resources/data/rankine/advancements/recipes/rankine_metallurgy/neptunium_alloy_nugget.json index c184939246..4d4df371ed 100644 --- a/src/generated/resources/data/rankine/advancements/recipes/rankine_misc/black_gold_surf_rod.json +++ b/src/generated/resources/data/rankine/advancements/recipes/rankine_metallurgy/neptunium_alloy_nugget.json @@ -2,17 +2,17 @@ "parent": "minecraft:recipes/root", "rewards": { "recipes": [ - "rankine:black_gold_surf_rod" + "rankine:neptunium_alloy_nugget" ] }, "criteria": { - "has_alloy": { + "has_ingredient": { "trigger": "minecraft:inventory_changed", "conditions": { "items": [ { "items": [ - "rankine:black_gold_ingot" + "rankine:neptunium_alloy_ingot" ] } ] @@ -21,13 +21,13 @@ "has_the_recipe": { "trigger": "minecraft:recipe_unlocked", "conditions": { - "recipe": "rankine:black_gold_surf_rod" + "recipe": "rankine:neptunium_alloy_nugget" } } }, "requirements": [ [ - "has_alloy", + "has_ingredient", "has_the_recipe" ] ] diff --git a/src/generated/resources/data/rankine/advancements/recipes/rankine_misc/invar_surf_rod.json b/src/generated/resources/data/rankine/advancements/recipes/rankine_misc/battery_charger.json similarity index 68% rename from src/generated/resources/data/rankine/advancements/recipes/rankine_misc/invar_surf_rod.json rename to src/generated/resources/data/rankine/advancements/recipes/rankine_misc/battery_charger.json index 5657275758..057b8be371 100644 --- a/src/generated/resources/data/rankine/advancements/recipes/rankine_misc/invar_surf_rod.json +++ b/src/generated/resources/data/rankine/advancements/recipes/rankine_misc/battery_charger.json @@ -2,18 +2,16 @@ "parent": "minecraft:recipes/root", "rewards": { "recipes": [ - "rankine:invar_surf_rod" + "rankine:battery_charger" ] }, "criteria": { - "has_alloy": { + "has_ingredient": { "trigger": "minecraft:inventory_changed", "conditions": { "items": [ { - "items": [ - "rankine:invar_ingot" - ] + "tag": "forge:ingots/magnesium_alloy" } ] } @@ -21,13 +19,13 @@ "has_the_recipe": { "trigger": "minecraft:recipe_unlocked", "conditions": { - "recipe": "rankine:invar_surf_rod" + "recipe": "rankine:battery_charger" } } }, "requirements": [ [ - "has_alloy", + "has_ingredient", "has_the_recipe" ] ] diff --git a/src/generated/resources/data/rankine/advancements/recipes/rankine_misc/cobalt_superalloy_surf_rod.json b/src/generated/resources/data/rankine/advancements/recipes/rankine_misc/cobalt_superalloy_surf_rod.json deleted file mode 100644 index 34cf3f9769..0000000000 --- a/src/generated/resources/data/rankine/advancements/recipes/rankine_misc/cobalt_superalloy_surf_rod.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "parent": "minecraft:recipes/root", - "rewards": { - "recipes": [ - "rankine:cobalt_superalloy_surf_rod" - ] - }, - "criteria": { - "has_alloy": { - "trigger": "minecraft:inventory_changed", - "conditions": { - "items": [ - { - "items": [ - "rankine:cobalt_superalloy_ingot" - ] - } - ] - } - }, - "has_the_recipe": { - "trigger": "minecraft:recipe_unlocked", - "conditions": { - "recipe": "rankine:cobalt_superalloy_surf_rod" - } - } - }, - "requirements": [ - [ - "has_alloy", - "has_the_recipe" - ] - ] -} \ No newline at end of file diff --git a/src/generated/resources/data/rankine/advancements/recipes/rankine_misc/ender_amalgam_surf_rod.json b/src/generated/resources/data/rankine/advancements/recipes/rankine_misc/ender_amalgam_surf_rod.json deleted file mode 100644 index e97dca50e1..0000000000 --- a/src/generated/resources/data/rankine/advancements/recipes/rankine_misc/ender_amalgam_surf_rod.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "parent": "minecraft:recipes/root", - "rewards": { - "recipes": [ - "rankine:ender_amalgam_surf_rod" - ] - }, - "criteria": { - "has_alloy": { - "trigger": "minecraft:inventory_changed", - "conditions": { - "items": [ - { - "items": [ - "rankine:ender_amalgam_ingot" - ] - } - ] - } - }, - "has_the_recipe": { - "trigger": "minecraft:recipe_unlocked", - "conditions": { - "recipe": "rankine:ender_amalgam_surf_rod" - } - } - }, - "requirements": [ - [ - "has_alloy", - "has_the_recipe" - ] - ] -} \ No newline at end of file diff --git a/src/generated/resources/data/rankine/advancements/recipes/rankine_misc/green_gold_surf_rod.json b/src/generated/resources/data/rankine/advancements/recipes/rankine_misc/green_gold_surf_rod.json deleted file mode 100644 index 78625d3c48..0000000000 --- a/src/generated/resources/data/rankine/advancements/recipes/rankine_misc/green_gold_surf_rod.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "parent": "minecraft:recipes/root", - "rewards": { - "recipes": [ - "rankine:green_gold_surf_rod" - ] - }, - "criteria": { - "has_alloy": { - "trigger": "minecraft:inventory_changed", - "conditions": { - "items": [ - { - "items": [ - "rankine:green_gold_ingot" - ] - } - ] - } - }, - "has_the_recipe": { - "trigger": "minecraft:recipe_unlocked", - "conditions": { - "recipe": "rankine:green_gold_surf_rod" - } - } - }, - "requirements": [ - [ - "has_alloy", - "has_the_recipe" - ] - ] -} \ No newline at end of file diff --git a/src/generated/resources/data/rankine/advancements/recipes/rankine_misc/meteoric_iron_surf_rod.json b/src/generated/resources/data/rankine/advancements/recipes/rankine_misc/meteoric_iron_surf_rod.json deleted file mode 100644 index 5bf16ada92..0000000000 --- a/src/generated/resources/data/rankine/advancements/recipes/rankine_misc/meteoric_iron_surf_rod.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "parent": "minecraft:recipes/root", - "rewards": { - "recipes": [ - "rankine:meteoric_iron_surf_rod" - ] - }, - "criteria": { - "has_alloy": { - "trigger": "minecraft:inventory_changed", - "conditions": { - "items": [ - { - "items": [ - "rankine:meteoric_iron" - ] - } - ] - } - }, - "has_the_recipe": { - "trigger": "minecraft:recipe_unlocked", - "conditions": { - "recipe": "rankine:meteoric_iron_surf_rod" - } - } - }, - "requirements": [ - [ - "has_alloy", - "has_the_recipe" - ] - ] -} \ No newline at end of file diff --git a/src/generated/resources/data/rankine/advancements/recipes/rankine_misc/native_osmiridium_surf_rod.json b/src/generated/resources/data/rankine/advancements/recipes/rankine_misc/native_osmiridium_surf_rod.json deleted file mode 100644 index be146ad75c..0000000000 --- a/src/generated/resources/data/rankine/advancements/recipes/rankine_misc/native_osmiridium_surf_rod.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "parent": "minecraft:recipes/root", - "rewards": { - "recipes": [ - "rankine:native_osmiridium_surf_rod" - ] - }, - "criteria": { - "has_alloy": { - "trigger": "minecraft:inventory_changed", - "conditions": { - "items": [ - { - "items": [ - "rankine:osmiridium" - ] - } - ] - } - }, - "has_the_recipe": { - "trigger": "minecraft:recipe_unlocked", - "conditions": { - "recipe": "rankine:native_osmiridium_surf_rod" - } - } - }, - "requirements": [ - [ - "has_alloy", - "has_the_recipe" - ] - ] -} \ No newline at end of file diff --git a/src/generated/resources/data/rankine/advancements/recipes/rankine_misc/nickel_superalloy_surf_rod.json b/src/generated/resources/data/rankine/advancements/recipes/rankine_misc/nickel_superalloy_surf_rod.json deleted file mode 100644 index 281747fc05..0000000000 --- a/src/generated/resources/data/rankine/advancements/recipes/rankine_misc/nickel_superalloy_surf_rod.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "parent": "minecraft:recipes/root", - "rewards": { - "recipes": [ - "rankine:nickel_superalloy_surf_rod" - ] - }, - "criteria": { - "has_alloy": { - "trigger": "minecraft:inventory_changed", - "conditions": { - "items": [ - { - "items": [ - "rankine:nickel_superalloy_ingot" - ] - } - ] - } - }, - "has_the_recipe": { - "trigger": "minecraft:recipe_unlocked", - "conditions": { - "recipe": "rankine:nickel_superalloy_surf_rod" - } - } - }, - "requirements": [ - [ - "has_alloy", - "has_the_recipe" - ] - ] -} \ No newline at end of file diff --git a/src/generated/resources/data/rankine/advancements/recipes/rankine_misc/niobium_alloy_surf_rod.json b/src/generated/resources/data/rankine/advancements/recipes/rankine_misc/niobium_alloy_surf_rod.json deleted file mode 100644 index 0038ed566a..0000000000 --- a/src/generated/resources/data/rankine/advancements/recipes/rankine_misc/niobium_alloy_surf_rod.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "parent": "minecraft:recipes/root", - "rewards": { - "recipes": [ - "rankine:niobium_alloy_surf_rod" - ] - }, - "criteria": { - "has_alloy": { - "trigger": "minecraft:inventory_changed", - "conditions": { - "items": [ - { - "items": [ - "rankine:niobium_alloy_ingot" - ] - } - ] - } - }, - "has_the_recipe": { - "trigger": "minecraft:recipe_unlocked", - "conditions": { - "recipe": "rankine:niobium_alloy_surf_rod" - } - } - }, - "requirements": [ - [ - "has_alloy", - "has_the_recipe" - ] - ] -} \ No newline at end of file diff --git a/src/generated/resources/data/rankine/advancements/recipes/rankine_misc/nitinol_surf_rod.json b/src/generated/resources/data/rankine/advancements/recipes/rankine_misc/nitinol_surf_rod.json deleted file mode 100644 index 0a444c4b49..0000000000 --- a/src/generated/resources/data/rankine/advancements/recipes/rankine_misc/nitinol_surf_rod.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "parent": "minecraft:recipes/root", - "rewards": { - "recipes": [ - "rankine:nitinol_surf_rod" - ] - }, - "criteria": { - "has_alloy": { - "trigger": "minecraft:inventory_changed", - "conditions": { - "items": [ - { - "items": [ - "rankine:nitinol_ingot" - ] - } - ] - } - }, - "has_the_recipe": { - "trigger": "minecraft:recipe_unlocked", - "conditions": { - "recipe": "rankine:nitinol_surf_rod" - } - } - }, - "requirements": [ - [ - "has_alloy", - "has_the_recipe" - ] - ] -} \ No newline at end of file diff --git a/src/generated/resources/data/rankine/advancements/recipes/rankine_misc/osmiridium_surf_rod.json b/src/generated/resources/data/rankine/advancements/recipes/rankine_misc/osmiridium_surf_rod.json deleted file mode 100644 index 06a2c46f6e..0000000000 --- a/src/generated/resources/data/rankine/advancements/recipes/rankine_misc/osmiridium_surf_rod.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "parent": "minecraft:recipes/root", - "rewards": { - "recipes": [ - "rankine:osmiridium_surf_rod" - ] - }, - "criteria": { - "has_alloy": { - "trigger": "minecraft:inventory_changed", - "conditions": { - "items": [ - { - "items": [ - "rankine:osmiridium_ingot" - ] - } - ] - } - }, - "has_the_recipe": { - "trigger": "minecraft:recipe_unlocked", - "conditions": { - "recipe": "rankine:osmiridium_surf_rod" - } - } - }, - "requirements": [ - [ - "has_alloy", - "has_the_recipe" - ] - ] -} \ No newline at end of file diff --git a/src/generated/resources/data/rankine/advancements/recipes/rankine_misc/pewter_surf_rod.json b/src/generated/resources/data/rankine/advancements/recipes/rankine_misc/pewter_surf_rod.json deleted file mode 100644 index 4560ff8359..0000000000 --- a/src/generated/resources/data/rankine/advancements/recipes/rankine_misc/pewter_surf_rod.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "parent": "minecraft:recipes/root", - "rewards": { - "recipes": [ - "rankine:pewter_surf_rod" - ] - }, - "criteria": { - "has_alloy": { - "trigger": "minecraft:inventory_changed", - "conditions": { - "items": [ - { - "items": [ - "rankine:pewter_ingot" - ] - } - ] - } - }, - "has_the_recipe": { - "trigger": "minecraft:recipe_unlocked", - "conditions": { - "recipe": "rankine:pewter_surf_rod" - } - } - }, - "requirements": [ - [ - "has_alloy", - "has_the_recipe" - ] - ] -} \ No newline at end of file diff --git a/src/generated/resources/data/rankine/advancements/recipes/rankine_misc/purple_gold_surf_rod.json b/src/generated/resources/data/rankine/advancements/recipes/rankine_misc/purple_gold_surf_rod.json deleted file mode 100644 index fe45427d35..0000000000 --- a/src/generated/resources/data/rankine/advancements/recipes/rankine_misc/purple_gold_surf_rod.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "parent": "minecraft:recipes/root", - "rewards": { - "recipes": [ - "rankine:purple_gold_surf_rod" - ] - }, - "criteria": { - "has_alloy": { - "trigger": "minecraft:inventory_changed", - "conditions": { - "items": [ - { - "items": [ - "rankine:purple_gold_ingot" - ] - } - ] - } - }, - "has_the_recipe": { - "trigger": "minecraft:recipe_unlocked", - "conditions": { - "recipe": "rankine:purple_gold_surf_rod" - } - } - }, - "requirements": [ - [ - "has_alloy", - "has_the_recipe" - ] - ] -} \ No newline at end of file diff --git a/src/generated/resources/data/rankine/advancements/recipes/rankine_misc/rose_gold_surf_rod.json b/src/generated/resources/data/rankine/advancements/recipes/rankine_misc/rose_gold_surf_rod.json deleted file mode 100644 index 6ca4d14faa..0000000000 --- a/src/generated/resources/data/rankine/advancements/recipes/rankine_misc/rose_gold_surf_rod.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "parent": "minecraft:recipes/root", - "rewards": { - "recipes": [ - "rankine:rose_gold_surf_rod" - ] - }, - "criteria": { - "has_alloy": { - "trigger": "minecraft:inventory_changed", - "conditions": { - "items": [ - { - "items": [ - "rankine:rose_gold_ingot" - ] - } - ] - } - }, - "has_the_recipe": { - "trigger": "minecraft:recipe_unlocked", - "conditions": { - "recipe": "rankine:rose_gold_surf_rod" - } - } - }, - "requirements": [ - [ - "has_alloy", - "has_the_recipe" - ] - ] -} \ No newline at end of file diff --git a/src/generated/resources/data/rankine/advancements/recipes/rankine_misc/stainless_steel_surf_rod.json b/src/generated/resources/data/rankine/advancements/recipes/rankine_misc/stainless_steel_surf_rod.json deleted file mode 100644 index c2a659f0d3..0000000000 --- a/src/generated/resources/data/rankine/advancements/recipes/rankine_misc/stainless_steel_surf_rod.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "parent": "minecraft:recipes/root", - "rewards": { - "recipes": [ - "rankine:stainless_steel_surf_rod" - ] - }, - "criteria": { - "has_alloy": { - "trigger": "minecraft:inventory_changed", - "conditions": { - "items": [ - { - "items": [ - "rankine:stainless_steel_ingot" - ] - } - ] - } - }, - "has_the_recipe": { - "trigger": "minecraft:recipe_unlocked", - "conditions": { - "recipe": "rankine:stainless_steel_surf_rod" - } - } - }, - "requirements": [ - [ - "has_alloy", - "has_the_recipe" - ] - ] -} \ No newline at end of file diff --git a/src/generated/resources/data/rankine/advancements/recipes/rankine_misc/titanium_alloy_surf_rod.json b/src/generated/resources/data/rankine/advancements/recipes/rankine_misc/titanium_alloy_surf_rod.json deleted file mode 100644 index a36d91bf6f..0000000000 --- a/src/generated/resources/data/rankine/advancements/recipes/rankine_misc/titanium_alloy_surf_rod.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "parent": "minecraft:recipes/root", - "rewards": { - "recipes": [ - "rankine:titanium_alloy_surf_rod" - ] - }, - "criteria": { - "has_alloy": { - "trigger": "minecraft:inventory_changed", - "conditions": { - "items": [ - { - "items": [ - "rankine:titanium_alloy_ingot" - ] - } - ] - } - }, - "has_the_recipe": { - "trigger": "minecraft:recipe_unlocked", - "conditions": { - "recipe": "rankine:titanium_alloy_surf_rod" - } - } - }, - "requirements": [ - [ - "has_alloy", - "has_the_recipe" - ] - ] -} \ No newline at end of file diff --git a/src/generated/resources/data/rankine/advancements/recipes/rankine_misc/steel_surf_rod.json b/src/generated/resources/data/rankine/advancements/recipes/rankine_misc/totem_of_powering.json similarity index 68% rename from src/generated/resources/data/rankine/advancements/recipes/rankine_misc/steel_surf_rod.json rename to src/generated/resources/data/rankine/advancements/recipes/rankine_misc/totem_of_powering.json index 0a7d82bd93..21dc7fd4d5 100644 --- a/src/generated/resources/data/rankine/advancements/recipes/rankine_misc/steel_surf_rod.json +++ b/src/generated/resources/data/rankine/advancements/recipes/rankine_misc/totem_of_powering.json @@ -2,18 +2,16 @@ "parent": "minecraft:recipes/root", "rewards": { "recipes": [ - "rankine:steel_surf_rod" + "rankine:totem_of_powering" ] }, "criteria": { - "has_alloy": { + "has_ingredient": { "trigger": "minecraft:inventory_changed", "conditions": { "items": [ { - "items": [ - "rankine:steel_ingot" - ] + "tag": "forge:ingots/neptunium_alloy" } ] } @@ -21,13 +19,13 @@ "has_the_recipe": { "trigger": "minecraft:recipe_unlocked", "conditions": { - "recipe": "rankine:steel_surf_rod" + "recipe": "rankine:totem_of_powering" } } }, "requirements": [ [ - "has_alloy", + "has_ingredient", "has_the_recipe" ] ] diff --git a/src/generated/resources/data/rankine/advancements/recipes/rankine_misc/tungsten_heavy_alloy_surf_rod.json b/src/generated/resources/data/rankine/advancements/recipes/rankine_misc/tungsten_heavy_alloy_surf_rod.json deleted file mode 100644 index e2c1394b05..0000000000 --- a/src/generated/resources/data/rankine/advancements/recipes/rankine_misc/tungsten_heavy_alloy_surf_rod.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "parent": "minecraft:recipes/root", - "rewards": { - "recipes": [ - "rankine:tungsten_heavy_alloy_surf_rod" - ] - }, - "criteria": { - "has_alloy": { - "trigger": "minecraft:inventory_changed", - "conditions": { - "items": [ - { - "items": [ - "rankine:tungsten_heavy_alloy_ingot" - ] - } - ] - } - }, - "has_the_recipe": { - "trigger": "minecraft:recipe_unlocked", - "conditions": { - "recipe": "rankine:tungsten_heavy_alloy_surf_rod" - } - } - }, - "requirements": [ - [ - "has_alloy", - "has_the_recipe" - ] - ] -} \ No newline at end of file diff --git a/src/generated/resources/data/rankine/advancements/recipes/rankine_misc/white_gold_surf_rod.json b/src/generated/resources/data/rankine/advancements/recipes/rankine_misc/white_gold_surf_rod.json deleted file mode 100644 index 29ddabd03d..0000000000 --- a/src/generated/resources/data/rankine/advancements/recipes/rankine_misc/white_gold_surf_rod.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "parent": "minecraft:recipes/root", - "rewards": { - "recipes": [ - "rankine:white_gold_surf_rod" - ] - }, - "criteria": { - "has_alloy": { - "trigger": "minecraft:inventory_changed", - "conditions": { - "items": [ - { - "items": [ - "rankine:white_gold_ingot" - ] - } - ] - } - }, - "has_the_recipe": { - "trigger": "minecraft:recipe_unlocked", - "conditions": { - "recipe": "rankine:white_gold_surf_rod" - } - } - }, - "requirements": [ - [ - "has_alloy", - "has_the_recipe" - ] - ] -} \ No newline at end of file diff --git a/src/generated/resources/data/rankine/advancements/recipes/rankine_misc/zirconium_alloy_surf_rod.json b/src/generated/resources/data/rankine/advancements/recipes/rankine_misc/zirconium_alloy_surf_rod.json deleted file mode 100644 index bde83edc43..0000000000 --- a/src/generated/resources/data/rankine/advancements/recipes/rankine_misc/zirconium_alloy_surf_rod.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "parent": "minecraft:recipes/root", - "rewards": { - "recipes": [ - "rankine:zirconium_alloy_surf_rod" - ] - }, - "criteria": { - "has_alloy": { - "trigger": "minecraft:inventory_changed", - "conditions": { - "items": [ - { - "items": [ - "rankine:zirconium_alloy_ingot" - ] - } - ] - } - }, - "has_the_recipe": { - "trigger": "minecraft:recipe_unlocked", - "conditions": { - "recipe": "rankine:zirconium_alloy_surf_rod" - } - } - }, - "requirements": [ - [ - "has_alloy", - "has_the_recipe" - ] - ] -} \ No newline at end of file diff --git a/src/generated/resources/data/rankine/advancements/recipes/rankine_misc/blue_gold_surf_rod.json b/src/generated/resources/data/rankine/advancements/recipes/rankine_world/neptunium_alloy_bars.json similarity index 71% rename from src/generated/resources/data/rankine/advancements/recipes/rankine_misc/blue_gold_surf_rod.json rename to src/generated/resources/data/rankine/advancements/recipes/rankine_world/neptunium_alloy_bars.json index eafd8f01f3..c918620d26 100644 --- a/src/generated/resources/data/rankine/advancements/recipes/rankine_misc/blue_gold_surf_rod.json +++ b/src/generated/resources/data/rankine/advancements/recipes/rankine_world/neptunium_alloy_bars.json @@ -2,17 +2,17 @@ "parent": "minecraft:recipes/root", "rewards": { "recipes": [ - "rankine:blue_gold_surf_rod" + "rankine:neptunium_alloy_bars" ] }, "criteria": { - "has_alloy": { + "has_ingredient": { "trigger": "minecraft:inventory_changed", "conditions": { "items": [ { "items": [ - "rankine:blue_gold_ingot" + "rankine:neptunium_alloy_ingot" ] } ] @@ -21,13 +21,13 @@ "has_the_recipe": { "trigger": "minecraft:recipe_unlocked", "conditions": { - "recipe": "rankine:blue_gold_surf_rod" + "recipe": "rankine:neptunium_alloy_bars" } } }, "requirements": [ [ - "has_alloy", + "has_ingredient", "has_the_recipe" ] ] diff --git a/src/generated/resources/data/rankine/advancements/recipes/rankine_world/neptunium_alloy_pedestal.json b/src/generated/resources/data/rankine/advancements/recipes/rankine_world/neptunium_alloy_pedestal.json new file mode 100644 index 0000000000..70af90ae1f --- /dev/null +++ b/src/generated/resources/data/rankine/advancements/recipes/rankine_world/neptunium_alloy_pedestal.json @@ -0,0 +1,34 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "rankine:neptunium_alloy_pedestal" + ] + }, + "criteria": { + "has_ingredient": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "items": [ + "rankine:neptunium_alloy_ingot" + ] + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "rankine:neptunium_alloy_pedestal" + } + } + }, + "requirements": [ + [ + "has_ingredient", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/rankine/advancements/recipes/rankine_misc/brass_surf_rod.json b/src/generated/resources/data/rankine/advancements/recipes/rankine_world/neptunium_alloy_pole.json similarity index 71% rename from src/generated/resources/data/rankine/advancements/recipes/rankine_misc/brass_surf_rod.json rename to src/generated/resources/data/rankine/advancements/recipes/rankine_world/neptunium_alloy_pole.json index 3a0a2fdbc5..0e88cd28fb 100644 --- a/src/generated/resources/data/rankine/advancements/recipes/rankine_misc/brass_surf_rod.json +++ b/src/generated/resources/data/rankine/advancements/recipes/rankine_world/neptunium_alloy_pole.json @@ -2,17 +2,17 @@ "parent": "minecraft:recipes/root", "rewards": { "recipes": [ - "rankine:brass_surf_rod" + "rankine:neptunium_alloy_pole" ] }, "criteria": { - "has_alloy": { + "has_ingredient": { "trigger": "minecraft:inventory_changed", "conditions": { "items": [ { "items": [ - "rankine:brass_ingot" + "rankine:neptunium_alloy_ingot" ] } ] @@ -21,13 +21,13 @@ "has_the_recipe": { "trigger": "minecraft:recipe_unlocked", "conditions": { - "recipe": "rankine:brass_surf_rod" + "recipe": "rankine:neptunium_alloy_pole" } } }, "requirements": [ [ - "has_alloy", + "has_ingredient", "has_the_recipe" ] ] diff --git a/src/generated/resources/data/rankine/advancements/recipes/rankine_misc/bronze_surf_rod.json b/src/generated/resources/data/rankine/advancements/recipes/rankine_world/neptunium_alloy_sheetmetal.json similarity index 67% rename from src/generated/resources/data/rankine/advancements/recipes/rankine_misc/bronze_surf_rod.json rename to src/generated/resources/data/rankine/advancements/recipes/rankine_world/neptunium_alloy_sheetmetal.json index f237982d81..2cf39a467f 100644 --- a/src/generated/resources/data/rankine/advancements/recipes/rankine_misc/bronze_surf_rod.json +++ b/src/generated/resources/data/rankine/advancements/recipes/rankine_world/neptunium_alloy_sheetmetal.json @@ -2,18 +2,16 @@ "parent": "minecraft:recipes/root", "rewards": { "recipes": [ - "rankine:bronze_surf_rod" + "rankine:neptunium_alloy_sheetmetal" ] }, "criteria": { - "has_alloy": { + "has_ingredient": { "trigger": "minecraft:inventory_changed", "conditions": { "items": [ { - "items": [ - "rankine:bronze_ingot" - ] + "tag": "forge:ingots/neptunium_alloy" } ] } @@ -21,13 +19,13 @@ "has_the_recipe": { "trigger": "minecraft:recipe_unlocked", "conditions": { - "recipe": "rankine:bronze_surf_rod" + "recipe": "rankine:neptunium_alloy_sheetmetal" } } }, "requirements": [ [ - "has_alloy", + "has_ingredient", "has_the_recipe" ] ] diff --git a/src/generated/resources/data/rankine/loot_modifiers/surf_rod_modifier.json b/src/generated/resources/data/rankine/loot_modifiers/surf_rod_modifier.json deleted file mode 100644 index 37b30c2615..0000000000 --- a/src/generated/resources/data/rankine/loot_modifiers/surf_rod_modifier.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "conditions": [ - { - "condition": "minecraft:match_tool", - "predicate": { - "items": [ - "rankine:alloy_surf_rod" - ] - } - }, - { - "condition": "minecraft:entity_properties", - "predicate": { - "fishing_hook": { - "in_open_water": true - } - }, - "entity": "this" - } - ], - "originalItem": "minecraft:cod", - "replacement": "rankine:tuna", - "type": "rankine:surf_rod_modifier" -} \ No newline at end of file diff --git a/src/generated/resources/data/rankine/loot_tables/blocks/battery_charger.json b/src/generated/resources/data/rankine/loot_tables/blocks/battery_charger.json new file mode 100644 index 0000000000..27bc60c939 --- /dev/null +++ b/src/generated/resources/data/rankine/loot_tables/blocks/battery_charger.json @@ -0,0 +1,26 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1.0, + "bonus_rolls": 0.0, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "function": "minecraft:copy_name", + "source": "block_entity" + } + ], + "name": "rankine:battery_charger" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/rankine/loot_tables/blocks/gyratory_crusher.json b/src/generated/resources/data/rankine/loot_tables/blocks/gyratory_crusher.json index 5d34166efd..0e6787ba82 100644 --- a/src/generated/resources/data/rankine/loot_tables/blocks/gyratory_crusher.json +++ b/src/generated/resources/data/rankine/loot_tables/blocks/gyratory_crusher.json @@ -13,7 +13,7 @@ "source": "block_entity" } ], - "name": "rankine:gyratory_crusher" + "name": "minecraft:air" } ], "conditions": [ diff --git a/src/generated/resources/data/rankine/loot_tables/blocks/neptunium_alloy_bars.json b/src/generated/resources/data/rankine/loot_tables/blocks/neptunium_alloy_bars.json new file mode 100644 index 0000000000..979a156a85 --- /dev/null +++ b/src/generated/resources/data/rankine/loot_tables/blocks/neptunium_alloy_bars.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1.0, + "bonus_rolls": 0.0, + "entries": [ + { + "type": "minecraft:item", + "name": "rankine:neptunium_alloy_bars" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/rankine/loot_tables/blocks/neptunium_alloy_block.json b/src/generated/resources/data/rankine/loot_tables/blocks/neptunium_alloy_block.json new file mode 100644 index 0000000000..bf8412d3ec --- /dev/null +++ b/src/generated/resources/data/rankine/loot_tables/blocks/neptunium_alloy_block.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1.0, + "bonus_rolls": 0.0, + "entries": [ + { + "type": "minecraft:item", + "name": "rankine:neptunium_alloy_block" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/rankine/loot_tables/blocks/neptunium_alloy_pedestal.json b/src/generated/resources/data/rankine/loot_tables/blocks/neptunium_alloy_pedestal.json new file mode 100644 index 0000000000..3b0115bf4f --- /dev/null +++ b/src/generated/resources/data/rankine/loot_tables/blocks/neptunium_alloy_pedestal.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1.0, + "bonus_rolls": 0.0, + "entries": [ + { + "type": "minecraft:item", + "name": "rankine:neptunium_alloy_pedestal" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/rankine/loot_tables/blocks/neptunium_alloy_pole.json b/src/generated/resources/data/rankine/loot_tables/blocks/neptunium_alloy_pole.json new file mode 100644 index 0000000000..8a36ff91e8 --- /dev/null +++ b/src/generated/resources/data/rankine/loot_tables/blocks/neptunium_alloy_pole.json @@ -0,0 +1,38 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1.0, + "bonus_rolls": 0.0, + "entries": [ + { + "type": "minecraft:alternatives", + "children": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:block_state_property", + "block": "rankine:neptunium_alloy_pole", + "properties": { + "style": "1" + } + } + ], + "name": "rankine:garland" + }, + { + "type": "minecraft:item", + "name": "rankine:neptunium_alloy_pole" + } + ] + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/rankine/loot_tables/blocks/neptunium_alloy_sheetmetal.json b/src/generated/resources/data/rankine/loot_tables/blocks/neptunium_alloy_sheetmetal.json new file mode 100644 index 0000000000..fb5cbf914c --- /dev/null +++ b/src/generated/resources/data/rankine/loot_tables/blocks/neptunium_alloy_sheetmetal.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1.0, + "bonus_rolls": 0.0, + "entries": [ + { + "type": "minecraft:item", + "name": "rankine:neptunium_alloy_sheetmetal" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/rankine/loot_tables/blocks/piston_crusher.json b/src/generated/resources/data/rankine/loot_tables/blocks/piston_crusher.json index b0cd92b332..0e6787ba82 100644 --- a/src/generated/resources/data/rankine/loot_tables/blocks/piston_crusher.json +++ b/src/generated/resources/data/rankine/loot_tables/blocks/piston_crusher.json @@ -13,7 +13,7 @@ "source": "block_entity" } ], - "name": "rankine:piston_crusher" + "name": "minecraft:air" } ], "conditions": [ diff --git a/src/generated/resources/data/rankine/modonomicons/rankine_research/book.json b/src/generated/resources/data/rankine/modonomicons/rankine_research/book.json deleted file mode 100644 index 2868c6c0ef..0000000000 --- a/src/generated/resources/data/rankine/modonomicons/rankine_research/book.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "book.rankine.rankine_research.name", - "tooltip": "book.rankine.rankine_research.tooltip", - "model": "modonomicon:modonomicon_red", - "creative_tab": "rankine_misc", - "book_overview_texture": "modonomicon:textures/gui/book_overview.png", - "book_content_texture": "modonomicon:textures/gui/book_content.png", - "crafting_texture": "modonomicon:textures/gui/crafting_textures.png", - "default_title_color": 0, - "auto_add_read_conditions": false, - "generate_book_item": true -} \ No newline at end of file diff --git a/src/generated/resources/data/rankine/modonomicons/rankine_research/categories/alloying.json b/src/generated/resources/data/rankine/modonomicons/rankine_research/categories/alloying.json deleted file mode 100644 index 27288d61fc..0000000000 --- a/src/generated/resources/data/rankine/modonomicons/rankine_research/categories/alloying.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "book.rankine.rankine_research.alloying.name", - "icon": "rankine:bronze_ingot", - "sort_number": -1, - "background": "modonomicon:textures/gui/dark_slate_seamless.png", - "entry_textures": "modonomicon:textures/gui/entry_textures.png", - "show_category_button": true -} \ No newline at end of file diff --git a/src/generated/resources/data/rankine/modonomicons/rankine_research/entries/alloying/multiblock.json b/src/generated/resources/data/rankine/modonomicons/rankine_research/entries/alloying/multiblock.json deleted file mode 100644 index 6089cf9547..0000000000 --- a/src/generated/resources/data/rankine/modonomicons/rankine_research/entries/alloying/multiblock.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "category": "rankine:alloying", - "name": "book.rankine.rankine_research.alloying.multiblock.name", - "description": "book.rankine.rankine_research.alloying.multiblock.description", - "icon": "minecraft:furnace", - "x": -8, - "y": -2, - "background_u_index": 0, - "background_v_index": 0, - "hide_while_locked": false, - "pages": [ - { - "type": "modonomicon:text", - "anchor": "", - "title": "book.rankine.rankine_research.alloying.multiblock.intro.title", - "use_markdown_in_title": false, - "show_title_separator": true, - "text": "book.rankine.rankine_research.alloying.multiblock.intro.text" - }, - { - "type": "modonomicon:multiblock", - "anchor": "", - "multiblock_name": "multiblocks.modonomicon.blockentity", - "multiblock_id": "modonomicon:blockentity", - "text": "book.rankine.rankine_research.alloying.multiblock.multiblock.text", - "show_visualize_button": true - } - ] -} \ No newline at end of file diff --git a/src/generated/resources/data/rankine/recipes/amalgam_surf_rod.json b/src/generated/resources/data/rankine/recipes/amalgam_surf_rod.json deleted file mode 100644 index b70a4b7429..0000000000 --- a/src/generated/resources/data/rankine/recipes/amalgam_surf_rod.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "type": "rankine:alloy_crafting", - "group": "rankine:alloy_surf_rods", - "inherit": true, - "color": 13881539, - "langName": "item.rankine.amalgam_alloying", - "pattern": [ - " #", - " #s", - "# s" - ], - "key": { - "#": { - "item": "rankine:amalgam_ingot" - }, - "s": { - "tag": "forge:string" - } - }, - "result": { - "item": "rankine:alloy_surf_rod" - } -} \ No newline at end of file diff --git a/src/generated/resources/data/rankine/recipes/battery_charger.json b/src/generated/resources/data/rankine/recipes/battery_charger.json new file mode 100644 index 0000000000..30c31f83ba --- /dev/null +++ b/src/generated/resources/data/rankine/recipes/battery_charger.json @@ -0,0 +1,22 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "XSX", + "R R", + "XSX" + ], + "key": { + "X": { + "tag": "forge:sheetmetal" + }, + "R": { + "item": "minecraft:repeater" + }, + "S": { + "tag": "forge:sheetmetal" + } + }, + "result": { + "item": "rankine:battery_charger" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/rankine/recipes/black_gold_surf_rod.json b/src/generated/resources/data/rankine/recipes/black_gold_surf_rod.json deleted file mode 100644 index e4da44b330..0000000000 --- a/src/generated/resources/data/rankine/recipes/black_gold_surf_rod.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "type": "rankine:alloy_crafting", - "group": "rankine:alloy_surf_rods", - "inherit": true, - "color": 3684408, - "langName": "item.rankine.black_gold_alloying", - "pattern": [ - " #", - " #s", - "# s" - ], - "key": { - "#": { - "item": "rankine:black_gold_ingot" - }, - "s": { - "tag": "forge:string" - } - }, - "result": { - "item": "rankine:alloy_surf_rod" - } -} \ No newline at end of file diff --git a/src/generated/resources/data/rankine/recipes/blue_gold_surf_rod.json b/src/generated/resources/data/rankine/recipes/blue_gold_surf_rod.json deleted file mode 100644 index efd36262ad..0000000000 --- a/src/generated/resources/data/rankine/recipes/blue_gold_surf_rod.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "type": "rankine:alloy_crafting", - "group": "rankine:alloy_surf_rods", - "inherit": true, - "color": 8695295, - "langName": "item.rankine.blue_gold_alloying", - "pattern": [ - " #", - " #s", - "# s" - ], - "key": { - "#": { - "item": "rankine:blue_gold_ingot" - }, - "s": { - "tag": "forge:string" - } - }, - "result": { - "item": "rankine:alloy_surf_rod" - } -} \ No newline at end of file diff --git a/src/generated/resources/data/rankine/recipes/brass_surf_rod.json b/src/generated/resources/data/rankine/recipes/brass_surf_rod.json deleted file mode 100644 index 2b983277d1..0000000000 --- a/src/generated/resources/data/rankine/recipes/brass_surf_rod.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "type": "rankine:alloy_crafting", - "group": "rankine:alloy_surf_rods", - "inherit": true, - "color": 15510384, - "langName": "item.rankine.brass_alloying", - "pattern": [ - " #", - " #s", - "# s" - ], - "key": { - "#": { - "item": "rankine:brass_ingot" - }, - "s": { - "tag": "forge:string" - } - }, - "result": { - "item": "rankine:alloy_surf_rod" - } -} \ No newline at end of file diff --git a/src/generated/resources/data/rankine/recipes/bronze_surf_rod.json b/src/generated/resources/data/rankine/recipes/bronze_surf_rod.json deleted file mode 100644 index 3704b5fc0b..0000000000 --- a/src/generated/resources/data/rankine/recipes/bronze_surf_rod.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "type": "rankine:alloy_crafting", - "group": "rankine:alloy_surf_rods", - "inherit": true, - "color": 15510384, - "langName": "item.rankine.bronze_alloying", - "pattern": [ - " #", - " #s", - "# s" - ], - "key": { - "#": { - "item": "rankine:bronze_ingot" - }, - "s": { - "tag": "forge:string" - } - }, - "result": { - "item": "rankine:alloy_surf_rod" - } -} \ No newline at end of file diff --git a/src/generated/resources/data/rankine/recipes/cobalt_superalloy_surf_rod.json b/src/generated/resources/data/rankine/recipes/cobalt_superalloy_surf_rod.json deleted file mode 100644 index fa9f40b612..0000000000 --- a/src/generated/resources/data/rankine/recipes/cobalt_superalloy_surf_rod.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "type": "rankine:alloy_crafting", - "group": "rankine:alloy_surf_rods", - "inherit": true, - "color": 6534878, - "langName": "item.rankine.cobalt_superalloy_alloying", - "pattern": [ - " #", - " #s", - "# s" - ], - "key": { - "#": { - "item": "rankine:cobalt_superalloy_ingot" - }, - "s": { - "tag": "forge:string" - } - }, - "result": { - "item": "rankine:alloy_surf_rod" - } -} \ No newline at end of file diff --git a/src/generated/resources/data/rankine/recipes/ender_amalgam_surf_rod.json b/src/generated/resources/data/rankine/recipes/ender_amalgam_surf_rod.json deleted file mode 100644 index 636ec5cdf3..0000000000 --- a/src/generated/resources/data/rankine/recipes/ender_amalgam_surf_rod.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "type": "rankine:alloy_crafting", - "group": "rankine:alloy_surf_rods", - "inherit": true, - "color": 492385, - "langName": "item.rankine.ender_amalgam_alloying", - "pattern": [ - " #", - " #s", - "# s" - ], - "key": { - "#": { - "item": "rankine:ender_amalgam_ingot" - }, - "s": { - "tag": "forge:string" - } - }, - "result": { - "item": "rankine:alloy_surf_rod" - } -} \ No newline at end of file diff --git a/src/generated/resources/data/rankine/recipes/green_gold_surf_rod.json b/src/generated/resources/data/rankine/recipes/green_gold_surf_rod.json deleted file mode 100644 index d98cec826d..0000000000 --- a/src/generated/resources/data/rankine/recipes/green_gold_surf_rod.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "type": "rankine:alloy_crafting", - "group": "rankine:alloy_surf_rods", - "inherit": true, - "color": 15728547, - "langName": "item.rankine.green_gold_alloying", - "pattern": [ - " #", - " #s", - "# s" - ], - "key": { - "#": { - "item": "rankine:green_gold_ingot" - }, - "s": { - "tag": "forge:string" - } - }, - "result": { - "item": "rankine:alloy_surf_rod" - } -} \ No newline at end of file diff --git a/src/generated/resources/data/rankine/recipes/invar_surf_rod.json b/src/generated/resources/data/rankine/recipes/invar_surf_rod.json deleted file mode 100644 index d27c4008ef..0000000000 --- a/src/generated/resources/data/rankine/recipes/invar_surf_rod.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "type": "rankine:alloy_crafting", - "group": "rankine:alloy_surf_rods", - "inherit": true, - "color": 13028546, - "langName": "item.rankine.invar_alloying", - "pattern": [ - " #", - " #s", - "# s" - ], - "key": { - "#": { - "item": "rankine:invar_ingot" - }, - "s": { - "tag": "forge:string" - } - }, - "result": { - "item": "rankine:alloy_surf_rod" - } -} \ No newline at end of file diff --git a/src/generated/resources/data/rankine/recipes/meteoric_iron_surf_rod.json b/src/generated/resources/data/rankine/recipes/meteoric_iron_surf_rod.json deleted file mode 100644 index 3826f14ecb..0000000000 --- a/src/generated/resources/data/rankine/recipes/meteoric_iron_surf_rod.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "type": "rankine:alloy_crafting", - "group": "rankine:alloy_surf_rods", - "inherit": true, - "color": 13028546, - "langName": "item.rankine.invar_alloying", - "pattern": [ - " #", - " #s", - "# s" - ], - "key": { - "#": { - "item": "rankine:meteoric_iron" - }, - "s": { - "tag": "forge:string" - } - }, - "result": { - "item": "rankine:alloy_surf_rod" - } -} \ No newline at end of file diff --git a/src/generated/resources/data/rankine/recipes/native_osmiridium_surf_rod.json b/src/generated/resources/data/rankine/recipes/native_osmiridium_surf_rod.json deleted file mode 100644 index 977eca3d68..0000000000 --- a/src/generated/resources/data/rankine/recipes/native_osmiridium_surf_rod.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "type": "rankine:alloy_crafting", - "group": "rankine:alloy_surf_rods", - "inherit": true, - "color": 13212593, - "langName": "item.rankine.osmiridium_alloying", - "pattern": [ - " #", - " #s", - "# s" - ], - "key": { - "#": { - "item": "rankine:osmiridium" - }, - "s": { - "tag": "forge:string" - } - }, - "result": { - "item": "rankine:alloy_surf_rod" - } -} \ No newline at end of file diff --git a/src/generated/resources/data/rankine/recipes/neptunium_alloy_bars.json b/src/generated/resources/data/rankine/recipes/neptunium_alloy_bars.json new file mode 100644 index 0000000000..77e2bca44a --- /dev/null +++ b/src/generated/resources/data/rankine/recipes/neptunium_alloy_bars.json @@ -0,0 +1,17 @@ +{ + "type": "minecraft:crafting_shaped", + "group": "rankine:bars", + "pattern": [ + "###", + "###" + ], + "key": { + "#": { + "item": "rankine:neptunium_alloy_ingot" + } + }, + "result": { + "item": "rankine:neptunium_alloy_bars", + "count": 16 + } +} \ No newline at end of file diff --git a/src/generated/resources/data/rankine/recipes/neptunium_alloy_block.json b/src/generated/resources/data/rankine/recipes/neptunium_alloy_block.json new file mode 100644 index 0000000000..a33566274a --- /dev/null +++ b/src/generated/resources/data/rankine/recipes/neptunium_alloy_block.json @@ -0,0 +1,18 @@ +{ + "type": "rankine:alloy_crafting", + "group": "rankine:alloy_blocks", + "inherit": true, + "pattern": [ + "###", + "###", + "###" + ], + "key": { + "#": { + "item": "rankine:neptunium_alloy_ingot" + } + }, + "result": { + "item": "rankine:neptunium_alloy_block" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/rankine/recipes/neptunium_alloy_ingot_from_neptunium_alloy_block.json b/src/generated/resources/data/rankine/recipes/neptunium_alloy_ingot_from_neptunium_alloy_block.json new file mode 100644 index 0000000000..3440b3a920 --- /dev/null +++ b/src/generated/resources/data/rankine/recipes/neptunium_alloy_ingot_from_neptunium_alloy_block.json @@ -0,0 +1,17 @@ +{ + "type": "rankine:alloy_crafting", + "group": "rankine:alloy_nuggets", + "inherit": true, + "pattern": [ + "#" + ], + "key": { + "#": { + "item": "rankine:neptunium_alloy_block" + } + }, + "result": { + "item": "rankine:neptunium_alloy_ingot", + "count": 9 + } +} \ No newline at end of file diff --git a/src/generated/resources/data/rankine/recipes/neptunium_alloy_ingot_from_neptunium_alloy_nugget.json b/src/generated/resources/data/rankine/recipes/neptunium_alloy_ingot_from_neptunium_alloy_nugget.json new file mode 100644 index 0000000000..ed60351c2d --- /dev/null +++ b/src/generated/resources/data/rankine/recipes/neptunium_alloy_ingot_from_neptunium_alloy_nugget.json @@ -0,0 +1,18 @@ +{ + "type": "rankine:alloy_crafting", + "group": "rankine:alloy_blocks", + "inherit": true, + "pattern": [ + "###", + "###", + "###" + ], + "key": { + "#": { + "item": "rankine:neptunium_alloy_nugget" + } + }, + "result": { + "item": "rankine:neptunium_alloy_ingot" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/rankine/recipes/neptunium_alloy_nugget.json b/src/generated/resources/data/rankine/recipes/neptunium_alloy_nugget.json new file mode 100644 index 0000000000..99557ed33d --- /dev/null +++ b/src/generated/resources/data/rankine/recipes/neptunium_alloy_nugget.json @@ -0,0 +1,17 @@ +{ + "type": "rankine:alloy_crafting", + "group": "rankine:alloy_nuggets", + "inherit": true, + "pattern": [ + "#" + ], + "key": { + "#": { + "item": "rankine:neptunium_alloy_ingot" + } + }, + "result": { + "item": "rankine:neptunium_alloy_nugget", + "count": 9 + } +} \ No newline at end of file diff --git a/src/generated/resources/data/rankine/recipes/neptunium_alloy_pedestal.json b/src/generated/resources/data/rankine/recipes/neptunium_alloy_pedestal.json new file mode 100644 index 0000000000..4148fda5d2 --- /dev/null +++ b/src/generated/resources/data/rankine/recipes/neptunium_alloy_pedestal.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:crafting_shaped", + "group": "rankine:pedestals", + "pattern": [ + " P ", + " # ", + " # " + ], + "key": { + "#": { + "item": "rankine:neptunium_alloy_ingot" + }, + "P": { + "tag": "forge:stone_pressure_plates" + } + }, + "result": { + "item": "rankine:neptunium_alloy_pedestal" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/rankine/recipes/neptunium_alloy_pole.json b/src/generated/resources/data/rankine/recipes/neptunium_alloy_pole.json new file mode 100644 index 0000000000..c357329849 --- /dev/null +++ b/src/generated/resources/data/rankine/recipes/neptunium_alloy_pole.json @@ -0,0 +1,18 @@ +{ + "type": "minecraft:crafting_shaped", + "group": "rankine:poles", + "pattern": [ + "#", + "#", + "#" + ], + "key": { + "#": { + "item": "rankine:neptunium_alloy_ingot" + } + }, + "result": { + "item": "rankine:neptunium_alloy_pole", + "count": 8 + } +} \ No newline at end of file diff --git a/src/generated/resources/data/rankine/recipes/neptunium_alloy_sheetmetal.json b/src/generated/resources/data/rankine/recipes/neptunium_alloy_sheetmetal.json new file mode 100644 index 0000000000..a3aaa61f79 --- /dev/null +++ b/src/generated/resources/data/rankine/recipes/neptunium_alloy_sheetmetal.json @@ -0,0 +1,21 @@ +{ + "type": "minecraft:crafting_shaped", + "group": "sheetmetal", + "pattern": [ + "#I#", + "#I#", + "#I#" + ], + "key": { + "I": { + "tag": "forge:ingots/neptunium_alloy" + }, + "#": { + "tag": "forge:nuggets/neptunium_alloy" + } + }, + "result": { + "item": "rankine:neptunium_alloy_sheetmetal", + "count": 8 + } +} \ No newline at end of file diff --git a/src/generated/resources/data/rankine/recipes/nickel_superalloy_surf_rod.json b/src/generated/resources/data/rankine/recipes/nickel_superalloy_surf_rod.json deleted file mode 100644 index 7fb4694e2d..0000000000 --- a/src/generated/resources/data/rankine/recipes/nickel_superalloy_surf_rod.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "type": "rankine:alloy_crafting", - "group": "rankine:alloy_surf_rods", - "inherit": true, - "color": 12769246, - "langName": "item.rankine.nickel_superalloy_alloying", - "pattern": [ - " #", - " #s", - "# s" - ], - "key": { - "#": { - "item": "rankine:nickel_superalloy_ingot" - }, - "s": { - "tag": "forge:string" - } - }, - "result": { - "item": "rankine:alloy_surf_rod" - } -} \ No newline at end of file diff --git a/src/generated/resources/data/rankine/recipes/niobium_alloy_surf_rod.json b/src/generated/resources/data/rankine/recipes/niobium_alloy_surf_rod.json deleted file mode 100644 index 2e11fc3142..0000000000 --- a/src/generated/resources/data/rankine/recipes/niobium_alloy_surf_rod.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "type": "rankine:alloy_crafting", - "group": "rankine:alloy_surf_rods", - "inherit": true, - "color": 13750746, - "langName": "item.rankine.niobium_alloy_alloying", - "pattern": [ - " #", - " #s", - "# s" - ], - "key": { - "#": { - "item": "rankine:niobium_alloy_ingot" - }, - "s": { - "tag": "forge:string" - } - }, - "result": { - "item": "rankine:alloy_surf_rod" - } -} \ No newline at end of file diff --git a/src/generated/resources/data/rankine/recipes/nitinol_surf_rod.json b/src/generated/resources/data/rankine/recipes/nitinol_surf_rod.json deleted file mode 100644 index d67a6bb2a7..0000000000 --- a/src/generated/resources/data/rankine/recipes/nitinol_surf_rod.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "type": "rankine:alloy_crafting", - "group": "rankine:alloy_surf_rods", - "inherit": true, - "color": 12882104, - "langName": "item.rankine.nitinol_alloying", - "pattern": [ - " #", - " #s", - "# s" - ], - "key": { - "#": { - "item": "rankine:nitinol_ingot" - }, - "s": { - "tag": "forge:string" - } - }, - "result": { - "item": "rankine:alloy_surf_rod" - } -} \ No newline at end of file diff --git a/src/generated/resources/data/rankine/recipes/osmiridium_surf_rod.json b/src/generated/resources/data/rankine/recipes/osmiridium_surf_rod.json deleted file mode 100644 index d828f1d954..0000000000 --- a/src/generated/resources/data/rankine/recipes/osmiridium_surf_rod.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "type": "rankine:alloy_crafting", - "group": "rankine:alloy_surf_rods", - "inherit": true, - "color": 13212593, - "langName": "item.rankine.osmiridium_alloying", - "pattern": [ - " #", - " #s", - "# s" - ], - "key": { - "#": { - "item": "rankine:osmiridium_ingot" - }, - "s": { - "tag": "forge:string" - } - }, - "result": { - "item": "rankine:alloy_surf_rod" - } -} \ No newline at end of file diff --git a/src/generated/resources/data/rankine/recipes/pewter_surf_rod.json b/src/generated/resources/data/rankine/recipes/pewter_surf_rod.json deleted file mode 100644 index b22252e773..0000000000 --- a/src/generated/resources/data/rankine/recipes/pewter_surf_rod.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "type": "rankine:alloy_crafting", - "group": "rankine:alloy_surf_rods", - "inherit": true, - "color": 11711154, - "langName": "item.rankine.pewter_alloying", - "pattern": [ - " #", - " #s", - "# s" - ], - "key": { - "#": { - "item": "rankine:pewter_ingot" - }, - "s": { - "tag": "forge:string" - } - }, - "result": { - "item": "rankine:alloy_surf_rod" - } -} \ No newline at end of file diff --git a/src/generated/resources/data/rankine/recipes/purple_gold_surf_rod.json b/src/generated/resources/data/rankine/recipes/purple_gold_surf_rod.json deleted file mode 100644 index ba95754cf6..0000000000 --- a/src/generated/resources/data/rankine/recipes/purple_gold_surf_rod.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "type": "rankine:alloy_crafting", - "group": "rankine:alloy_surf_rods", - "inherit": true, - "color": 11836415, - "langName": "item.rankine.purple_gold_alloying", - "pattern": [ - " #", - " #s", - "# s" - ], - "key": { - "#": { - "item": "rankine:purple_gold_ingot" - }, - "s": { - "tag": "forge:string" - } - }, - "result": { - "item": "rankine:alloy_surf_rod" - } -} \ No newline at end of file diff --git a/src/generated/resources/data/rankine/recipes/rose_gold_surf_rod.json b/src/generated/resources/data/rankine/recipes/rose_gold_surf_rod.json deleted file mode 100644 index fa05648718..0000000000 --- a/src/generated/resources/data/rankine/recipes/rose_gold_surf_rod.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "type": "rankine:alloy_crafting", - "group": "rankine:alloy_surf_rods", - "inherit": true, - "color": 16756647, - "langName": "item.rankine.rose_gold_alloying", - "pattern": [ - " #", - " #s", - "# s" - ], - "key": { - "#": { - "item": "rankine:rose_gold_ingot" - }, - "s": { - "tag": "forge:string" - } - }, - "result": { - "item": "rankine:alloy_surf_rod" - } -} \ No newline at end of file diff --git a/src/generated/resources/data/rankine/recipes/stainless_steel_surf_rod.json b/src/generated/resources/data/rankine/recipes/stainless_steel_surf_rod.json deleted file mode 100644 index 3586c8288f..0000000000 --- a/src/generated/resources/data/rankine/recipes/stainless_steel_surf_rod.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "type": "rankine:alloy_crafting", - "group": "rankine:alloy_surf_rods", - "inherit": true, - "color": 13292499, - "langName": "item.rankine.stainless_steel_alloying", - "pattern": [ - " #", - " #s", - "# s" - ], - "key": { - "#": { - "item": "rankine:stainless_steel_ingot" - }, - "s": { - "tag": "forge:string" - } - }, - "result": { - "item": "rankine:alloy_surf_rod" - } -} \ No newline at end of file diff --git a/src/generated/resources/data/rankine/recipes/steel_surf_rod.json b/src/generated/resources/data/rankine/recipes/steel_surf_rod.json deleted file mode 100644 index 6089d17d0a..0000000000 --- a/src/generated/resources/data/rankine/recipes/steel_surf_rod.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "type": "rankine:alloy_crafting", - "group": "rankine:alloy_surf_rods", - "inherit": true, - "color": 7634311, - "langName": "item.rankine.steel_alloying", - "pattern": [ - " #", - " #s", - "# s" - ], - "key": { - "#": { - "item": "rankine:steel_ingot" - }, - "s": { - "tag": "forge:string" - } - }, - "result": { - "item": "rankine:alloy_surf_rod" - } -} \ No newline at end of file diff --git a/src/generated/resources/data/rankine/recipes/titanium_alloy_surf_rod.json b/src/generated/resources/data/rankine/recipes/titanium_alloy_surf_rod.json deleted file mode 100644 index 5ad88f75e7..0000000000 --- a/src/generated/resources/data/rankine/recipes/titanium_alloy_surf_rod.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "type": "rankine:alloy_crafting", - "group": "rankine:alloy_surf_rods", - "inherit": true, - "color": 13750746, - "langName": "item.rankine.titanium_alloy_alloying", - "pattern": [ - " #", - " #s", - "# s" - ], - "key": { - "#": { - "item": "rankine:titanium_alloy_ingot" - }, - "s": { - "tag": "forge:string" - } - }, - "result": { - "item": "rankine:alloy_surf_rod" - } -} \ No newline at end of file diff --git a/src/generated/resources/data/rankine/recipes/totem_of_powering.json b/src/generated/resources/data/rankine/recipes/totem_of_powering.json new file mode 100644 index 0000000000..2a34711682 --- /dev/null +++ b/src/generated/resources/data/rankine/recipes/totem_of_powering.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "III", + "IRI", + "III" + ], + "key": { + "I": { + "tag": "forge:ingots/neptunium_alloy" + }, + "R": { + "item": "minecraft:conduit" + } + }, + "result": { + "item": "rankine:totem_of_powering" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/rankine/recipes/tungsten_heavy_alloy_surf_rod.json b/src/generated/resources/data/rankine/recipes/tungsten_heavy_alloy_surf_rod.json deleted file mode 100644 index e1497469eb..0000000000 --- a/src/generated/resources/data/rankine/recipes/tungsten_heavy_alloy_surf_rod.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "type": "rankine:alloy_crafting", - "group": "rankine:alloy_surf_rods", - "inherit": true, - "color": 11113071, - "langName": "item.rankine.tungsten_heavy_alloy_alloying", - "pattern": [ - " #", - " #s", - "# s" - ], - "key": { - "#": { - "item": "rankine:tungsten_heavy_alloy_ingot" - }, - "s": { - "tag": "forge:string" - } - }, - "result": { - "item": "rankine:alloy_surf_rod" - } -} \ No newline at end of file diff --git a/src/generated/resources/data/rankine/recipes/white_gold_surf_rod.json b/src/generated/resources/data/rankine/recipes/white_gold_surf_rod.json deleted file mode 100644 index f58e47162f..0000000000 --- a/src/generated/resources/data/rankine/recipes/white_gold_surf_rod.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "type": "rankine:alloy_crafting", - "group": "rankine:alloy_surf_rods", - "inherit": true, - "color": 16777207, - "langName": "item.rankine.white_gold_alloying", - "pattern": [ - " #", - " #s", - "# s" - ], - "key": { - "#": { - "item": "rankine:white_gold_ingot" - }, - "s": { - "tag": "forge:string" - } - }, - "result": { - "item": "rankine:alloy_surf_rod" - } -} \ No newline at end of file diff --git a/src/generated/resources/data/rankine/recipes/zirconium_alloy_surf_rod.json b/src/generated/resources/data/rankine/recipes/zirconium_alloy_surf_rod.json deleted file mode 100644 index f2b1e3fa17..0000000000 --- a/src/generated/resources/data/rankine/recipes/zirconium_alloy_surf_rod.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "type": "rankine:alloy_crafting", - "group": "rankine:alloy_surf_rods", - "inherit": true, - "color": 13750746, - "langName": "item.rankine.zirconium_alloy_alloying", - "pattern": [ - " #", - " #s", - "# s" - ], - "key": { - "#": { - "item": "rankine:zirconium_alloy_ingot" - }, - "s": { - "tag": "forge:string" - } - }, - "result": { - "item": "rankine:alloy_surf_rod" - } -} \ No newline at end of file diff --git a/src/generated/resources/data/rankine/tags/items/batteries.json b/src/generated/resources/data/rankine/tags/items/batteries.json new file mode 100644 index 0000000000..b77ca6cc65 --- /dev/null +++ b/src/generated/resources/data/rankine/tags/items/batteries.json @@ -0,0 +1,12 @@ +{ + "replace": false, + "values": [ + "rankine:silver_zinc_battery", + "rankine:magnesium_battery", + "rankine:lead_acid_battery", + "rankine:vanadium_redox_battery", + "rankine:zinc_bromine_battery", + "rankine:sodium_sulfur_battery", + "rankine:lithium_ion_battery" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/rankine/tags/items/rtg.json b/src/generated/resources/data/rankine/tags/items/rtg.json new file mode 100644 index 0000000000..0486a4f68a --- /dev/null +++ b/src/generated/resources/data/rankine/tags/items/rtg.json @@ -0,0 +1,10 @@ +{ + "replace": false, + "values": [ + "rankine:strontium_rtg", + "rankine:polonium_rtg", + "rankine:plutonium_rtg", + "rankine:americium_rtg", + "rankine:curium_rtg" + ] +} \ No newline at end of file diff --git a/src/main/java/com/cannolicatfish/rankine/ProjectRankine.java b/src/main/java/com/cannolicatfish/rankine/ProjectRankine.java index c87bc1a2bb..bacf1669de 100644 --- a/src/main/java/com/cannolicatfish/rankine/ProjectRankine.java +++ b/src/main/java/com/cannolicatfish/rankine/ProjectRankine.java @@ -170,7 +170,6 @@ public static void onItemColorRegistry(final ColorHandlerEvent.Item event) { event.getItemColors().register(new AlloyItemColor(), RankineItems.ALLOY_KNIFE::get); event.getItemColors().register(new AlloyItemColor(), RankineItems.ALLOY_CROWBAR::get); event.getItemColors().register(new AlloyItemColor(), RankineItems.ALLOY_BLUNDERBUSS::get); - event.getItemColors().register(new AlloyItemColor(), RankineItems.ALLOY_SURF_ROD::get); event.getItemColors().register(new TemplateItemColor(), RankineItems.ALLOY_TEMPLATE::get); event.getItemColors().register(new AlloyItemColor(), RankineItems.ALLOY_HELMET::get); event.getItemColors().register(new AlloyItemColor(), RankineItems.ALLOY_CHESTPLATE::get); diff --git a/src/main/java/com/cannolicatfish/rankine/blocks/batterycharger/BatteryChargerBlock.java b/src/main/java/com/cannolicatfish/rankine/blocks/batterycharger/BatteryChargerBlock.java new file mode 100644 index 0000000000..9fe9d46ad6 --- /dev/null +++ b/src/main/java/com/cannolicatfish/rankine/blocks/batterycharger/BatteryChargerBlock.java @@ -0,0 +1,82 @@ +package com.cannolicatfish.rankine.blocks.batterycharger; + +import com.cannolicatfish.rankine.init.RankineBlockEntityTypes; +import net.minecraft.core.BlockPos; +import net.minecraft.server.level.ServerPlayer; +import net.minecraft.world.Containers; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.MenuProvider; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.context.BlockPlaceContext; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.BaseEntityBlock; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.RenderShape; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityTicker; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.properties.BlockStateProperties; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraftforge.network.NetworkHooks; +import org.jetbrains.annotations.Nullable; + +public class BatteryChargerBlock extends BaseEntityBlock { + public BatteryChargerBlock(Properties properties) { + super(properties); + } + + @Override + public InteractionResult use(BlockState state, Level world, BlockPos pos, Player player, InteractionHand hand, BlockHitResult result) { + if (!world.isClientSide) { + BlockEntity tileEntity = world.getBlockEntity(pos); + if (tileEntity instanceof MenuProvider) { + NetworkHooks.openGui((ServerPlayer) player, (MenuProvider) tileEntity, tileEntity.getBlockPos()); + } else { + throw new IllegalStateException("Our named container provider is missing!"); + } + return InteractionResult.CONSUME; + } else + { + return InteractionResult.SUCCESS; + } + } + + public BlockState getStateForPlacement(BlockPlaceContext context) { + return this.defaultBlockState().setValue(BlockStateProperties.FACING, context.getNearestLookingDirection()); + } + + @Override + protected void createBlockStateDefinition(StateDefinition.Builder builder) { + builder.add(BlockStateProperties.FACING); + } + + public void onRemove(BlockState state, Level worldIn, BlockPos pos, BlockState newState, boolean isMoving) { + if (!state.is(newState.getBlock())) { + BlockEntity tileentity = worldIn.getBlockEntity(pos); + if (tileentity instanceof BatteryChargerTile) { + Containers.dropContents(worldIn, pos, (BatteryChargerTile)tileentity); + worldIn.updateNeighbourForOutputSignal(pos, this); + } + super.onRemove(state, worldIn, pos, newState, isMoving); + } + } + + public RenderShape getRenderShape(BlockState p_49232_) { + return RenderShape.MODEL; + } + + @Nullable + @Override + public BlockEntity newBlockEntity(BlockPos p_153215_, BlockState p_153216_) { + return new BatteryChargerTile(p_153215_,p_153216_); + } + + @javax.annotation.Nullable + @Override + public BlockEntityTicker getTicker(Level worldIn, BlockState blockStateIn, BlockEntityType blockEntityTypeIn) { + return worldIn.isClientSide ? null : createTickerHelper(blockEntityTypeIn, RankineBlockEntityTypes.BATTERY_CHARGER.get(), BatteryChargerTile::tick); + } +} diff --git a/src/main/java/com/cannolicatfish/rankine/blocks/batterycharger/BatteryChargerContainer.java b/src/main/java/com/cannolicatfish/rankine/blocks/batterycharger/BatteryChargerContainer.java new file mode 100644 index 0000000000..5533c216df --- /dev/null +++ b/src/main/java/com/cannolicatfish/rankine/blocks/batterycharger/BatteryChargerContainer.java @@ -0,0 +1,143 @@ +package com.cannolicatfish.rankine.blocks.batterycharger; + +import com.cannolicatfish.rankine.init.RankineBlocks; +import net.minecraft.core.BlockPos; +import net.minecraft.world.Container; +import net.minecraft.world.SimpleContainer; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.*; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; +import net.minecraftforge.items.IItemHandler; +import net.minecraftforge.items.SlotItemHandler; +import net.minecraftforge.items.wrapper.InvWrapper; + +import static com.cannolicatfish.rankine.init.RankineBlocks.BATTERY_CHARGER_CONTAINER; + +public class BatteryChargerContainer extends AbstractContainerMenu { + private BlockEntity tileEntity; + private Player playerEntity; + private IItemHandler playerInventory; + private final ContainerData data; + + public BatteryChargerContainer(int windowId, Level world, BlockPos pos, Inventory playerInventory, Player player) { + this(windowId,world,pos,playerInventory,player,new SimpleContainer(6), new SimpleContainerData(2)); + + } + public BatteryChargerContainer(int windowId, Level world, BlockPos pos, Inventory playerInventory, Player player, Container furnaceInventoryIn, ContainerData towerData) { + super(BATTERY_CHARGER_CONTAINER, windowId); + tileEntity = world.getBlockEntity(pos); + checkContainerSize(furnaceInventoryIn, 6); + checkContainerDataCount(towerData, 2); + this.playerEntity = player; + this.data = towerData; + this.playerInventory = new InvWrapper(playerInventory); + + this.addSlot(new Slot(furnaceInventoryIn, 0, 38, 25)); + this.addSlot(new Slot(furnaceInventoryIn, 1, 81, 25)); + this.addSlot(new Slot(furnaceInventoryIn, 2, 124, 25)); + this.addSlot(new Slot(furnaceInventoryIn, 3, 38, 45)); + this.addSlot(new Slot(furnaceInventoryIn, 4, 81, 45)); + this.addSlot(new Slot(furnaceInventoryIn, 5, 124, 45)); + + layoutPlayerInventorySlots(8, 70); + this.addDataSlots(towerData); + } + + @OnlyIn(Dist.CLIENT) + public int getSignalPower(){ + return this.data.get(0); + } + + @OnlyIn(Dist.CLIENT) + public int getSignalMultiplier(){ + return this.data.get(1); + } + + + @OnlyIn(Dist.CLIENT) + public int getSignalPowerScaled(int pixels) + { + int i = getSignalPower(); + return i != 0 ? i * pixels / 15 : 0; + } + + @Override + public boolean stillValid(Player playerIn) { + return stillValid(ContainerLevelAccess.create(tileEntity.getLevel(), tileEntity.getBlockPos()), playerEntity, RankineBlocks.BATTERY_CHARGER.get()); + } + + @Override + public ItemStack quickMoveStack(Player playerIn, int index) { + ItemStack itemstack = ItemStack.EMPTY; + Slot slot = this.slots.get(index); + if (slot != null && slot.hasItem()) { + ItemStack stack = slot.getItem(); + itemstack = stack.copy(); + if (index <= 5) { + if (!this.moveItemStackTo(stack, 5, 41, true)) { + return ItemStack.EMPTY; + } + slot.onQuickCraft(stack, itemstack); + } else { + if (index < 32) { + if (!this.moveItemStackTo(stack, 32, 41, false)) { + return ItemStack.EMPTY; + } + } else if (index < 41 && !this.moveItemStackTo(stack, 5, 32, false)) { + return ItemStack.EMPTY; + } + } + + if (stack.isEmpty()) { + slot.set(ItemStack.EMPTY); + } else { + slot.setChanged(); + } + + if (stack.getCount() == itemstack.getCount()) { + return ItemStack.EMPTY; + } + + slot.onTake(playerIn, stack); + } + + return itemstack; + } + + private int addSlotRange(IItemHandler handler, int index, int x, int y, int amount, int dx) { + for (int i = 0 ; i < amount ; i++) { + addSlot(new SlotItemHandler(handler, index, x, y)); + x += dx; + index++; + } + return index; + } + + private int addSlotBox(IItemHandler handler, int index, int x, int y, int horAmount, int dx, int verAmount, int dy) { + for (int j = 0 ; j < verAmount ; j++) { + index = addSlotRange(handler, index, x, y, horAmount, dx); + y += dy; + } + return index; + } + + private void layoutPlayerInventorySlots(int leftCol, int topRow) { + // Player inventory + addSlotBox(playerInventory, 9, leftCol, topRow, 9, 18, 3, 18); + + // Hotbar + topRow += 58; + addSlotRange(playerInventory, 0, leftCol, topRow, 9, 18); + } + + public int getOutputSlot() { + return 0; + } + + +} diff --git a/src/main/java/com/cannolicatfish/rankine/blocks/batterycharger/BatteryChargerScreen.java b/src/main/java/com/cannolicatfish/rankine/blocks/batterycharger/BatteryChargerScreen.java new file mode 100644 index 0000000000..529be63a93 --- /dev/null +++ b/src/main/java/com/cannolicatfish/rankine/blocks/batterycharger/BatteryChargerScreen.java @@ -0,0 +1,46 @@ +package com.cannolicatfish.rankine.blocks.batterycharger; + +import com.cannolicatfish.rankine.ProjectRankine; +import com.mojang.blaze3d.systems.RenderSystem; +import com.mojang.blaze3d.vertex.PoseStack; +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.screens.inventory.AbstractContainerScreen; +import net.minecraft.client.renderer.GameRenderer; +import net.minecraft.network.chat.Component; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.entity.player.Inventory; + +public class BatteryChargerScreen extends AbstractContainerScreen{ + private ResourceLocation GUI = new ResourceLocation(ProjectRankine.MODID, "textures/gui/battery_charger.png"); + public BatteryChargerScreen(BatteryChargerContainer screenContainer, Inventory inv, Component titleIn) { + super(screenContainer, inv, titleIn); + } + + @Override + public void render(PoseStack matrixStack, int mouseX, int mouseY, float partialTicks) { + this.renderBackground(matrixStack); + super.render(matrixStack, mouseX, mouseY, partialTicks); + this.renderTooltip(matrixStack, mouseX, mouseY); + } + + @Override + protected void renderBg(PoseStack p_230450_1_, float p_230450_2_, int p_230450_3_, int p_230450_4_) { + RenderSystem.setShader(GameRenderer::getPositionTexShader); + RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); + RenderSystem.setShaderTexture(0, this.GUI); + int relX = (this.width - this.imageWidth) / 2; + int relY = (this.height - this.imageHeight) / 2; + this.blit(p_230450_1_,relX, relY, 0, 0, this.imageWidth, this.imageHeight); + + int l = this.menu.getSignalPowerScaled(30); + if (l > 0) { + this.blit(p_230450_1_,this.leftPos + 10, this.topPos + 5, 179, 0, 16, 16); + } + this.blit(p_230450_1_,this.leftPos + 10, this.topPos + 25, 179, 16, 16, 30-l); + } + + @Override + protected void renderLabels(PoseStack p_230451_1_, int p_230451_2_, int p_230451_3_) { + drawCenteredString(p_230451_1_, Minecraft.getInstance().font, "Battery Holder", 92, 10, 0xffffff); + } +} \ No newline at end of file diff --git a/src/main/java/com/cannolicatfish/rankine/blocks/batterycharger/BatteryChargerTile.java b/src/main/java/com/cannolicatfish/rankine/blocks/batterycharger/BatteryChargerTile.java new file mode 100644 index 0000000000..82f5bfb323 --- /dev/null +++ b/src/main/java/com/cannolicatfish/rankine/blocks/batterycharger/BatteryChargerTile.java @@ -0,0 +1,241 @@ +package com.cannolicatfish.rankine.blocks.batterycharger; + +import com.cannolicatfish.rankine.items.BatteryItem; +import com.cannolicatfish.rankine.items.RTGItem; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.core.NonNullList; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.TextComponent; +import net.minecraft.world.ContainerHelper; +import net.minecraft.world.MenuProvider; +import net.minecraft.world.WorldlyContainer; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.inventory.ContainerData; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.DaylightDetectorBlock; +import net.minecraft.world.level.block.LightningRodBlock; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.state.BlockState; + +import javax.annotation.Nullable; + +import static com.cannolicatfish.rankine.init.RankineBlocks.BATTERY_CHARGER_TILE; + + +public class BatteryChargerTile extends BlockEntity implements WorldlyContainer, MenuProvider { + + private static final int[] SLOTS_UP = new int[]{0,1,2,3,4,5}; + private static final int[] SLOTS_DOWN = new int[]{0,1,2,3,4,5}; + private static final int[] SLOTS_HORIZONTAL = new int[]{0,1,2,3,4,5}; + + private int signalPower; + + private int signalMultiplier; + + protected NonNullList items = NonNullList.withSize(6,ItemStack.EMPTY); + private final ContainerData holderData = new ContainerData(){ + public int get(int index) + { + switch(index) + { + case 0: + return BatteryChargerTile.this.signalPower; + case 1: + return BatteryChargerTile.this.signalMultiplier; + default: + return 0; + } + } + public void set(int index, int value) + { + switch(index) + { + case 0: + BatteryChargerTile.this.signalPower = value; + break; + case 1: + BatteryChargerTile.this.signalMultiplier = value; + break; + } + } + public int getCount() { + return 2; + } + }; + + public BatteryChargerTile(BlockPos posIn, BlockState stateIn) { + super(BATTERY_CHARGER_TILE, posIn, stateIn); + } + + @Override + public void load(CompoundTag nbt) { + super.load(nbt); + this.items = NonNullList.withSize(this.getContainerSize(), ItemStack.EMPTY); + ContainerHelper.loadAllItems(nbt,this.items); + this.signalPower = nbt.getInt("SignalPower"); + this.signalMultiplier = nbt.getInt("SignalMultiplier"); + } + + @Override + public void saveAdditional(CompoundTag compound) { + super.saveAdditional(compound); + ContainerHelper.saveAllItems(compound, this.items); + compound.putInt("SignalPower", this.signalPower); + compound.putInt("SignalMultiplier", this.signalMultiplier); + } + + public static void tick(Level level, BlockPos pos, BlockState state, BatteryChargerTile tile) { + if (level != null) { + tile.signalPower = 0; + tile.signalMultiplier = 1; + for (Direction d : Direction.values()) { + BlockState bs = level.getBlockState(pos.relative(d)); + if (!d.equals(Direction.UP) && !d.equals(Direction.DOWN) && bs.getBlock() instanceof LightningRodBlock && bs.hasProperty(LightningRodBlock.POWERED) && bs.getValue(LightningRodBlock.POWERED)) { + tile.signalMultiplier += 32; + } + if (d.equals(Direction.UP) && bs.getBlock() instanceof DaylightDetectorBlock && bs.hasProperty(DaylightDetectorBlock.POWER)) { + tile.signalPower = bs.getValue(DaylightDetectorBlock.POWER); + } + } + if (tile.signalPower > 0) { + + if (level.getDayTime() % 400 == 0 || tile.signalMultiplier > 1) { + for (ItemStack stack : tile.items) { + if (stack.getItem() instanceof BatteryItem && !(stack.getItem() instanceof RTGItem) && stack.getDamageValue() != 0) { + stack.setDamageValue(Math.max(0,stack.getDamageValue() - tile.signalPower * tile.signalMultiplier)); + } + } + } + + } + } + + } + + net.minecraftforge.common.util.LazyOptional[] handlers = + net.minecraftforge.items.wrapper.SidedInvWrapper.create(this, Direction.UP, Direction.DOWN, Direction.NORTH); + + @Override + public net.minecraftforge.common.util.LazyOptional getCapability(net.minecraftforge.common.capabilities.Capability capability, @Nullable Direction facing) { + if (!this.remove && facing != null && capability == net.minecraftforge.items.CapabilityItemHandler.ITEM_HANDLER_CAPABILITY) { + if (facing == Direction.UP) + return handlers[0].cast(); + else if (facing == Direction.DOWN) + return handlers[1].cast(); + else + return handlers[2].cast(); + } + return super.getCapability(capability, facing); + } + + @Override + public void setRemoved() { + super.setRemoved(); + for (int x = 0; x < handlers.length; x++) + handlers[x].invalidate(); + } + + @Override + public Component getDisplayName() { + return new TextComponent(getType().getRegistryName().getPath()); + } + + @Override + @Nullable + public AbstractContainerMenu createMenu(int i, Inventory playerInventory, Player playerEntity) { + return new BatteryChargerContainer(i, level, worldPosition, playerInventory, playerEntity, this, this.holderData); + } + + @Override + public int[] getSlotsForFace(Direction side) { + if (side == Direction.DOWN) { + return SLOTS_DOWN; + } else { + return side == Direction.UP ? SLOTS_UP : SLOTS_HORIZONTAL; + } + } + + @Override + public boolean canPlaceItemThroughFace(int index, ItemStack itemStackIn, @Nullable Direction direction) { + return this.canPlaceItem(index, itemStackIn); + } + + @Override + public boolean canTakeItemThroughFace(int index, ItemStack stack, Direction direction) { + if (stack.getItem() instanceof BatteryItem && !(stack.getItem() instanceof RTGItem)) { + return stack.getDamageValue() == 0; + } + return true; + } + + @Override + public int getContainerSize() { + return this.items.size(); + } + + @Override + public boolean isEmpty() { + for(ItemStack itemstack : this.items) { + if (!itemstack.isEmpty()) { + return false; + } + } + + return true; + } + + @Override + public ItemStack getItem(int index) { + return this.items.get(index); + } + + @Override + public ItemStack removeItem(int index, int count) { + return ContainerHelper.removeItem(this.items, index, count); + } + + @Override + public ItemStack removeItemNoUpdate(int index) { + return ContainerHelper.takeItem(this.items, index); + } + + @Override + public void setItem(int index, ItemStack stack) { + ItemStack itemstack = this.items.get(index); + boolean flag = !stack.isEmpty() && stack.sameItem(itemstack) && ItemStack.tagMatches(stack, itemstack); + this.items.set(index, stack); + if (stack.getCount() > this.getMaxStackSize()) { + stack.setCount(this.getMaxStackSize()); + } + + if (index == 0 && !flag) { + this.setChanged(); + } + } + + @Override + public boolean stillValid(Player player) { + if (this.level.getBlockEntity(this.worldPosition) != this) { + return false; + } else { + return player.distanceToSqr((double)this.worldPosition.getX() + 0.5D, (double)this.worldPosition.getY() + 0.5D, (double)this.worldPosition.getZ() + 0.5D) <= 64.0D; + } + } + + @Override + public boolean canPlaceItem(int index, ItemStack stack) { + return stack.getItem() instanceof BatteryItem; + } + + @Override + public void clearContent() { + this.items.clear(); + } + + +} diff --git a/src/main/java/com/cannolicatfish/rankine/blocks/cauldrons/AbstractRankineCauldronBlock.java b/src/main/java/com/cannolicatfish/rankine/blocks/cauldrons/AbstractRankineCauldronBlock.java index 34fab09b9f..c68ce96b75 100644 --- a/src/main/java/com/cannolicatfish/rankine/blocks/cauldrons/AbstractRankineCauldronBlock.java +++ b/src/main/java/com/cannolicatfish/rankine/blocks/cauldrons/AbstractRankineCauldronBlock.java @@ -24,6 +24,7 @@ import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; import net.minecraft.world.level.pathfinder.PathComputationType; import net.minecraft.world.phys.BlockHitResult; import net.minecraft.world.phys.HitResult; @@ -133,6 +134,9 @@ public void animateTick(BlockState stateIn, Level levelIn, BlockPos posIn, Rando public abstract Item getBottle(); public abstract Item getOutput(); + public abstract Fluid getFluid(); + + public abstract Fluid getTransformFluid(); private static InteractionResult fillBottle(Level levelIn, BlockPos posIn, Player playerIn, InteractionHand handIn, ItemStack stackIn, ItemStack bottleOut, SoundEvent soundIn) { if (!levelIn.isClientSide) { diff --git a/src/main/java/com/cannolicatfish/rankine/blocks/cauldrons/JugloneCauldronBlock.java b/src/main/java/com/cannolicatfish/rankine/blocks/cauldrons/JugloneCauldronBlock.java index 02665eb181..f4e46300f7 100644 --- a/src/main/java/com/cannolicatfish/rankine/blocks/cauldrons/JugloneCauldronBlock.java +++ b/src/main/java/com/cannolicatfish/rankine/blocks/cauldrons/JugloneCauldronBlock.java @@ -1,8 +1,11 @@ package com.cannolicatfish.rankine.blocks.cauldrons; +import com.cannolicatfish.rankine.init.RankineFluids; import com.cannolicatfish.rankine.init.RankineItems; import net.minecraft.world.item.Item; import net.minecraft.world.item.Items; +import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.Fluids; public class JugloneCauldronBlock extends AbstractRankineCauldronBlock { @@ -14,4 +17,13 @@ public Item getBottle() { public Item getOutput() { return Items.BROWN_DYE; } + @Override + public Fluid getFluid() { + return RankineFluids.JUGLONE; + } + + @Override + public Fluid getTransformFluid() { + return Fluids.EMPTY; + } } diff --git a/src/main/java/com/cannolicatfish/rankine/blocks/cauldrons/LatexCauldronBlock.java b/src/main/java/com/cannolicatfish/rankine/blocks/cauldrons/LatexCauldronBlock.java index 4d69ad200e..5434537fdf 100644 --- a/src/main/java/com/cannolicatfish/rankine/blocks/cauldrons/LatexCauldronBlock.java +++ b/src/main/java/com/cannolicatfish/rankine/blocks/cauldrons/LatexCauldronBlock.java @@ -1,7 +1,10 @@ package com.cannolicatfish.rankine.blocks.cauldrons; +import com.cannolicatfish.rankine.init.RankineFluids; import com.cannolicatfish.rankine.init.RankineItems; import net.minecraft.world.item.Item; +import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.Fluids; public class LatexCauldronBlock extends AbstractRankineCauldronBlock { @@ -13,4 +16,14 @@ public Item getBottle() { public Item getOutput() { return RankineItems.DRY_RUBBER.get(); } + + @Override + public Fluid getFluid() { + return RankineFluids.LATEX; + } + + @Override + public Fluid getTransformFluid() { + return Fluids.EMPTY; + } } diff --git a/src/main/java/com/cannolicatfish/rankine/blocks/cauldrons/MapleSapCauldronBlock.java b/src/main/java/com/cannolicatfish/rankine/blocks/cauldrons/MapleSapCauldronBlock.java index 5f9eaf736a..0e6811d385 100644 --- a/src/main/java/com/cannolicatfish/rankine/blocks/cauldrons/MapleSapCauldronBlock.java +++ b/src/main/java/com/cannolicatfish/rankine/blocks/cauldrons/MapleSapCauldronBlock.java @@ -1,7 +1,10 @@ package com.cannolicatfish.rankine.blocks.cauldrons; +import com.cannolicatfish.rankine.init.RankineFluids; import com.cannolicatfish.rankine.init.RankineItems; import net.minecraft.world.item.Item; +import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.Fluids; public class MapleSapCauldronBlock extends AbstractRankineCauldronBlock { @@ -13,4 +16,14 @@ public Item getBottle() { public Item getOutput() { return RankineItems.MAPLE_SYRUP.get(); } + + @Override + public Fluid getFluid() { + return RankineFluids.MAPLE_SAP; + } + + @Override + public Fluid getTransformFluid() { + return Fluids.EMPTY; + } } diff --git a/src/main/java/com/cannolicatfish/rankine/blocks/cauldrons/MapleSyrupCauldronBlock.java b/src/main/java/com/cannolicatfish/rankine/blocks/cauldrons/MapleSyrupCauldronBlock.java index 506de664b4..d5097e687d 100644 --- a/src/main/java/com/cannolicatfish/rankine/blocks/cauldrons/MapleSyrupCauldronBlock.java +++ b/src/main/java/com/cannolicatfish/rankine/blocks/cauldrons/MapleSyrupCauldronBlock.java @@ -2,6 +2,8 @@ import com.cannolicatfish.rankine.init.RankineItems; import net.minecraft.world.item.Item; +import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.Fluids; public class MapleSyrupCauldronBlock extends AbstractRankineCauldronBlock { @@ -13,4 +15,14 @@ public Item getBottle() { public Item getOutput() { return null; } + + @Override + public Fluid getFluid() { + return null; + } + + @Override + public Fluid getTransformFluid() { + return Fluids.EMPTY; + } } diff --git a/src/main/java/com/cannolicatfish/rankine/blocks/cauldrons/ResinCauldronBlock.java b/src/main/java/com/cannolicatfish/rankine/blocks/cauldrons/ResinCauldronBlock.java index 9ba328a18c..7ccb610bd0 100644 --- a/src/main/java/com/cannolicatfish/rankine/blocks/cauldrons/ResinCauldronBlock.java +++ b/src/main/java/com/cannolicatfish/rankine/blocks/cauldrons/ResinCauldronBlock.java @@ -1,7 +1,10 @@ package com.cannolicatfish.rankine.blocks.cauldrons; +import com.cannolicatfish.rankine.init.RankineFluids; import com.cannolicatfish.rankine.init.RankineItems; import net.minecraft.world.item.Item; +import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.Fluids; public class ResinCauldronBlock extends AbstractRankineCauldronBlock { @@ -13,4 +16,14 @@ public Item getBottle() { public Item getOutput() { return RankineItems.AMBER.get(); } + + @Override + public Fluid getFluid() { + return RankineFluids.RESIN; + } + + @Override + public Fluid getTransformFluid() { + return Fluids.EMPTY; + } } diff --git a/src/main/java/com/cannolicatfish/rankine/blocks/cauldrons/SapCauldronBlock.java b/src/main/java/com/cannolicatfish/rankine/blocks/cauldrons/SapCauldronBlock.java index 73ed55f324..cf228141b2 100644 --- a/src/main/java/com/cannolicatfish/rankine/blocks/cauldrons/SapCauldronBlock.java +++ b/src/main/java/com/cannolicatfish/rankine/blocks/cauldrons/SapCauldronBlock.java @@ -1,8 +1,11 @@ package com.cannolicatfish.rankine.blocks.cauldrons; +import com.cannolicatfish.rankine.init.RankineFluids; import com.cannolicatfish.rankine.init.RankineItems; import net.minecraft.world.item.Item; import net.minecraft.world.item.Items; +import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.Fluids; public class SapCauldronBlock extends AbstractRankineCauldronBlock { @@ -14,4 +17,14 @@ public Item getBottle() { public Item getOutput() { return Items.SUGAR; } + + @Override + public Fluid getFluid() { + return RankineFluids.SAP; + } + + @Override + public Fluid getTransformFluid() { + return Fluids.EMPTY; + } } diff --git a/src/main/java/com/cannolicatfish/rankine/blocks/fusionfurnace/FusionFurnaceTile.java b/src/main/java/com/cannolicatfish/rankine/blocks/fusionfurnace/FusionFurnaceTile.java index 8cebf9b7ff..9ca1c75e33 100644 --- a/src/main/java/com/cannolicatfish/rankine/blocks/fusionfurnace/FusionFurnaceTile.java +++ b/src/main/java/com/cannolicatfish/rankine/blocks/fusionfurnace/FusionFurnaceTile.java @@ -45,7 +45,7 @@ public class FusionFurnaceTile extends BlockEntity implements WorldlyContainer, private static final int[] SLOTS_UP = new int[]{0,1,2,3}; private static final int[] SLOTS_DOWN = new int[]{2,4,5,6}; private static final int[] SLOTS_HORIZONTAL = new int[]{2,3}; - private final int powerCost = 1; + private final int powerCost = Config.MACHINES.FUSION_FURNACE_POWER.get(); public FusionFurnaceTile(BlockPos posIn, BlockState stateIn) { super(FUSION_FURNACE_TILE, posIn, stateIn); } diff --git a/src/main/java/com/cannolicatfish/rankine/blocks/sedimentfan/SedimentFanTile.java b/src/main/java/com/cannolicatfish/rankine/blocks/sedimentfan/SedimentFanTile.java index 5d6f5e146b..35851451de 100644 --- a/src/main/java/com/cannolicatfish/rankine/blocks/sedimentfan/SedimentFanTile.java +++ b/src/main/java/com/cannolicatfish/rankine/blocks/sedimentfan/SedimentFanTile.java @@ -1,27 +1,24 @@ package com.cannolicatfish.rankine.blocks.sedimentfan; -import com.cannolicatfish.rankine.init.Config; import com.cannolicatfish.rankine.init.RankineBlocks; import com.cannolicatfish.rankine.init.RankineRecipeTypes; import com.cannolicatfish.rankine.init.RankineSoundEvents; import com.cannolicatfish.rankine.recipe.RockGeneratorRecipe; import com.cannolicatfish.rankine.util.RockGeneratorUtils; import com.mojang.datafixers.DataFixUtils; -import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.material.Fluid; -import net.minecraft.world.level.material.Fluids; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.core.particles.ParticleTypes; +import net.minecraft.sounds.SoundEvents; +import net.minecraft.sounds.SoundSource; import net.minecraft.world.SimpleContainer; import net.minecraft.world.item.BlockItem; import net.minecraft.world.item.ItemStack; -import net.minecraft.core.particles.ParticleTypes; -import net.minecraft.world.level.block.entity.BlockEntity; -import net.minecraft.core.Direction; -import net.minecraft.sounds.SoundSource; -import net.minecraft.sounds.SoundEvents; -import net.minecraft.Util; -import net.minecraft.core.BlockPos; import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.material.FluidState; +import net.minecraft.world.level.material.Fluids; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; @@ -40,52 +37,29 @@ public SedimentFanTile(BlockPos posIn, BlockState stateIn) { public static void tick(Level level, BlockPos pos, BlockState bs, SedimentFanTile tile) { if (!level.isAreaLoaded(tile.worldPosition, 1) || level.getGameTime() % 20 != 0) return; - List adjPos = Arrays.asList(level.getFluidState(tile.worldPosition.south().above()).getType(),level.getFluidState(tile.worldPosition.north().above()).getType(), level.getFluidState(tile.worldPosition.west().above()).getType(),level.getFluidState(tile.worldPosition.east().above()).getType()); - if (level.getFluidState(tile.worldPosition.above()).isSource()) { - Direction dir = null; - if (adjPos.contains(Fluids.FLOWING_WATER)) - switch (adjPos.indexOf(Fluids.FLOWING_WATER)) { - case 0: - dir = Direction.SOUTH; - break; - case 1: - dir = Direction.NORTH; - break; - case 2: - dir = Direction.WEST; - break; - case 3: - dir = Direction.EAST; - break; - } - - if (dir != null) { - List waterChecks = Arrays.asList(level.getFluidState(tile.worldPosition.above().relative(dir, 2)).getType(), level.getFluidState(tile.worldPosition.above().relative(dir, 3)).getType()); - if (waterChecks.stream().allMatch((e) -> e == Fluids.FLOWING_WATER)) { - Block sediment = level.getBlockState(tile.worldPosition.relative(dir)).getBlock(); - Block sediment2 = level.getBlockState(tile.worldPosition.relative(dir, 2)).getBlock(); - List adjPos2 = Arrays.asList(sediment,sediment2); - BlockPos end = tile.worldPosition.above().relative(dir, 3); - ItemStack[] items = adjPos2.stream().map(ItemStack::new).toArray(ItemStack[]::new); - RockGeneratorRecipe recipe = level.getRecipeManager().getAllRecipesFor(RankineRecipeTypes.ROCK_GENERATOR).stream().flatMap((r) -> { - if (r.getGenType().equals(RockGeneratorUtils.RockGenType.SEDIMENTARY)) { - return DataFixUtils.orElseGet(RankineRecipeTypes.ROCK_GENERATOR.tryMatch(r, level, new SimpleContainer(items)).map(Stream::of),Stream::empty); - } - return null; - }).findFirst().orElse(null); - if (recipe != null) { - ItemStack output = recipe.getResultItem(); - if (!output.isEmpty() && output.getItem() instanceof BlockItem) { - level.setBlock(end, ((BlockItem) output.getItem()).getBlock().defaultBlockState(), 19); - level.playSound(null,end, RankineSoundEvents.SEDIMENT_FAN_GEN.get(), SoundSource.BLOCKS,1.0f,1.0f); - } - } else { - level.setBlock(end, RankineBlocks.BRECCIA.get().defaultBlockState(), 19); - level.playSound(null, end, SoundEvents.SAND_HIT, SoundSource.BLOCKS, 1.0f, 1.0f); + List dir = Arrays.asList(Direction.NORTH,Direction.SOUTH,Direction.EAST,Direction.WEST); + List adjPos = Arrays.asList(level.getBlockState(pos.north()), level.getBlockState(pos.south()),level.getBlockState(pos.east()),level.getBlockState(pos.west())); + List waterPos = Arrays.asList(level.getFluidState(pos.relative(Direction.NORTH,2)), level.getFluidState(pos.relative(Direction.SOUTH,2)),level.getFluidState(pos.relative(Direction.EAST,2)),level.getFluidState(pos.relative(Direction.WEST,2))); + for (int i = 0; i < adjPos.size(); i++) { + BlockState adjState = adjPos.get(i); + FluidState adjWater = waterPos.get(i); + if (adjWater.is(Fluids.WATER) || adjWater.is(Fluids.FLOWING_WATER)) { + RockGeneratorRecipe recipe = level.getRecipeManager().getAllRecipesFor(RankineRecipeTypes.ROCK_GENERATOR).stream().flatMap((r) -> { + if (r.getGenType().equals(RockGeneratorUtils.RockGenType.SEDIMENTARY)) { + return DataFixUtils.orElseGet(RankineRecipeTypes.ROCK_GENERATOR.tryMatch(r, level, new SimpleContainer(adjState.getBlock().asItem().getDefaultInstance())).map(Stream::of),Stream::empty); } - if (level.getRandom().nextFloat() < Config.GENERAL.ROCK_GENERATOR_REMOVAL_CHANCE.get()) { - level.removeBlock(tile.worldPosition.relative(dir,level.random.nextBoolean() ? 1 : 2),false); + return null; + }).findFirst().orElse(null); + if (recipe != null) { + ItemStack output = recipe.getResultItem(); + if (!output.isEmpty() && output.getItem() instanceof BlockItem) { + level.setBlock(pos.relative(dir.get(i),2), ((BlockItem) output.getItem()).getBlock().defaultBlockState(), 19); + level.playSound(null,pos.relative(dir.get(i),2), RankineSoundEvents.SEDIMENT_FAN_GEN.get(), SoundSource.BLOCKS,1.0f,1.0f); } + level.removeBlock(pos.relative(dir.get(i)),false); + } else { + level.setBlock(pos.relative(dir.get(i),2), RankineBlocks.BRECCIA.get().defaultBlockState(), 19); + level.playSound(null, pos.relative(dir.get(i),2), SoundEvents.SAND_HIT, SoundSource.BLOCKS, 1.0f, 1.0f); } } } diff --git a/src/main/java/com/cannolicatfish/rankine/client/integration/jei/JEIRankinePlugin.java b/src/main/java/com/cannolicatfish/rankine/client/integration/jei/JEIRankinePlugin.java index 7f20357fe9..8f375c6a26 100644 --- a/src/main/java/com/cannolicatfish/rankine/client/integration/jei/JEIRankinePlugin.java +++ b/src/main/java/com/cannolicatfish/rankine/client/integration/jei/JEIRankinePlugin.java @@ -8,16 +8,18 @@ import com.cannolicatfish.rankine.blocks.inductionfurnace.InductionFurnaceScreen; import com.cannolicatfish.rankine.blocks.mixingbarrel.MixingBarrelScreen; import com.cannolicatfish.rankine.client.integration.jei.categories.*; +import com.cannolicatfish.rankine.client.integration.jei.recipes.IBatteryRecipe; +import com.cannolicatfish.rankine.client.integration.jei.recipes.IRankineCauldronRecipe; +import com.cannolicatfish.rankine.client.integration.jei.recipes.RankineJEIRecipes; import com.cannolicatfish.rankine.init.RankineBlocks; import com.cannolicatfish.rankine.init.RankineItems; import com.cannolicatfish.rankine.init.RankineLists; +import com.cannolicatfish.rankine.init.RankineTags; import com.cannolicatfish.rankine.items.alloys.IAlloyItem; -import com.cannolicatfish.rankine.recipe.BeehiveOvenRecipe; -import com.cannolicatfish.rankine.recipe.CrushingRecipe; -import com.cannolicatfish.rankine.recipe.ElementRecipe; -import com.cannolicatfish.rankine.recipe.ForagingRecipe; +import com.cannolicatfish.rankine.recipe.*; import mezz.jei.api.IModPlugin; import mezz.jei.api.JeiPlugin; +import mezz.jei.api.constants.VanillaTypes; import mezz.jei.api.helpers.IGuiHelper; import mezz.jei.api.recipe.RecipeType; import mezz.jei.api.registration.*; @@ -25,6 +27,7 @@ import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.Items; +import net.minecraft.world.item.crafting.Ingredient; import net.minecraft.world.item.crafting.Recipe; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Blocks; @@ -36,9 +39,28 @@ @JeiPlugin public class JEIRankinePlugin implements IModPlugin { - private static final RecipeType CRUSHING = RecipeType.create("rankine","crushing", CrushingRecipe.class); - private static final RecipeType FORAGING = RecipeType.create("rankine","foraging", ForagingRecipe.class); - private static final RecipeType BEEHIVE_OVEN = RecipeType.create("rankine","beehive_oven", BeehiveOvenRecipe.class); + public static final RecipeType AIR_DISTILLATION = RecipeType.create("rankine","air_distillation", AirDistillationRecipe.class); + public static final RecipeType ALLOYING = RecipeType.create("rankine","alloying", AlloyingRecipe.class); + public static final RecipeType BATTERY = RecipeType.create("rankine","battery", IBatteryRecipe.class); + public static final RecipeType BEEHIVE_OVEN = RecipeType.create("rankine","beehive_oven", BeehiveOvenRecipe.class); + public static final RecipeType CAULDRON_DRYING = RecipeType.create("rankine","cauldron_drying", IRankineCauldronRecipe.class); + public static final RecipeType CRUCIBLE = RecipeType.create("rankine","crucible", CrucibleRecipe.class); + public static final RecipeType CRUSHING = RecipeType.create("rankine","crushing", CrushingRecipe.class); + public static final RecipeType ELEMENT = RecipeType.create("rankine","element", ElementRecipe.class); + public static final RecipeType EVAPORATION = RecipeType.create("rankine","evaporation", EvaporationRecipe.class); + public static final RecipeType EXTRUSIVE_IGNEOUS = RecipeType.create("rankine","extrusive_igneous", RockGeneratorRecipe.class); + public static final RecipeType FORAGING = RecipeType.create("rankine","foraging", ForagingRecipe.class); + public static final RecipeType FUSION_FURNACE = RecipeType.create("rankine","fusion_furnace", FusionFurnaceRecipe.class); + public static final RecipeType INDUCTION_ALLOYING = RecipeType.create("rankine","induction_alloying", AlloyingRecipe.class); + public static final RecipeType INTRUSIVE_IGNEOUS = RecipeType.create("rankine","intrusive_igneous", RockGeneratorRecipe.class); + public static final RecipeType METAMORPHIC = RecipeType.create("rankine","metamorphic", RockGeneratorRecipe.class); + public static final RecipeType MIXING = RecipeType.create("rankine","mixing", MixingRecipe.class); + public static final RecipeType SEDIMENTARY = RecipeType.create("rankine","sedimentary", RockGeneratorRecipe.class); + public static final RecipeType SLUICING = RecipeType.create("rankine","sluicing", SluicingRecipe.class); + public static final RecipeType STRIPPING = RecipeType.create("rankine","stripping", StrippingRecipe.class); + public static final RecipeType TREETAPPING = RecipeType.create("rankine","treetapping", TreetappingRecipe.class); + public static final RecipeType VOLCANIC = RecipeType.create("rankine","volcanic", RockGeneratorRecipe.class); + @Nonnull @Override public ResourceLocation getPluginUid() { @@ -47,12 +69,12 @@ public ResourceLocation getPluginUid() { @Override public void registerGuiHandlers(IGuiHandlerRegistration registration) { - registration.addRecipeClickArea(AlloyFurnaceScreen.class, 98, 32, 24, 16, AlloyingRecipeCategory.UID); - registration.addRecipeClickArea(InductionFurnaceScreen.class, 98, 32, 24, 16, AlloyingRecipeCategory.UID); - registration.addRecipeClickArea(EvaporationTowerScreen.class, 76, 50, 24, 16, EvaporationRecipeCategory.UID); - registration.addRecipeClickArea(CrucibleScreen.class, 109, 46, 7, 26, CrucibleRecipeCategory.UID); - registration.addRecipeClickArea(MixingBarrelScreen.class, 109, 46, 7, 26, MixingRecipeCategory.UID); - registration.addRecipeClickArea(FusionFurnaceScreen.class, 78, 34, 24, 16, FusionFurnaceRecipeCategory.UID); + registration.addRecipeClickArea(AlloyFurnaceScreen.class, 98, 32, 24, 16, ALLOYING); + registration.addRecipeClickArea(InductionFurnaceScreen.class, 98, 32, 24, 16, INDUCTION_ALLOYING); + registration.addRecipeClickArea(EvaporationTowerScreen.class, 76, 50, 24, 16, EVAPORATION); + registration.addRecipeClickArea(CrucibleScreen.class, 109, 46, 7, 26, CRUCIBLE); + registration.addRecipeClickArea(MixingBarrelScreen.class, 109, 46, 7, 26, MIXING); + registration.addRecipeClickArea(FusionFurnaceScreen.class, 78, 34, 24, 16, FUSION_FURNACE); } @@ -70,58 +92,81 @@ private static > List getSortedRecipes(List recipes) { return recipes; } + private static List getSortedBatteryRecipes(List recipes) { + final Comparator BY_ID = Comparator.comparing(IBatteryRecipe::getBatteryCharge); + recipes.sort(BY_ID); + return recipes; + } + @Override public void registerRecipes(@Nonnull IRecipeRegistration registry) { RankineJEIRecipes rankineJEIRecipes = new RankineJEIRecipes(); + registry.addRecipes(AIR_DISTILLATION, getSortedRecipes(rankineJEIRecipes.getAirDistillationRecipes())); + registry.addRecipes(ALLOYING, getSortedRecipes(rankineJEIRecipes.getAlloyingRecipes())); + registry.addRecipes(BEEHIVE_OVEN, getSortedRecipes(rankineJEIRecipes.getBeehiveRecipes())); + registry.addRecipes(CRUCIBLE, getSortedRecipes(rankineJEIRecipes.getCrucibleRecipes())); registry.addRecipes(CRUSHING, getSortedRecipes(rankineJEIRecipes.getCrushingRecipes())); + registry.addRecipes(ELEMENT, getSortedElementRecipes()); + registry.addRecipes(EVAPORATION, getSortedRecipes(rankineJEIRecipes.getEvaporationRecipes())); + registry.addRecipes(EXTRUSIVE_IGNEOUS, getSortedRecipes(rankineJEIRecipes.getExtrusiveGeneratorRecipes())); registry.addRecipes(FORAGING, getSortedRecipes(rankineJEIRecipes.getForagingRecipes())); - registry.addRecipes(BEEHIVE_OVEN, getSortedRecipes(rankineJEIRecipes.getBeehiveRecipes())); - registry.addRecipes(getSortedRecipes(rankineJEIRecipes.getMixingRecipes()), MixingRecipeCategory.UID); - registry.addRecipes(getSortedRecipes(rankineJEIRecipes.getSluicingRecipes()), SluicingRecipeCategory.UID); - registry.addRecipes(getSortedRecipes(rankineJEIRecipes.getEvaporationRecipes()), EvaporationRecipeCategory.UID); - registry.addRecipes(getSortedRecipes(rankineJEIRecipes.getAlloyFurnaceRecipes()), AlloyingRecipeCategory.UID); + registry.addRecipes(FUSION_FURNACE, getSortedRecipes(rankineJEIRecipes.getFusionFurnaceRecipes())); + registry.addRecipes(INDUCTION_ALLOYING, getSortedRecipes(rankineJEIRecipes.getInductionFurnaceRecipes())); + registry.addRecipes(INTRUSIVE_IGNEOUS, getSortedRecipes(rankineJEIRecipes.getIntrusiveGeneratorRecipes())); + registry.addRecipes(METAMORPHIC, getSortedRecipes(rankineJEIRecipes.getMetamorphicGeneratorRecipes())); + registry.addRecipes(MIXING, getSortedRecipes(rankineJEIRecipes.getMixingRecipes())); + registry.addRecipes(SEDIMENTARY, getSortedRecipes(rankineJEIRecipes.getSedimentaryGeneratorRecipes())); + registry.addRecipes(SLUICING, getSortedRecipes(rankineJEIRecipes.getSluicingRecipes())); + registry.addRecipes(STRIPPING, getSortedRecipes(rankineJEIRecipes.getStrippingRecipes())); + registry.addRecipes(TREETAPPING, getSortedRecipes(rankineJEIRecipes.getTreetappingRecipes())); + registry.addRecipes(VOLCANIC, getSortedRecipes(rankineJEIRecipes.getVolcanicGeneratorRecipes())); + registry.addRecipes(BATTERY,getSortedBatteryRecipes(rankineJEIRecipes.getBatteryRecipes())); + registry.addRecipes(CAULDRON_DRYING,rankineJEIRecipes.getCauldronRecipes()); + /*registry.addRecipes(getSortedRecipes(rankineJEIRecipes.getAlloyFurnaceRecipes()), AlloyingRecipeCategory.UID); registry.addRecipes(getSortedRecipes(rankineJEIRecipes.getInductionFurnaceRecipes()), InductionAlloyingRecipeCategory.UID); - registry.addRecipes(getSortedRecipes(rankineJEIRecipes.getFusionFurnaceRecipes()), FusionFurnaceRecipeCategory.UID); - registry.addRecipes(getSortedRecipes(rankineJEIRecipes.getTreetappingRecipes()), TreetappingRecipeCategory.UID); - registry.addRecipes(getSortedRecipes(rankineJEIRecipes.getStrippingRecipes()), StrippingRecipeCategory.UID); - registry.addRecipes(getSortedElementRecipes(), ElementRecipeCategory.UID); - registry.addRecipes(getSortedRecipes(rankineJEIRecipes.getCrucibleRecipes()), CrucibleRecipeCategory.UID); registry.addRecipes(getSortedRecipes(rankineJEIRecipes.getIntrusiveGeneratorRecipes()), IntrusiveGeneratorRecipeCategory.UID); registry.addRecipes(getSortedRecipes(rankineJEIRecipes.getExtrusiveGeneratorRecipes()), ExtrusiveGeneratorRecipeCategory.UID); registry.addRecipes(getSortedRecipes(rankineJEIRecipes.getSedimentaryGeneratorRecipes()), SedimentaryGeneratorRecipeCategory.UID); registry.addRecipes(getSortedRecipes(rankineJEIRecipes.getMetamorphicGeneratorRecipes()), MetamorphicGeneratorRecipeCategory.UID); - registry.addRecipes(getSortedRecipes(rankineJEIRecipes.getVolcanicGeneratorRecipes()), VolcanicGeneratorRecipeCategory.UID); - registry.addRecipes(getSortedRecipes(rankineJEIRecipes.getAirDistillationRecipes()), AirDistillationRecipeCategory.UID); + registry.addRecipes(getSortedRecipes(rankineJEIRecipes.getVolcanicGeneratorRecipes()), VolcanicGeneratorRecipeCategory.UID);*/ + + /*registry.addIngredientInfo(new ItemStack(RankineItems.DRY_RUBBER.get()), VanillaTypes.ITEM_STACK,new TranslatableComponent("rankine.jei.info_dry_rubber")); + registry.addIngredientInfo(new ItemStack(RankineItems.AMBER.get()), VanillaTypes.ITEM_STACK,new TranslatableComponent("rankine.jei.info_amber")); + + registry.addIngredientInfo(new FluidStack(RankineFluids.SAP,1000), ForgeTypes.FLUID_STACK,new TranslatableComponent("rankine.jei.info_sap")); + registry.addIngredientInfo(new FluidStack(RankineFluids.MAPLE_SAP,1000), ForgeTypes.FLUID_STACK,new TranslatableComponent("rankine.jei.info_maple_sap")); + registry.addIngredientInfo(new FluidStack(RankineFluids.LATEX,1000), ForgeTypes.FLUID_STACK,new TranslatableComponent("rankine.jei.info_latex")); + registry.addIngredientInfo(new FluidStack(RankineFluids.RESIN,1000), ForgeTypes.FLUID_STACK,new TranslatableComponent("rankine.jei.info_resin")); + registry.addIngredientInfo(new FluidStack(RankineFluids.JUGLONE,1000), ForgeTypes.FLUID_STACK,new TranslatableComponent("rankine.jei.info_juglone"));*/ } @Override public void registerItemSubtypes(ISubtypeRegistration registration) { - registration.registerSubtypeInterpreter(RankineItems.ALLOY_DUST.get(), (ingredient, context) -> IAlloyItem.getSubtype(ingredient)); - registration.registerSubtypeInterpreter(RankineItems.ALLOY_GEAR.get(), (ingredient, context) -> IAlloyItem.getSubtype(ingredient)); - registration.registerSubtypeInterpreter(RankineItems.ALLOY_BLOCK.get(), (ingredient, context) -> IAlloyItem.getSubtype(ingredient)); - registration.registerSubtypeInterpreter(RankineItems.ALLOY_INGOT.get(), (ingredient, context) -> IAlloyItem.getSubtype(ingredient)); - registration.registerSubtypeInterpreter(RankineItems.ALLOY_NUGGET.get(), (ingredient, context) -> IAlloyItem.getSubtype(ingredient)); - registration.registerSubtypeInterpreter(RankineItems.ALLOY_PLATE.get(), (ingredient, context) -> IAlloyItem.getSubtype(ingredient)); - registration.registerSubtypeInterpreter(RankineItems.ALLOY_ROD.get(), (ingredient, context) -> IAlloyItem.getSubtype(ingredient)); - registration.registerSubtypeInterpreter(RankineItems.ALLOY_WIRE.get(), (ingredient, context) -> IAlloyItem.getSubtype(ingredient)); - - registration.registerSubtypeInterpreter(RankineItems.ALLOY_PICKAXE.get(), (ingredient, context) -> IAlloyItem.getSubtype(ingredient)); - registration.registerSubtypeInterpreter(RankineItems.ALLOY_AXE.get(), (ingredient, context) -> IAlloyItem.getSubtype(ingredient)); - registration.registerSubtypeInterpreter(RankineItems.ALLOY_SHOVEL.get(), (ingredient, context) -> IAlloyItem.getSubtype(ingredient)); - registration.registerSubtypeInterpreter(RankineItems.ALLOY_SWORD.get(), (ingredient, context) -> IAlloyItem.getSubtype(ingredient)); - registration.registerSubtypeInterpreter(RankineItems.ALLOY_HOE.get(), (ingredient, context) -> IAlloyItem.getSubtype(ingredient)); - registration.registerSubtypeInterpreter(RankineItems.ALLOY_SPEAR.get(), (ingredient, context) -> IAlloyItem.getSubtype(ingredient)); - registration.registerSubtypeInterpreter(RankineItems.ALLOY_HAMMER.get(), (ingredient, context) -> IAlloyItem.getSubtype(ingredient)); - registration.registerSubtypeInterpreter(RankineItems.ALLOY_KNIFE.get(), (ingredient, context) -> IAlloyItem.getSubtype(ingredient)); - registration.registerSubtypeInterpreter(RankineItems.ALLOY_CROWBAR.get(), (ingredient, context) -> IAlloyItem.getSubtype(ingredient)); - registration.registerSubtypeInterpreter(RankineItems.ALLOY_BLUNDERBUSS.get(), (ingredient, context) -> IAlloyItem.getSubtype(ingredient)); - registration.registerSubtypeInterpreter(RankineItems.ALLOY_SURF_ROD.get(), (ingredient, context) -> IAlloyItem.getSubtype(ingredient)); - - registration.registerSubtypeInterpreter(RankineItems.ALLOY_HELMET.get(), (ingredient, context) -> IAlloyItem.getSubtype(ingredient)); - registration.registerSubtypeInterpreter(RankineItems.ALLOY_CHESTPLATE.get(), (ingredient, context) -> IAlloyItem.getSubtype(ingredient)); - registration.registerSubtypeInterpreter(RankineItems.ALLOY_LEGGINGS.get(), (ingredient, context) -> IAlloyItem.getSubtype(ingredient)); - registration.registerSubtypeInterpreter(RankineItems.ALLOY_BOOTS.get(), (ingredient, context) -> IAlloyItem.getSubtype(ingredient)); - registration.registerSubtypeInterpreter(RankineItems.ALLOY_ARROW.get(), (ingredient, context) -> IAlloyItem.getSubtype(ingredient)); + registration.registerSubtypeInterpreter(VanillaTypes.ITEM_STACK,RankineItems.ALLOY_DUST.get(), (ingredient, context) -> IAlloyItem.getSubtype(ingredient)); + registration.registerSubtypeInterpreter(VanillaTypes.ITEM_STACK,RankineItems.ALLOY_GEAR.get(), (ingredient, context) -> IAlloyItem.getSubtype(ingredient)); + registration.registerSubtypeInterpreter(VanillaTypes.ITEM_STACK,RankineItems.ALLOY_BLOCK.get(), (ingredient, context) -> IAlloyItem.getSubtype(ingredient)); + registration.registerSubtypeInterpreter(VanillaTypes.ITEM_STACK,RankineItems.ALLOY_INGOT.get(), (ingredient, context) -> IAlloyItem.getSubtype(ingredient)); + registration.registerSubtypeInterpreter(VanillaTypes.ITEM_STACK,RankineItems.ALLOY_NUGGET.get(), (ingredient, context) -> IAlloyItem.getSubtype(ingredient)); + registration.registerSubtypeInterpreter(VanillaTypes.ITEM_STACK,RankineItems.ALLOY_PLATE.get(), (ingredient, context) -> IAlloyItem.getSubtype(ingredient)); + registration.registerSubtypeInterpreter(VanillaTypes.ITEM_STACK,RankineItems.ALLOY_ROD.get(), (ingredient, context) -> IAlloyItem.getSubtype(ingredient)); + registration.registerSubtypeInterpreter(VanillaTypes.ITEM_STACK,RankineItems.ALLOY_WIRE.get(), (ingredient, context) -> IAlloyItem.getSubtype(ingredient)); + + registration.registerSubtypeInterpreter(VanillaTypes.ITEM_STACK,RankineItems.ALLOY_PICKAXE.get(), (ingredient, context) -> IAlloyItem.getSubtype(ingredient)); + registration.registerSubtypeInterpreter(VanillaTypes.ITEM_STACK,RankineItems.ALLOY_AXE.get(), (ingredient, context) -> IAlloyItem.getSubtype(ingredient)); + registration.registerSubtypeInterpreter(VanillaTypes.ITEM_STACK,RankineItems.ALLOY_SHOVEL.get(), (ingredient, context) -> IAlloyItem.getSubtype(ingredient)); + registration.registerSubtypeInterpreter(VanillaTypes.ITEM_STACK,RankineItems.ALLOY_SWORD.get(), (ingredient, context) -> IAlloyItem.getSubtype(ingredient)); + registration.registerSubtypeInterpreter(VanillaTypes.ITEM_STACK,RankineItems.ALLOY_HOE.get(), (ingredient, context) -> IAlloyItem.getSubtype(ingredient)); + registration.registerSubtypeInterpreter(VanillaTypes.ITEM_STACK,RankineItems.ALLOY_SPEAR.get(), (ingredient, context) -> IAlloyItem.getSubtype(ingredient)); + registration.registerSubtypeInterpreter(VanillaTypes.ITEM_STACK,RankineItems.ALLOY_HAMMER.get(), (ingredient, context) -> IAlloyItem.getSubtype(ingredient)); + registration.registerSubtypeInterpreter(VanillaTypes.ITEM_STACK,RankineItems.ALLOY_KNIFE.get(), (ingredient, context) -> IAlloyItem.getSubtype(ingredient)); + registration.registerSubtypeInterpreter(VanillaTypes.ITEM_STACK,RankineItems.ALLOY_CROWBAR.get(), (ingredient, context) -> IAlloyItem.getSubtype(ingredient)); + registration.registerSubtypeInterpreter(VanillaTypes.ITEM_STACK,RankineItems.ALLOY_BLUNDERBUSS.get(), (ingredient, context) -> IAlloyItem.getSubtype(ingredient)); + + registration.registerSubtypeInterpreter(VanillaTypes.ITEM_STACK,RankineItems.ALLOY_HELMET.get(), (ingredient, context) -> IAlloyItem.getSubtype(ingredient)); + registration.registerSubtypeInterpreter(VanillaTypes.ITEM_STACK,RankineItems.ALLOY_CHESTPLATE.get(), (ingredient, context) -> IAlloyItem.getSubtype(ingredient)); + registration.registerSubtypeInterpreter(VanillaTypes.ITEM_STACK,RankineItems.ALLOY_LEGGINGS.get(), (ingredient, context) -> IAlloyItem.getSubtype(ingredient)); + registration.registerSubtypeInterpreter(VanillaTypes.ITEM_STACK,RankineItems.ALLOY_BOOTS.get(), (ingredient, context) -> IAlloyItem.getSubtype(ingredient)); + registration.registerSubtypeInterpreter(VanillaTypes.ITEM_STACK,RankineItems.ALLOY_ARROW.get(), (ingredient, context) -> IAlloyItem.getSubtype(ingredient)); } @Override @@ -146,6 +191,8 @@ public void registerCategories(IRecipeCategoryRegistration registry) { registry.addRecipeCategories(new AirDistillationRecipeCategory(guiHelper)); registry.addRecipeCategories(new TreetappingRecipeCategory(guiHelper)); registry.addRecipeCategories(new StrippingRecipeCategory(guiHelper)); + registry.addRecipeCategories(new BatteryRecipeCategory(guiHelper)); + registry.addRecipeCategories(new CauldronDryingRecipeCategory(guiHelper)); } @Override @@ -153,12 +200,18 @@ public void registerRecipeCatalysts(IRecipeCatalystRegistration registry) { for (Item item: RankineLists.HAMMERS) { registry.addRecipeCatalyst(new ItemStack(item), CRUSHING); } + for (ItemStack stack : Ingredient.of(RankineTags.Items.AXES).getItems()) { + registry.addRecipeCatalyst(stack, STRIPPING); + } for (Block blk: RankineLists.CRUSHING_HEADS) { registry.addRecipeCatalyst(new ItemStack(blk), CRUSHING); } for (Item item : RankineLists.FORAGING_TOOLS) { registry.addRecipeCatalyst(new ItemStack(item), FORAGING); } + for (ItemStack stack : Ingredient.of(RankineTags.Items.GOLD_PANS).getItems()) { + registry.addRecipeCatalyst(stack, SLUICING); + } registry.addRecipeCatalyst(new ItemStack(RankineItems.FLINT_SHOVEL.get()), FORAGING); registry.addRecipeCatalyst(new ItemStack(RankineBlocks.BEEHIVE_OVEN_PIT.get()), BEEHIVE_OVEN); @@ -166,23 +219,26 @@ public void registerRecipeCatalysts(IRecipeCatalystRegistration registry) { registry.addRecipeCatalyst(new ItemStack(RankineItems.HIGH_REFRACTORY_BRICKS.get()),BEEHIVE_OVEN); registry.addRecipeCatalyst(new ItemStack(RankineItems.ULTRA_HIGH_REFRACTORY_BRICKS.get()),BEEHIVE_OVEN); - registry.addRecipeCatalyst(new ItemStack(RankineBlocks.MIXING_BARREL.get()), MixingRecipeCategory.UID); - registry.addRecipeCatalyst(new ItemStack(RankineBlocks.ALLOY_FURNACE.get()), AlloyingRecipeCategory.UID); - registry.addRecipeCatalyst(new ItemStack(RankineBlocks.INDUCTION_FURNACE.get()), InductionAlloyingRecipeCategory.UID); - registry.addRecipeCatalyst(new ItemStack(RankineBlocks.FUSION_FURNACE.get()), FusionFurnaceRecipeCategory.UID); - - registry.addRecipeCatalyst(new ItemStack(RankineItems.STEEL_GOLD_PAN.get()), SluicingRecipeCategory.UID); - registry.addRecipeCatalyst(new ItemStack(RankineItems.ELEMENT_INDEXER.get()), ElementRecipeCategory.UID); - registry.addRecipeCatalyst(new ItemStack(RankineBlocks.EVAPORATION_TOWER.get()), EvaporationRecipeCategory.UID); - registry.addRecipeCatalyst(new ItemStack(RankineBlocks.CRUCIBLE_BLOCK.get()), CrucibleRecipeCategory.UID); - registry.addRecipeCatalyst(new ItemStack(Blocks.COBBLESTONE), IntrusiveGeneratorRecipeCategory.UID); - registry.addRecipeCatalyst(new ItemStack(Blocks.BLACKSTONE), ExtrusiveGeneratorRecipeCategory.UID); - registry.addRecipeCatalyst(new ItemStack(RankineBlocks.BRECCIA.get()), SedimentaryGeneratorRecipeCategory.UID); - registry.addRecipeCatalyst(new ItemStack(RankineBlocks.SKARN.get()), MetamorphicGeneratorRecipeCategory.UID); - registry.addRecipeCatalyst(new ItemStack(Blocks.OBSIDIAN), VolcanicGeneratorRecipeCategory.UID); - registry.addRecipeCatalyst(new ItemStack(RankineBlocks.DISTILLATION_TOWER.get()), AirDistillationRecipeCategory.UID); - registry.addRecipeCatalyst(new ItemStack(RankineBlocks.TREE_TAP.get()), TreetappingRecipeCategory.UID); - registry.addRecipeCatalyst(new ItemStack(Items.IRON_AXE), StrippingRecipeCategory.UID); + registry.addRecipeCatalyst(new ItemStack(RankineBlocks.MIXING_BARREL.get()), MIXING); + registry.addRecipeCatalyst(new ItemStack(RankineBlocks.ALLOY_FURNACE.get()), ALLOYING); + registry.addRecipeCatalyst(new ItemStack(RankineBlocks.INDUCTION_FURNACE.get()), INDUCTION_ALLOYING); + registry.addRecipeCatalyst(new ItemStack(RankineBlocks.FUSION_FURNACE.get()), FUSION_FURNACE); + + registry.addRecipeCatalyst(new ItemStack(Items.CAULDRON), CAULDRON_DRYING); + + registry.addRecipeCatalyst(new ItemStack(RankineItems.ELEMENT_INDEXER.get()), ELEMENT); + registry.addRecipeCatalyst(new ItemStack(RankineBlocks.EVAPORATION_TOWER.get()), EVAPORATION); + registry.addRecipeCatalyst(new ItemStack(RankineBlocks.HEATING_ELEMENT_1.get()), EVAPORATION); + registry.addRecipeCatalyst(new ItemStack(RankineBlocks.CRUCIBLE_BLOCK.get()), CRUCIBLE); + registry.addRecipeCatalyst(new ItemStack(Blocks.COBBLESTONE), INTRUSIVE_IGNEOUS); + registry.addRecipeCatalyst(new ItemStack(Blocks.BLACKSTONE), EXTRUSIVE_IGNEOUS); + registry.addRecipeCatalyst(new ItemStack(RankineBlocks.BRECCIA.get()), SEDIMENTARY); + registry.addRecipeCatalyst(new ItemStack(RankineBlocks.SEDIMENT_FAN.get()), SEDIMENTARY); + registry.addRecipeCatalyst(new ItemStack(RankineBlocks.SKARN.get()), METAMORPHIC); + registry.addRecipeCatalyst(new ItemStack(Blocks.OBSIDIAN), VOLCANIC); + registry.addRecipeCatalyst(new ItemStack(RankineBlocks.DISTILLATION_TOWER.get()), AIR_DISTILLATION); + registry.addRecipeCatalyst(new ItemStack(RankineBlocks.AIR_DISTILLATION_PACKING.get()), AIR_DISTILLATION); + registry.addRecipeCatalyst(new ItemStack(RankineBlocks.TREE_TAP.get()), TREETAPPING); } } diff --git a/src/main/java/com/cannolicatfish/rankine/client/integration/jei/categories/AirDistillationRecipeCategory.java b/src/main/java/com/cannolicatfish/rankine/client/integration/jei/categories/AirDistillationRecipeCategory.java index f7d49b04d6..a2e3ed938c 100644 --- a/src/main/java/com/cannolicatfish/rankine/client/integration/jei/categories/AirDistillationRecipeCategory.java +++ b/src/main/java/com/cannolicatfish/rankine/client/integration/jei/categories/AirDistillationRecipeCategory.java @@ -4,28 +4,22 @@ import com.cannolicatfish.rankine.init.RankineBlocks; import com.cannolicatfish.rankine.init.RankineItems; import com.cannolicatfish.rankine.recipe.AirDistillationRecipe; -import com.google.common.collect.ImmutableList; import com.mojang.blaze3d.vertex.PoseStack; -import com.mojang.blaze3d.systems.RenderSystem; import mezz.jei.api.constants.VanillaTypes; -import mezz.jei.api.gui.IRecipeLayout; import mezz.jei.api.gui.builder.IRecipeLayoutBuilder; import mezz.jei.api.gui.drawable.IDrawable; +import mezz.jei.api.gui.ingredient.IRecipeSlotsView; import mezz.jei.api.helpers.IGuiHelper; -import mezz.jei.api.ingredients.IIngredients; import mezz.jei.api.recipe.IFocusGroup; import mezz.jei.api.recipe.RecipeIngredientRole; import mezz.jei.api.recipe.category.IRecipeCategory; -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.Font; import net.minecraft.client.resources.language.I18n; import net.minecraft.network.chat.Component; -import net.minecraft.world.item.ItemStack; -import net.minecraft.resources.ResourceLocation; import net.minecraft.network.chat.TextComponent; -import net.minecraftforge.fluids.FluidStack; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.item.ItemStack; -import java.util.Arrays; +import java.util.ArrayList; import java.util.List; public class AirDistillationRecipeCategory implements IRecipeCategory { @@ -33,22 +27,20 @@ public class AirDistillationRecipeCategory implements IRecipeCategory getRecipeClass() { return AirDistillationRecipe.class; @@ -66,85 +58,58 @@ public IDrawable getBackground() { @Override public IDrawable getIcon() { - return icon; + return guiHelper.createDrawableIngredient(VanillaTypes.ITEM_STACK,new ItemStack(RankineBlocks.DISTILLATION_TOWER.get())); } @Override - public void draw(AirDistillationRecipe recipe, PoseStack ms, double mouseX, double mouseY) { - Font font = Minecraft.getInstance().font; - //RenderSystem.enableAlphaTest(); - RenderSystem.enableBlend(); - overlay.draw(ms, 0, 4); - RenderSystem.disableBlend(); - //RenderSystem.disableAlphaTest(); - - int ymod = 0; - if (!recipe.getBiomeString().isEmpty()) { - StringBuilder str = new StringBuilder(); - str.append("Biomes: "); - int count = 1; - for (int i = 0; i < recipe.getBiomeString().size(); i++) { - str.append(recipe.getBiomeString().get(i)); - count++; - if (count == 3 || i == recipe.getBiomeString().size() - 1) { - font.draw(ms, str.toString(), (float)(ymod >= 50 ? 32 : 0), ymod, 0x000000); - count = 0; - ymod += 10; - str = new StringBuilder(); - } else if (i != recipe.getBiomeString().size() - 1) { - str.append(", "); + public List getTooltipStrings(AirDistillationRecipe recipe, IRecipeSlotsView recipeSlotsView, double mouseX, double mouseY) { + if (mouseX >= 95 && mouseX <= 110 && mouseY >= 116 && mouseY <= 131) { + List components = new ArrayList<>(); + if (recipe.getDims().isEmpty()) { + components.add(new TextComponent(I18n.get("rankine.jei.tooltip_dimension_info") + (I18n.get("rankine.jei.tooltip_any")))); + } else { + if (!recipe.getDims().isEmpty()) { + components.add(new TextComponent(I18n.get("rankine.jei.tooltip_dimension_info") + recipe.getDims().toString())); } } - - } - - ymod = 0; - if (!recipe.getDims().isEmpty()) { - StringBuilder str = new StringBuilder(); - str.append("Dims: "); - int count = 1; - for (int i = 0; i < recipe.getDims().size(); i++) { - str.append(recipe.getDims().get(i)); - count++; - if (count == 3 || i == recipe.getDims().size() - 1) { - font.draw(ms, str.toString(), (float)(ymod >= 50 ? 32 : 0), ymod, 0x000000); - count = 0; - ymod += 10; - str = new StringBuilder(); - } else if (i != recipe.getDims().size() - 1) { - str.append(", "); + if (recipe.getBiomes().isEmpty()) { + components.add(new TextComponent(I18n.get("rankine.jei.tooltip_biomes_info") + (I18n.get("rankine.jei.tooltip_any")))); + } else { + if (!recipe.getBiomes().isEmpty()) { + components.add(new TextComponent(I18n.get("rankine.jei.tooltip_biomes_info") + recipe.getBiomes().toString())); } } - + return components; } + return IRecipeCategory.super.getTooltipStrings(recipe, recipeSlotsView, mouseX, mouseY); } @Override - public void setIngredients(AirDistillationRecipe recipe, IIngredients iIngredients) { - iIngredients.setOutputs(VanillaTypes.ITEM, recipe.getRecipeOutputsJEI()); - } - - @Override - public void setRecipe(IRecipeLayout recipeLayout, AirDistillationRecipe recipe, IIngredients ingredients) { - int index = 0; - for (int i = 0; i < ingredients.getOutputs(VanillaTypes.ITEM).size(); i++) { - List stacks = ingredients.getOutputs(VanillaTypes.ITEM).get(i); - int scale = Math.floorDiv(i,2); - recipeLayout.getItemStacks().init(index, false, 85 - 44 * (i % 2), 122 - (8 * (i%2)) - (scale * 27)); - if (!stacks.contains(ItemStack.EMPTY) && stacks.stream().noneMatch((s) -> s.getItem() == RankineItems.ELEMENT.get())) { - recipeLayout.getItemStacks().set(index, stacks); + public void setRecipe(IRecipeLayoutBuilder builder, AirDistillationRecipe recipe, IFocusGroup focuses) { + List outputs = recipe.getRecipeOutputsJEI(); + int lcount = 0; + int rcount = 0; + int count = 0; + for (ItemStack stack : outputs) { + if (stack.getItem() != RankineItems.ELEMENT.get() && !stack.isEmpty()) { + if (count % 2 == 0) { + builder.addSlot(RecipeIngredientRole.OUTPUT,31,113 - 23*(lcount)).addItemStack(stack); + } else { + builder.addSlot(RecipeIngredientRole.OUTPUT,64,106 - 23*(rcount)).addItemStack(stack); + } } - index += 1; - } - - int endIndex = index; - recipeLayout.getItemStacks().addTooltipCallback((i, b, stack, list) -> { - if (i <= endIndex) { - list.add(new TextComponent("Chance: " + (recipe.getChances().get(i) * 100) + "%")); + if (count % 2 == 0) { + lcount++; + } else { + rcount++; } + count++; + } + } - }); - + @Override + public void draw(AirDistillationRecipe recipe, IRecipeSlotsView recipeSlotsView, PoseStack stack, double mouseX, double mouseY) { + IRecipeCategory.super.draw(recipe, recipeSlotsView, stack, mouseX, mouseY); } } diff --git a/src/main/java/com/cannolicatfish/rankine/client/integration/jei/categories/BatteryRecipeCategory.java b/src/main/java/com/cannolicatfish/rankine/client/integration/jei/categories/BatteryRecipeCategory.java new file mode 100644 index 0000000000..2fc0551e38 --- /dev/null +++ b/src/main/java/com/cannolicatfish/rankine/client/integration/jei/categories/BatteryRecipeCategory.java @@ -0,0 +1,132 @@ +package com.cannolicatfish.rankine.client.integration.jei.categories; + +import com.cannolicatfish.rankine.ProjectRankine; +import com.cannolicatfish.rankine.client.integration.jei.recipes.IBatteryRecipe; +import com.cannolicatfish.rankine.init.Config; +import com.cannolicatfish.rankine.items.RTGItem; +import com.google.common.cache.CacheBuilder; +import com.google.common.cache.CacheLoader; +import com.google.common.cache.LoadingCache; +import com.mojang.blaze3d.vertex.PoseStack; +import mezz.jei.api.gui.builder.IRecipeLayoutBuilder; +import mezz.jei.api.gui.drawable.IDrawable; +import mezz.jei.api.gui.drawable.IDrawableAnimated; +import mezz.jei.api.gui.drawable.IDrawableStatic; +import mezz.jei.api.gui.ingredient.IRecipeSlotsView; +import mezz.jei.api.helpers.IGuiHelper; +import mezz.jei.api.recipe.IFocusGroup; +import mezz.jei.api.recipe.RecipeIngredientRole; +import mezz.jei.api.recipe.category.IRecipeCategory; +import net.minecraft.ChatFormatting; +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.Font; +import net.minecraft.client.resources.language.I18n; +import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.TextComponent; +import net.minecraft.network.chat.TranslatableComponent; +import net.minecraft.resources.ResourceLocation; + +import java.util.ArrayList; +import java.util.List; + +public class BatteryRecipeCategory implements IRecipeCategory { + + public static ResourceLocation UID = new ResourceLocation(ProjectRankine.MODID, "battery"); + private final IDrawable background; + private final String localizedName; + private final IGuiHelper guiHelper; + + private final IDrawableStatic chargeTransparentBackground; + + private final LoadingCache cachedCharges; + + public BatteryRecipeCategory(IGuiHelper guiHelper) { + this.guiHelper = guiHelper; + Minecraft minecraft = Minecraft.getInstance(); + int backgroundHeight = 54; + localizedName = I18n.get("rankine.jei.battery"); + background = guiHelper.drawableBuilder(new ResourceLocation(ProjectRankine.MODID, "textures/gui/battery_jei.png"), 0, 0, 150,backgroundHeight) + .addPadding(0, 0, 0, 0) + .build(); + + chargeTransparentBackground = guiHelper.drawableBuilder(new ResourceLocation(ProjectRankine.MODID,"textures/gui/charge_icon.png"),0,0,14,14).setTextureSize(14,14).build(); + + this.cachedCharges = CacheBuilder.newBuilder() + .maximumSize(25) + .build(new CacheLoader<>() { + @Override + public IDrawableAnimated load(Integer burnTime) { + return guiHelper.drawableBuilder(new ResourceLocation(ProjectRankine.MODID,"textures/gui/battery_jei.png"), 238, 0, 18, 18) + .buildAnimated(burnTime, IDrawableAnimated.StartDirection.TOP, true); + } + }); + } + @SuppressWarnings("removal") + @Override + public ResourceLocation getUid() { + return UID; + } + @SuppressWarnings("removal") + @Override + public Class getRecipeClass() { + return IBatteryRecipe.class; + } + + @Override + public Component getTitle() { + return new TextComponent(localizedName); + } + + @Override + public IDrawable getBackground() { + return background; + } + + @Override + public IDrawable getIcon() { + return chargeTransparentBackground; + } + + @Override + public void draw(IBatteryRecipe recipe, IRecipeSlotsView recipeSlotsView, PoseStack poseStack, double mouseX, double mouseY) { + int burnTime = recipe.getBatteryCharge(); + IDrawableAnimated flame = cachedCharges.getUnchecked(burnTime); + flame.draw(poseStack, 1, 0); + Minecraft minecraft = Minecraft.getInstance(); + Font font = minecraft.font; + boolean rtg = recipe.getInputs().stream().findFirst().isPresent() && recipe.getInputs().stream().findFirst().get().getItem() instanceof RTGItem; + int count = 0; + for (Component c : createChargeCountText(rtg, burnTime)) { + font.draw(poseStack, c, 22, 17 + count, 0xFF808080); + count += 10; + } + + } + + @Override + public List getTooltipStrings(IBatteryRecipe recipe, IRecipeSlotsView recipeSlotsView, double mouseX, double mouseY) { + if (mouseX > 22 && mouseY >= 17 && mouseY <= 25) { + List components = new ArrayList<>(); + components.add(new TranslatableComponent("rankine.jei.info_battery_fusion",Math.floorDiv(recipe.getBatteryCharge(), Config.MACHINES.FUSION_FURNACE_POWER.get()))); + components.add(new TranslatableComponent("rankine.jei.info_battery_induction",Math.floorDiv(recipe.getBatteryCharge(), Config.MACHINES.INDUCTION_FURNACE_POWER.get()))); + return components; + } + return IRecipeCategory.super.getTooltipStrings(recipe, recipeSlotsView, mouseX, mouseY); + } + + @Override + public void setRecipe(IRecipeLayoutBuilder builder, IBatteryRecipe recipe, IFocusGroup focuses) { + builder.addSlot(RecipeIngredientRole.INPUT,1,17).addItemStacks(recipe.getInputs()); + } + + private static List createChargeCountText(boolean rtg, int charge) { + List components = new ArrayList<>(); + components.add(new TranslatableComponent("rankine.jei.info_battery_energy",charge).withStyle(ChatFormatting.BLACK)); + if (rtg) { + components.add(new TranslatableComponent("rankine.jei.info_battery_rtg").withStyle(ChatFormatting.DARK_RED)); + } else { + components.add(new TranslatableComponent("rankine.jei.info_battery_rechargeable").withStyle(ChatFormatting.DARK_GREEN)); + } + return components; + } +} diff --git a/src/main/java/com/cannolicatfish/rankine/client/integration/jei/categories/CauldronDryingRecipeCategory.java b/src/main/java/com/cannolicatfish/rankine/client/integration/jei/categories/CauldronDryingRecipeCategory.java new file mode 100644 index 0000000000..418d7ebd80 --- /dev/null +++ b/src/main/java/com/cannolicatfish/rankine/client/integration/jei/categories/CauldronDryingRecipeCategory.java @@ -0,0 +1,106 @@ +package com.cannolicatfish.rankine.client.integration.jei.categories; + +import com.cannolicatfish.rankine.ProjectRankine; +import com.cannolicatfish.rankine.client.integration.jei.recipes.IRankineCauldronRecipe; +import com.google.common.cache.CacheBuilder; +import com.google.common.cache.CacheLoader; +import com.google.common.cache.LoadingCache; +import mezz.jei.api.forge.ForgeTypes; +import mezz.jei.api.gui.builder.IRecipeLayoutBuilder; +import mezz.jei.api.gui.drawable.IDrawable; +import mezz.jei.api.gui.drawable.IDrawableAnimated; +import mezz.jei.api.gui.drawable.IDrawableStatic; +import mezz.jei.api.helpers.IGuiHelper; +import mezz.jei.api.recipe.IFocusGroup; +import mezz.jei.api.recipe.RecipeIngredientRole; +import mezz.jei.api.recipe.category.IRecipeCategory; +import net.minecraft.client.resources.language.I18n; +import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.TextComponent; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Items; + +public class CauldronDryingRecipeCategory implements IRecipeCategory { + + public static ResourceLocation UID = new ResourceLocation(ProjectRankine.MODID, "cauldron_drying"); + private final IDrawable background; + private final String localizedName; + private final IGuiHelper guiHelper; + + private final IDrawableStatic cauldronTransparentBackground; + private final LoadingCache cachedFlames; + private final LoadingCache cachedArrows; + + public CauldronDryingRecipeCategory(IGuiHelper guiHelper) { + this.guiHelper = guiHelper; + localizedName = I18n.get("rankine.jei.cauldron_drying"); + background = guiHelper.drawableBuilder(new ResourceLocation(ProjectRankine.MODID, "textures/gui/cauldron_drying_jei.png"), 0, 0, 138,62) + .addPadding(0, 0, 0, 0) + .build(); + + cauldronTransparentBackground = guiHelper.drawableBuilder(new ResourceLocation(ProjectRankine.MODID,"textures/gui/cauldron_drying_icon.png"),0,0,14,14).setTextureSize(14,14).build(); + + this.cachedFlames = CacheBuilder.newBuilder() + .maximumSize(25) + .build(new CacheLoader<>() { + @Override + public IDrawableAnimated load(Integer burnTime) { + return guiHelper.drawableBuilder(new ResourceLocation(ProjectRankine.MODID, "textures/gui/cauldron_drying_jei.png"), 232, 0, 14, 14) + .buildAnimated(burnTime, IDrawableAnimated.StartDirection.TOP, true); + } + }); + this.cachedArrows = CacheBuilder.newBuilder() + .maximumSize(25) + .build(new CacheLoader<>() { + @Override + public IDrawableAnimated load(Integer cookTime) { + return guiHelper.drawableBuilder(new ResourceLocation(ProjectRankine.MODID, "textures/gui/cauldron_drying_jei.png"), 232, 14, 24, 17) + .buildAnimated(cookTime, IDrawableAnimated.StartDirection.LEFT, false); + } + }); + } + @SuppressWarnings("removal") + @Override + public ResourceLocation getUid() { + return UID; + } + @SuppressWarnings("removal") + @Override + public Class getRecipeClass() { + return IRankineCauldronRecipe.class; + } + + @Override + public Component getTitle() { + return new TextComponent(localizedName); + } + + @Override + public IDrawable getBackground() { + return background; + } + + @Override + public IDrawable getIcon() { + return cauldronTransparentBackground; + } + + + + + @Override + public void setRecipe(IRecipeLayoutBuilder builder, IRankineCauldronRecipe recipe, IFocusGroup focuses) { + builder.addSlot(RecipeIngredientRole.INPUT,40,5).addIngredient(ForgeTypes.FLUID_STACK, recipe.getInputFluid()); + builder.addSlot(RecipeIngredientRole.INPUT,44,48).addItemStack(recipe.getFluidHolderItem()); + builder.addSlot(RecipeIngredientRole.CATALYST,62,32).addItemStack(new ItemStack(Items.CAULDRON)); + builder.addSlot(RecipeIngredientRole.OUTPUT,6,30).addItemStack(recipe.getHolderOutputItem()); + if (recipe.getOutputItem() != null) { + builder.addSlot(RecipeIngredientRole.OUTPUT,117,30).addItemStack(recipe.getOutputItem()); + } + if (recipe.getOutputFluid() != null) { + builder.addSlot(RecipeIngredientRole.OUTPUT,117,30).addIngredient(ForgeTypes.FLUID_STACK, recipe.getOutputFluid()); + } + } + +} diff --git a/src/main/java/com/cannolicatfish/rankine/client/integration/jei/categories/CrucibleRecipeCategory.java b/src/main/java/com/cannolicatfish/rankine/client/integration/jei/categories/CrucibleRecipeCategory.java index dcb446ed63..5602ca901c 100644 --- a/src/main/java/com/cannolicatfish/rankine/client/integration/jei/categories/CrucibleRecipeCategory.java +++ b/src/main/java/com/cannolicatfish/rankine/client/integration/jei/categories/CrucibleRecipeCategory.java @@ -1,51 +1,53 @@ package com.cannolicatfish.rankine.client.integration.jei.categories; import com.cannolicatfish.rankine.ProjectRankine; -import com.cannolicatfish.rankine.init.RankineBlocks; import com.cannolicatfish.rankine.init.RankineItems; import com.cannolicatfish.rankine.recipe.CrucibleRecipe; -import com.google.common.collect.ImmutableList; import com.mojang.blaze3d.vertex.PoseStack; -import com.mojang.blaze3d.systems.RenderSystem; import mezz.jei.api.constants.VanillaTypes; -import mezz.jei.api.gui.IRecipeLayout; +import mezz.jei.api.gui.builder.IRecipeLayoutBuilder; import mezz.jei.api.gui.drawable.IDrawable; +import mezz.jei.api.gui.ingredient.IRecipeSlotsView; import mezz.jei.api.helpers.IGuiHelper; -import mezz.jei.api.ingredients.IIngredients; +import mezz.jei.api.recipe.IFocusGroup; +import mezz.jei.api.recipe.RecipeIngredientRole; import mezz.jei.api.recipe.category.IRecipeCategory; +import net.minecraft.Util; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.Font; import net.minecraft.client.resources.language.I18n; import net.minecraft.network.chat.Component; import net.minecraft.network.chat.TextComponent; +import net.minecraft.network.chat.TranslatableComponent; +import net.minecraft.resources.ResourceLocation; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.crafting.Ingredient; -import net.minecraft.resources.ResourceLocation; -import java.util.Arrays; +import java.text.DecimalFormat; +import java.text.DecimalFormatSymbols; import java.util.List; +import java.util.Locale; public class CrucibleRecipeCategory implements IRecipeCategory { public static ResourceLocation UID = new ResourceLocation(ProjectRankine.MODID, "crucible"); private final IDrawable background; - private final String localizedName; - private final IDrawable overlay; - private final IDrawable icon; + private final IDrawable slotDrawable; + private final IGuiHelper guiHelper; public CrucibleRecipeCategory(IGuiHelper guiHelper) { - background = guiHelper.createBlankDrawable(185, 146); - localizedName = I18n.get("rankine.jei.crucible"); - overlay = guiHelper.createDrawable(new ResourceLocation(ProjectRankine.MODID, "textures/gui/crucible_jei.png"), - 0, 15, 180, 141); - icon = guiHelper.createDrawableIngredient(new ItemStack(RankineBlocks.CRUCIBLE_BLOCK.get())); + this.guiHelper = guiHelper; + background = guiHelper.drawableBuilder(new ResourceLocation(ProjectRankine.MODID, "textures/gui/crucible_jei.png"), 0, 0, 180, 140) + .addPadding(1, 0, 0, 0) + .build(); + slotDrawable = guiHelper.getSlotDrawable(); } - + @SuppressWarnings("removal") @Override public ResourceLocation getUid() { return UID; } - + @SuppressWarnings("removal") @Override public Class getRecipeClass() { return CrucibleRecipe.class; @@ -53,7 +55,7 @@ public Class getRecipeClass() { @Override public Component getTitle() { - return new TextComponent(localizedName); + return new TextComponent(I18n.get("rankine.jei.crucible")); } @Override @@ -63,60 +65,52 @@ public IDrawable getBackground() { @Override public IDrawable getIcon() { - return icon; + return guiHelper.createDrawableIngredient(VanillaTypes.ITEM_STACK,new ItemStack(RankineItems.CRUCIBLE.get())); } @Override - public void draw(CrucibleRecipe recipe, PoseStack ms, double mouseX, double mouseY) { + public void draw(CrucibleRecipe recipe, IRecipeSlotsView recipeSlotsView, PoseStack stack, double mouseX, double mouseY) { + List reqs = recipe.getRequired(); + DecimalFormat df = Util.make(new DecimalFormat("##.##"), (p_234699_0_) -> { + p_234699_0_.setDecimalFormatSymbols(DecimalFormatSymbols.getInstance(Locale.ROOT)); + }); Font font = Minecraft.getInstance().font; - //RenderSystem.enableAlphaTest(); - RenderSystem.enableBlend(); - overlay.draw(ms, 0, 4); - RenderSystem.disableBlend(); - //RenderSystem.disableAlphaTest(); + font.draw(stack,new TranslatableComponent("rankine.jei.tooltip_required"),120, 0, 0x000000); + font.draw(stack,new TranslatableComponent("rankine.jei.crucible_tooltip_additional",recipe.getRequired().stream().filter(aBoolean -> aBoolean).count()),1, 96, 0x000000); } @Override - public void setIngredients(CrucibleRecipe recipe, IIngredients iIngredients) { - ImmutableList.Builder> builder = ImmutableList.builder(); - for (Ingredient i : recipe.getCondensedIngredients()) { - builder.add(Arrays.asList(i.getItems())); - } - iIngredients.setInputLists(VanillaTypes.ITEM, builder.build()); - iIngredients.setOutputs(VanillaTypes.ITEM, Arrays.asList(recipe.getPrimaryOutput(),recipe.getSecondaryOutput())); - } + public void setRecipe(IRecipeLayoutBuilder builder, CrucibleRecipe recipe, IFocusGroup focuses) { + List ingredients = recipe.getCondensedIngredients(); + List reqs = recipe.getRequired(); + ItemStack output = recipe.getResultItem(); + int rcount = 0; + int nrcount = 0; + builder.addSlot(RecipeIngredientRole.OUTPUT,5,31).addItemStack(output); + builder.addSlot(RecipeIngredientRole.OUTPUT,5,31).addItemStack(recipe.getSecondaryOutput()); + for (int i = 0; i < ingredients.size(); i++) { + + if (i < 3) { + int x = 110; + int y = 12 + rcount * 18; + + if (!ingredients.get(i).test(RankineItems.ELEMENT.get().getDefaultInstance())) { + builder.addSlot(RecipeIngredientRole.INPUT, x, y).addIngredients(ingredients.get(i)) + .setBackground(slotDrawable, -1, -1); + + rcount++; + } - @Override - public void setRecipe(IRecipeLayout recipeLayout, CrucibleRecipe recipe, IIngredients ingredients) { - int index = 0; - for (int i = 0; i < ingredients.getInputs(VanillaTypes.ITEM).size(); i++) { - if (i < 4) { - recipeLayout.getItemStacks().init(i, false, 14 + 45*i, 44); } else { - int floor = Math.floorDiv(i - 4 ,10); - recipeLayout.getItemStacks().init(i, true, ((i-4) - (10*floor)) * 18 + 2, 80 + (16*floor)); - } - - if (!ingredients.getInputs(VanillaTypes.ITEM).get(i).contains(ItemStack.EMPTY) && ingredients.getInputs(VanillaTypes.ITEM).get(i).stream().noneMatch((s) -> s.getItem() == RankineItems.ELEMENT.get())) { - recipeLayout.getItemStacks().set(i, ingredients.getInputs(VanillaTypes.ITEM).get(i)); + if (!ingredients.get(i).equals(Ingredient.EMPTY) && !ingredients.get(i).test(RankineItems.ELEMENT.get().getDefaultInstance())) { + int x = nrcount <= 9 ? ((nrcount)*18) + 1 : ((nrcount-10)*18) + 1; + int y = nrcount <= 9 ? 106 : 124; + builder.addSlot(RecipeIngredientRole.INPUT,x,y).addIngredients(ingredients.get(i)); + nrcount++; + } } - index = i; - } - /* - int endIndex = ingredients.getInputs(VanillaTypes.ITEM).size(); - recipeLayout.getItemStacks().addTooltipCallback((i, b, stack, list) -> { - if (i < endIndex) { - list.add(new StringTextComponent("Min: " + Math.round(recipe.getMins().get(i) * 100) + "%")); - } - - }); -*/ - for (int i = 0; i < ingredients.getOutputs(VanillaTypes.ITEM).size(); i++) { - List stacks = ingredients.getOutputs(VanillaTypes.ITEM).get(i); - recipeLayout.getItemStacks().init(index + i + 1, false, 69 + 25 * i, 10); - recipeLayout.getItemStacks().set(index + i + 1, stacks); } } } diff --git a/src/main/java/com/cannolicatfish/rankine/client/integration/jei/categories/CrushingRecipeCategory.java b/src/main/java/com/cannolicatfish/rankine/client/integration/jei/categories/CrushingRecipeCategory.java index 387df71638..544601d679 100644 --- a/src/main/java/com/cannolicatfish/rankine/client/integration/jei/categories/CrushingRecipeCategory.java +++ b/src/main/java/com/cannolicatfish/rankine/client/integration/jei/categories/CrushingRecipeCategory.java @@ -2,15 +2,15 @@ import com.cannolicatfish.rankine.ProjectRankine; import com.cannolicatfish.rankine.init.RankineItems; +import com.cannolicatfish.rankine.init.RankineLists; import com.cannolicatfish.rankine.recipe.CrushingRecipe; import com.mojang.blaze3d.vertex.PoseStack; import mezz.jei.api.constants.VanillaTypes; import mezz.jei.api.gui.builder.IRecipeLayoutBuilder; +import mezz.jei.api.gui.builder.IRecipeSlotBuilder; import mezz.jei.api.gui.drawable.IDrawable; import mezz.jei.api.gui.ingredient.IRecipeSlotsView; import mezz.jei.api.helpers.IGuiHelper; -import mezz.jei.api.helpers.IJeiHelpers; -import mezz.jei.api.ingredients.IIngredientType; import mezz.jei.api.recipe.IFocusGroup; import mezz.jei.api.recipe.RecipeIngredientRole; import mezz.jei.api.recipe.category.IRecipeCategory; @@ -24,14 +24,13 @@ import net.minecraft.network.chat.TextComponent; import net.minecraft.resources.ResourceLocation; import net.minecraft.util.Tuple; -import net.minecraft.world.item.ItemStack; -import net.minecraft.world.item.Items; -import net.minecraft.world.item.Tier; -import net.minecraft.world.item.Tiers; +import net.minecraft.world.item.*; +import net.minecraft.world.item.crafting.Ingredient; import net.minecraftforge.common.TierSortingRegistry; import java.text.DecimalFormat; import java.text.DecimalFormatSymbols; +import java.util.Arrays; import java.util.List; import java.util.Locale; @@ -48,7 +47,7 @@ public class CrushingRecipeCategory implements IRecipeCategory { private final IDrawable netheriteDrawable; public CrushingRecipeCategory(IGuiHelper helper) { this.guiHelper = helper; - background = guiHelper.drawableBuilder(new ResourceLocation(ProjectRankine.MODID, "textures/gui/crushing_jei.png"), 0, 0, 170, 140) + background = guiHelper.drawableBuilder(new ResourceLocation(ProjectRankine.MODID, "textures/gui/crushing_jei.png"), 0, 0, 160, 140) .addPadding(1, 0, 0, 15) .build(); slotDrawable = guiHelper.getSlotDrawable(); @@ -99,14 +98,21 @@ public void draw(CrushingRecipe recipe, IRecipeSlotsView recipeSlotsView, PoseSt @Override public void setRecipe(IRecipeLayoutBuilder builder, CrushingRecipe recipe, IFocusGroup focuses) { NonNullList> guaranteedOutputs = recipe.getGuaranteedOutputs(); + List currentTiers = Arrays.asList(Tiers.WOOD, Tiers.STONE, Tiers.IRON, Tiers.DIAMOND, Tiers.NETHERITE); + for (Tier t : recipe.getTiers()) { + if (!currentTiers.contains(t)) { + currentTiers.add(t); + } + } + List outputs = recipe.getRecipeOutputs(); DecimalFormat df = Util.make(new DecimalFormat("##.##"), (p_234699_0_) -> { p_234699_0_.setDecimalFormatSymbols(DecimalFormatSymbols.getInstance(Locale.ROOT)); }); - builder.addSlot(RecipeIngredientRole.INPUT,78,20).addIngredients(recipe.getIngredients().get(0)).addTooltipCallback((recipeSlotView, tooltip) -> + builder.addSlot(RecipeIngredientRole.INPUT,78,21).addIngredients(recipe.getIngredients().get(0)).addTooltipCallback((recipeSlotView, tooltip) -> tooltip.add(new TextComponent(I18n.get("rankine.jei.tooltip_max_rolls")+recipe.getMaxRolls()).withStyle(ChatFormatting.DARK_AQUA))); - + builder.addSlot(RecipeIngredientRole.CATALYST,37,20).addIngredients(Ingredient.of(RankineLists.HAMMERS.stream().map(Item::getDefaultInstance))); int count = 1; for (Tuple output : guaranteedOutputs) { int x = (count*18); @@ -141,11 +147,16 @@ public void setRecipe(IRecipeLayoutBuilder builder, CrushingRecipe recipe, IFocu int currentI = i; boolean limited = recipe.getRecipeConstants().get(currentI); Tuple format = colorForTier(recipe.getTiers().get(currentI)); - builder.addSlot(RecipeIngredientRole.OUTPUT,x,y).addItemStack(currentOutput) - .setBackground(format.getB(), -1, -1) - .addTooltipCallback((recipeSlotView, tooltip) -> tooltip.add(new TextComponent(I18n.get("rankine.jei.tooltip_tier")+recipe.getTiers().get(currentI)).withStyle(format.getA()))) - .addTooltipCallback((recipeSlotView, tooltip) -> tooltip.add(new TextComponent(I18n.get("rankine.jei.tooltip_chance")+df.format(recipe.getChance(currentI)*100)+"%"))) - .addTooltipCallback((recipeSlotView, tooltip) -> tooltip.add(new TextComponent(limited ? I18n.get("rankine.jei.tooltip_limited") : I18n.get("rankine.jei.tooltip_nonlimited")).withStyle(limited ? ChatFormatting.RED : ChatFormatting.GREEN))); + IRecipeSlotBuilder slot = builder.addSlot(RecipeIngredientRole.OUTPUT,x,y).addItemStack(currentOutput); + + slot.setBackground(format.getB(), -1, -1); + //.addTooltipCallback((recipeSlotView, tooltip) -> tooltip.add(new TextComponent(I18n.get("rankine.jei.tooltip_tier")+recipe.getTiers().get(currentI)).withStyle(format.getA()))) + for (Tier t : currentTiers) { + float chance = recipe.getChance(t,currentI)*100; + slot.addTooltipCallback((recipeSlotView, tooltip) -> tooltip.add(new TextComponent(I18n.get(t.toString() + ": ")+df.format(chance)+"%").withStyle(chance <= 0 ? ChatFormatting.DARK_RED : colorForTier(t).getA()))); + } + slot.addTooltipCallback((recipeSlotView, tooltip) -> tooltip.add(new TextComponent(limited ? I18n.get("rankine.jei.tooltip_limited") : I18n.get("rankine.jei.tooltip_nonlimited")).withStyle(limited ? ChatFormatting.RED : ChatFormatting.GREEN))); + count++; @@ -165,7 +176,7 @@ private Tuple colorForTier(Tier tier) { case "DIAMOND": return new Tuple<>(ChatFormatting.AQUA,diamondDrawable); case "NETHERITE": - return new Tuple<>(ChatFormatting.DARK_GRAY,netheriteDrawable); + return new Tuple<>(ChatFormatting.DARK_PURPLE,netheriteDrawable); default: return new Tuple<>(ChatFormatting.LIGHT_PURPLE,guiHelper.drawableBuilder(new ResourceLocation(ProjectRankine.MODID,"textures/gui/slot_"+tier.toString().toLowerCase(Locale.ROOT)+".png"),0,0,18,18).setTextureSize(18,18).build()); } diff --git a/src/main/java/com/cannolicatfish/rankine/client/integration/jei/categories/ElementRecipeCategory.java b/src/main/java/com/cannolicatfish/rankine/client/integration/jei/categories/ElementRecipeCategory.java index 60fc46810d..25ccfd61f0 100644 --- a/src/main/java/com/cannolicatfish/rankine/client/integration/jei/categories/ElementRecipeCategory.java +++ b/src/main/java/com/cannolicatfish/rankine/client/integration/jei/categories/ElementRecipeCategory.java @@ -1,35 +1,28 @@ package com.cannolicatfish.rankine.client.integration.jei.categories; import com.cannolicatfish.rankine.ProjectRankine; -import com.cannolicatfish.rankine.init.RankineBlocks; import com.cannolicatfish.rankine.init.RankineItems; import com.cannolicatfish.rankine.recipe.ElementRecipe; -import com.google.common.collect.ImmutableList; import com.mojang.blaze3d.vertex.PoseStack; -import com.mojang.blaze3d.systems.RenderSystem; import mezz.jei.api.constants.VanillaTypes; -import mezz.jei.api.gui.IRecipeLayout; +import mezz.jei.api.gui.builder.IRecipeLayoutBuilder; import mezz.jei.api.gui.drawable.IDrawable; +import mezz.jei.api.gui.ingredient.IRecipeSlotsView; import mezz.jei.api.helpers.IGuiHelper; -import mezz.jei.api.ingredients.IIngredients; +import mezz.jei.api.recipe.IFocusGroup; +import mezz.jei.api.recipe.RecipeIngredientRole; import mezz.jei.api.recipe.category.IRecipeCategory; +import net.minecraft.Util; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.Font; import net.minecraft.client.resources.language.I18n; import net.minecraft.network.chat.Component; -import net.minecraft.world.item.ItemStack; -import net.minecraft.world.item.crafting.Ingredient; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.Util; import net.minecraft.network.chat.TextComponent; -import org.lwjgl.opengl.GL11; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.item.ItemStack; -import java.awt.*; import java.text.DecimalFormat; import java.text.DecimalFormatSymbols; -import java.util.Arrays; -import java.util.Collections; -import java.util.List; import java.util.Locale; public class ElementRecipeCategory implements IRecipeCategory { @@ -37,22 +30,22 @@ public class ElementRecipeCategory implements IRecipeCategory { public static ResourceLocation UID = new ResourceLocation(ProjectRankine.MODID, "element"); private final IDrawable background; private final String localizedName; - private final IDrawable overlay; - private final IDrawable icon; + + private final IGuiHelper guiHelper; public ElementRecipeCategory(IGuiHelper guiHelper) { - background = guiHelper.createBlankDrawable(145, 125); localizedName = I18n.get("rankine.jei.element"); - overlay = guiHelper.createDrawable(new ResourceLocation(ProjectRankine.MODID, "textures/gui/element_jei.png"), - 0, 15, 140, 120); - icon = guiHelper.createDrawableIngredient(new ItemStack(RankineItems.ELEMENT_INDEXER.get())); + this.guiHelper = guiHelper; + background = guiHelper.drawableBuilder(new ResourceLocation(ProjectRankine.MODID, "textures/gui/element_jei.png"), 0, 0, 116, 112) + .addPadding(0, 0, 0, 0) + .build(); } - + @SuppressWarnings("removal") @Override public ResourceLocation getUid() { return UID; } - + @SuppressWarnings("removal") @Override public Class getRecipeClass() { return ElementRecipe.class; @@ -70,59 +63,37 @@ public IDrawable getBackground() { @Override public IDrawable getIcon() { - return icon; + return guiHelper.createDrawableIngredient(VanillaTypes.ITEM_STACK,new ItemStack(RankineItems.ELEMENT.get())); } @Override - public void draw(ElementRecipe recipe, PoseStack ms, double mouseX, double mouseY) { + public void draw(ElementRecipe recipe, IRecipeSlotsView recipeSlotsView, PoseStack ms, double mouseX, double mouseY) { Font font = Minecraft.getInstance().font; - //RenderSystem.enableAlphaTest(); - RenderSystem.enableBlend(); - overlay.draw(ms, 0, 4); - RenderSystem.disableBlend(); - //RenderSystem.disableAlphaTest(); - String name = recipe.getName().toUpperCase(Locale.ROOT); DecimalFormat df = Util.make(new DecimalFormat("##.##"), (p_234699_0_) -> { p_234699_0_.setDecimalFormatSymbols(DecimalFormatSymbols.getInstance(Locale.ROOT)); }); - float p = recipe.getElectrodePotential(); - String e = "Electrode Potential: " + (p > 0 ? "+" : "") + df.format(recipe.getElectrodePotential())+"V"; if (recipe.getAtomicNumber() >= 0) { - font.draw(ms,String.valueOf(recipe.getAtomicNumber()),60, 10,0x000000); + font.draw(ms,String.valueOf(recipe.getAtomicNumber()),48, 4,0x000000); } - font.draw(ms,String.valueOf(recipe.getSymbol()),60, 20,0x000000); - font.draw(ms,name,(float)(70 - font.width(name) / 2),40,0x000000); - font.draw(ms,e,(float)(70 - font.width(e) / 2),50,0x000000); - font.draw(ms,"Items:",(float)(70 - font.width("Items:") / 2),70,0x000000); + font.draw(ms,String.valueOf(recipe.getSymbol()),48, 14,0x000000); + font.draw(ms,name,(float)(58 - font.width(name) / 2),40,0x000000); + font.draw(ms,"Items:",(float)(58 - font.width("Items:") / 2),66,0x000000); } - @Override - public void setIngredients(ElementRecipe recipe, IIngredients iIngredients) { - ImmutableList.Builder> builder = ImmutableList.builder(); - for (Ingredient i : recipe.getIngredients()) { - builder.add(Arrays.asList(i.getItems())); - } - iIngredients.setInputLists(VanillaTypes.ITEM, builder.build()); - iIngredients.setOutputs(VanillaTypes.ITEM, Collections.singletonList(recipe.getResultItem())); - } - - @Override - public void setRecipe(IRecipeLayout recipeLayout, ElementRecipe recipe, IIngredients ingredients) { - int index = 0, posX = 23; - - for (int i = 0; i < ingredients.getInputs(VanillaTypes.ITEM).size(); i++) { + public void setRecipe(IRecipeLayoutBuilder builder, ElementRecipe recipe, IFocusGroup focuses) { + DecimalFormat df = Util.make(new DecimalFormat("##.##"), (p_234699_0_) -> { + p_234699_0_.setDecimalFormatSymbols(DecimalFormatSymbols.getInstance(Locale.ROOT)); + }); + for (int i = 0; i < recipe.getIngredients().size(); i++) { int floor = Math.floorDiv(i,7); - recipeLayout.getItemStacks().init(index + i, true, (index + i - (6*floor)) * 18 + 13, 80 + (16*floor)); - recipeLayout.getItemStacks().set(index + i, ingredients.getInputs(VanillaTypes.ITEM).get(i)); + int val = recipe.getValues().get(i); + builder.addSlot(RecipeIngredientRole.OUTPUT,(i - (6*floor)) * 18 + 4, 76 + (16*floor)).addIngredients(recipe.getIngredients().get(i)) + .addTooltipCallback((recipeSlotView, tooltip) -> tooltip.add(new TextComponent(I18n.get("rankine.jei.tooltip_material_info") + df.format(val)))); } - recipeLayout.getItemStacks().addTooltipCallback((i, b, stack, list) -> { - DecimalFormat df = Util.make(new DecimalFormat("##.##"), (p_234699_0_) -> { - p_234699_0_.setDecimalFormatSymbols(DecimalFormatSymbols.getInstance(Locale.ROOT)); - }); - list.add(new TextComponent("Material count: " + df.format(recipe.getMaterialCount(stack.getItem())))); - }); + IRecipeCategory.super.setRecipe(builder, recipe, focuses); } + } diff --git a/src/main/java/com/cannolicatfish/rankine/client/integration/jei/categories/EvaporationRecipeCategory.java b/src/main/java/com/cannolicatfish/rankine/client/integration/jei/categories/EvaporationRecipeCategory.java index 296ceea942..81e29f16a6 100644 --- a/src/main/java/com/cannolicatfish/rankine/client/integration/jei/categories/EvaporationRecipeCategory.java +++ b/src/main/java/com/cannolicatfish/rankine/client/integration/jei/categories/EvaporationRecipeCategory.java @@ -5,6 +5,7 @@ import com.cannolicatfish.rankine.recipe.EvaporationRecipe; import com.mojang.blaze3d.vertex.PoseStack; import mezz.jei.api.constants.VanillaTypes; +import mezz.jei.api.forge.ForgeTypes; import mezz.jei.api.gui.builder.IRecipeLayoutBuilder; import mezz.jei.api.gui.drawable.IDrawable; import mezz.jei.api.gui.ingredient.IRecipeSlotsView; @@ -22,6 +23,7 @@ import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.Items; import net.minecraft.world.item.crafting.Ingredient; +import net.minecraftforge.fluids.FluidStack; import java.text.DecimalFormat; import java.text.DecimalFormatSymbols; @@ -103,7 +105,7 @@ public void setRecipe(IRecipeLayoutBuilder builder, EvaporationRecipe recipe, IF DecimalFormat df = Util.make(new DecimalFormat("##.##"), (p_234699_0_) -> { p_234699_0_.setDecimalFormatSymbols(DecimalFormatSymbols.getInstance(Locale.ROOT)); }); - builder.addSlot(RecipeIngredientRole.INPUT,57,20).addIngredients(Ingredient.of(Items.BUCKET)).setFluidRenderer(1000, false,16,16); + builder.addSlot(RecipeIngredientRole.INPUT,57,20).addIngredient(ForgeTypes.FLUID_STACK, new FluidStack(recipe.getFluid().getFluid(),1000)); int count = 1; int ycount = 1; diff --git a/src/main/java/com/cannolicatfish/rankine/client/integration/jei/categories/ExtrusiveGeneratorRecipeCategory.java b/src/main/java/com/cannolicatfish/rankine/client/integration/jei/categories/ExtrusiveGeneratorRecipeCategory.java index 3711da39d7..6a6a938c42 100644 --- a/src/main/java/com/cannolicatfish/rankine/client/integration/jei/categories/ExtrusiveGeneratorRecipeCategory.java +++ b/src/main/java/com/cannolicatfish/rankine/client/integration/jei/categories/ExtrusiveGeneratorRecipeCategory.java @@ -2,48 +2,43 @@ import com.cannolicatfish.rankine.ProjectRankine; import com.cannolicatfish.rankine.recipe.RockGeneratorRecipe; -import com.google.common.collect.ImmutableList; -import com.mojang.blaze3d.vertex.PoseStack; -import com.mojang.blaze3d.systems.RenderSystem; import mezz.jei.api.constants.VanillaTypes; -import mezz.jei.api.gui.IRecipeLayout; +import mezz.jei.api.forge.ForgeTypes; +import mezz.jei.api.gui.builder.IRecipeLayoutBuilder; import mezz.jei.api.gui.drawable.IDrawable; import mezz.jei.api.helpers.IGuiHelper; -import mezz.jei.api.ingredients.IIngredients; +import mezz.jei.api.recipe.IFocusGroup; +import mezz.jei.api.recipe.RecipeIngredientRole; import mezz.jei.api.recipe.category.IRecipeCategory; +import net.minecraft.client.resources.language.I18n; import net.minecraft.network.chat.Component; import net.minecraft.network.chat.TextComponent; -import net.minecraft.world.level.block.Blocks; -import net.minecraft.client.resources.language.I18n; -import net.minecraft.world.item.ItemStack; -import net.minecraft.world.item.crafting.Ingredient; import net.minecraft.resources.ResourceLocation; - -import java.util.Arrays; -import java.util.Collections; -import java.util.List; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Items; +import net.minecraft.world.level.material.Fluids; +import net.minecraftforge.fluids.FluidStack; public class ExtrusiveGeneratorRecipeCategory implements IRecipeCategory { public static ResourceLocation UID = new ResourceLocation(ProjectRankine.MODID, "extrusive_igneous"); private final IDrawable background; private final String localizedName; - private final IDrawable overlay; - private final IDrawable icon; + private final IGuiHelper guiHelper; public ExtrusiveGeneratorRecipeCategory(IGuiHelper guiHelper) { - background = guiHelper.createBlankDrawable(145, 95); + this.guiHelper = guiHelper; localizedName = I18n.get("rankine.jei.extrusive_igneous"); - overlay = guiHelper.createDrawable(new ResourceLocation(ProjectRankine.MODID, "textures/gui/extrusive_igneous_jei.png"), - 0, 15, 140, 90); - icon = guiHelper.createDrawableIngredient(new ItemStack(Blocks.BLACKSTONE)); + background = guiHelper.drawableBuilder(new ResourceLocation(ProjectRankine.MODID, "textures/gui/extrusive_igneous_jei.png"), 0, 0, 119, 68) + .addPadding(1, 0, 1, 0) + .build(); } - + @SuppressWarnings("removal") @Override public ResourceLocation getUid() { return UID; } - + @SuppressWarnings("removal") @Override public Class getRecipeClass() { return RockGeneratorRecipe.class; @@ -61,48 +56,16 @@ public IDrawable getBackground() { @Override public IDrawable getIcon() { - return icon; + return guiHelper.createDrawableIngredient(VanillaTypes.ITEM_STACK,new ItemStack(Items.BASALT)); } @Override - public void draw(RockGeneratorRecipe recipe, PoseStack ms, double mouseX, double mouseY) { - //RenderSystem.enableAlphaTest(); - RenderSystem.enableBlend(); - overlay.draw(ms, 0, 4); - RenderSystem.disableBlend(); - //RenderSystem.disableAlphaTest(); - } - - @Override - public void setIngredients(RockGeneratorRecipe recipe, IIngredients iIngredients) { - ImmutableList.Builder> builder = ImmutableList.builder(); - for (Ingredient i : recipe.getIngredients()) { - builder.add(Arrays.asList(i.getItems())); - } - iIngredients.setInputLists(VanillaTypes.ITEM, builder.build()); - iIngredients.setOutputs(VanillaTypes.ITEM, Collections.singletonList(recipe.getResultItem())); - } - - @Override - public void setRecipe(IRecipeLayout recipeLayout, RockGeneratorRecipe recipe, IIngredients ingredients) { - int index = 0, posY = 0; - for (List o : ingredients.getInputs(VanillaTypes.ITEM)) { - if (index == 0) { - recipeLayout.getItemStacks().init(index, true, 63, 6); - } else if (index == 1) { - recipeLayout.getItemStacks().init(index, true, 63, 58); - } else { - recipeLayout.getItemStacks().init(index, true, 38, 32); - } - - recipeLayout.getItemStacks().set(index, o); - index++; - } - - for (int i = 0; i < ingredients.getOutputs(VanillaTypes.ITEM).size(); i++) { - List stacks = ingredients.getOutputs(VanillaTypes.ITEM).get(i); - recipeLayout.getItemStacks().init(index + i, false, 63, 32); - recipeLayout.getItemStacks().set(index + i, stacks); - } + public void setRecipe(IRecipeLayoutBuilder builder, RockGeneratorRecipe recipe, IFocusGroup focuses) { + builder.addSlot(RecipeIngredientRole.INPUT,7,32).addItemStack(new ItemStack(Items.BLUE_ICE)); + builder.addSlot(RecipeIngredientRole.INPUT,43,32).addItemStack(new ItemStack(Items.SOUL_SOIL)); + builder.addSlot(RecipeIngredientRole.INPUT,25,50).addIngredients(recipe.getFirstIngredient()); + builder.addSlot(RecipeIngredientRole.INPUT,2,2).addIngredient(ForgeTypes.FLUID_STACK, new FluidStack(Fluids.LAVA,1000)); + builder.addSlot(RecipeIngredientRole.OUTPUT,97,31).addItemStack(recipe.getResultItem()); + IRecipeCategory.super.setRecipe(builder, recipe, focuses); } } diff --git a/src/main/java/com/cannolicatfish/rankine/client/integration/jei/categories/ForagingRecipeCategory.java b/src/main/java/com/cannolicatfish/rankine/client/integration/jei/categories/ForagingRecipeCategory.java index fe0b8335a2..0be450577b 100644 --- a/src/main/java/com/cannolicatfish/rankine/client/integration/jei/categories/ForagingRecipeCategory.java +++ b/src/main/java/com/cannolicatfish/rankine/client/integration/jei/categories/ForagingRecipeCategory.java @@ -2,6 +2,7 @@ import com.cannolicatfish.rankine.ProjectRankine; import com.cannolicatfish.rankine.init.RankineItems; +import com.cannolicatfish.rankine.init.RankineLists; import com.cannolicatfish.rankine.recipe.ForagingRecipe; import com.mojang.blaze3d.vertex.PoseStack; import mezz.jei.api.constants.VanillaTypes; @@ -20,6 +21,7 @@ import net.minecraft.network.chat.Component; import net.minecraft.network.chat.TextComponent; import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.Items; import net.minecraft.world.item.crafting.Ingredient; @@ -106,7 +108,7 @@ public void setRecipe(IRecipeLayoutBuilder builder, ForagingRecipe recipe, IFocu p_234699_0_.setDecimalFormatSymbols(DecimalFormatSymbols.getInstance(Locale.ROOT)); }); builder.addSlot(RecipeIngredientRole.INPUT,78,20).addIngredients(recipe.getIngredients().get(0)); - + builder.addSlot(RecipeIngredientRole.CATALYST,37,20).addIngredients(Ingredient.of(RankineLists.FORAGING_TOOLS.stream().map(Item::getDefaultInstance))); int count = 1; int ycount = 1; diff --git a/src/main/java/com/cannolicatfish/rankine/client/integration/jei/categories/FusionFurnaceRecipeCategory.java b/src/main/java/com/cannolicatfish/rankine/client/integration/jei/categories/FusionFurnaceRecipeCategory.java index 07b3e8acd6..48fee2733e 100644 --- a/src/main/java/com/cannolicatfish/rankine/client/integration/jei/categories/FusionFurnaceRecipeCategory.java +++ b/src/main/java/com/cannolicatfish/rankine/client/integration/jei/categories/FusionFurnaceRecipeCategory.java @@ -2,31 +2,29 @@ import com.cannolicatfish.rankine.ProjectRankine; import com.cannolicatfish.rankine.init.RankineItems; +import com.cannolicatfish.rankine.init.RankineTags; import com.cannolicatfish.rankine.recipe.FusionFurnaceRecipe; -import com.google.common.collect.ImmutableList; -import com.mojang.blaze3d.vertex.PoseStack; -import com.mojang.blaze3d.systems.RenderSystem; +import com.google.common.cache.CacheBuilder; +import com.google.common.cache.CacheLoader; +import com.google.common.cache.LoadingCache; import mezz.jei.api.constants.VanillaTypes; -import mezz.jei.api.gui.IRecipeLayout; +import mezz.jei.api.forge.ForgeTypes; +import mezz.jei.api.gui.builder.IRecipeLayoutBuilder; import mezz.jei.api.gui.drawable.IDrawable; +import mezz.jei.api.gui.drawable.IDrawableAnimated; import mezz.jei.api.helpers.IGuiHelper; -import mezz.jei.api.ingredients.IIngredients; +import mezz.jei.api.recipe.IFocusGroup; +import mezz.jei.api.recipe.RecipeIngredientRole; import mezz.jei.api.recipe.category.IRecipeCategory; -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.Font; import net.minecraft.client.resources.language.I18n; import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.TextComponent; +import net.minecraft.resources.ResourceLocation; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.crafting.Ingredient; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.network.chat.TextComponent; -import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidUtil; -import java.text.DecimalFormat; -import java.text.DecimalFormatSymbols; -import java.util.Arrays; import java.util.List; -import java.util.Locale; public class FusionFurnaceRecipeCategory implements IRecipeCategory { @@ -34,21 +32,43 @@ public class FusionFurnaceRecipeCategory implements IRecipeCategory cachedFlames; + private final LoadingCache cachedArrows; public FusionFurnaceRecipeCategory(IGuiHelper guiHelper) { - background = guiHelper.createBlankDrawable(180, 90); + this.guiHelper = guiHelper; + background = guiHelper.drawableBuilder(new ResourceLocation(ProjectRankine.MODID, "textures/gui/fusion_furnace_jei.png"), 0, 0, 172,86) + .addPadding(0, 0, 0, 0) + .build(); localizedName = I18n.get("rankine.jei.fusion_furnace"); overlay = guiHelper.createDrawable(new ResourceLocation(ProjectRankine.MODID, "textures/gui/fusion_furnace_jei.png"), 0, 15, 175, 80); - icon = guiHelper.createDrawableIngredient(new ItemStack(RankineItems.FUSION_FURNACE.get())); + this.cachedFlames = CacheBuilder.newBuilder() + .maximumSize(25) + .build(new CacheLoader<>() { + @Override + public IDrawableAnimated load(Integer burnTime) { + return guiHelper.drawableBuilder(new ResourceLocation(ProjectRankine.MODID, "textures/gui/cauldron_drying_jei.png"), 232, 0, 14, 14) + .buildAnimated(burnTime, IDrawableAnimated.StartDirection.TOP, true); + } + }); + this.cachedArrows = CacheBuilder.newBuilder() + .maximumSize(25) + .build(new CacheLoader<>() { + @Override + public IDrawableAnimated load(Integer cookTime) { + return guiHelper.drawableBuilder(new ResourceLocation(ProjectRankine.MODID, "textures/gui/cauldron_drying_jei.png"), 232, 14, 24, 17) + .buildAnimated(cookTime, IDrawableAnimated.StartDirection.LEFT, false); + } + }); } - + @SuppressWarnings("removal") @Override public ResourceLocation getUid() { return UID; } - + @SuppressWarnings("removal") @Override public Class getRecipeClass() { return FusionFurnaceRecipe.class; @@ -66,87 +86,40 @@ public IDrawable getBackground() { @Override public IDrawable getIcon() { - return icon; + return guiHelper.createDrawableIngredient(VanillaTypes.ITEM_STACK, new ItemStack(RankineItems.FUSION_FURNACE.get())); } @Override - public void draw(FusionFurnaceRecipe recipe, PoseStack ms, double mouseX, double mouseY) { - Font font = Minecraft.getInstance().font; - //RenderSystem.enableAlphaTest(); - RenderSystem.enableBlend(); - overlay.draw(ms, 0, 4); - RenderSystem.disableBlend(); - //RenderSystem.disableAlphaTest(); - - } - - @Override - public void setIngredients(FusionFurnaceRecipe recipe, IIngredients iIngredients) { - ImmutableList.Builder> builder = ImmutableList.builder(); - for (Ingredient i : recipe.getIngredients()) { - builder.add(Arrays.asList(i.getItems())); - } - iIngredients.setInputLists(VanillaTypes.ITEM, builder.build()); - iIngredients.setInput(VanillaTypes.FLUID,recipe.getFluidIn()); - iIngredients.setOutputs(VanillaTypes.ITEM, recipe.getRecipeOutputsJEI()); - iIngredients.setOutput(VanillaTypes.FLUID,recipe.getFluidOut()); - } - - @Override - public void setRecipe(IRecipeLayout recipeLayout, FusionFurnaceRecipe recipe, IIngredients ingredients) { - int index = 0; - for (List s : ingredients.getInputs(VanillaTypes.FLUID)) { - if (s.size() > 0 && !s.get(0).isEmpty()) { - recipeLayout.getFluidStacks().init(index,true,4,31); - recipeLayout.getFluidStacks().set(index,s); + public void setRecipe(IRecipeLayoutBuilder builder, FusionFurnaceRecipe recipe, IFocusGroup focuses) { + if (!recipe.getFluidIn().isEmpty()) { + builder.addSlot(RecipeIngredientRole.INPUT,2,2).addIngredient(ForgeTypes.FLUID_STACK, recipe.getFluidIn()).setFluidRenderer(64000,true,16,64); + ItemStack bucket = FluidUtil.getFilledBucket(recipe.getFluidIn()); + if (bucket != ItemStack.EMPTY) { + builder.addSlot(RecipeIngredientRole.INPUT,2,68).addItemStack(bucket); } - index++; } - for (List o : ingredients.getInputs(VanillaTypes.ITEM)) { - if (!o.contains(ItemStack.EMPTY) && o.stream().noneMatch((s) -> s.getItem() == RankineItems.ELEMENT.get())) { - if (index == 1 || index == 2) { - recipeLayout.getItemStacks().init(index, true, 45 + 18*(index-1), 12); - } else { - recipeLayout.getItemStacks().init(index, true, 21, 30); - } - - recipeLayout.getItemStacks().set(index, o); + if (!recipe.getFluidOut().isEmpty()) { + builder.addSlot(RecipeIngredientRole.OUTPUT,154,2).addIngredient(ForgeTypes.FLUID_STACK, recipe.getFluidOut()).setFluidRenderer(64000,true,16,64); + ItemStack bucket = FluidUtil.getFilledBucket(recipe.getFluidOut()); + if (bucket != ItemStack.EMPTY) { + builder.addSlot(RecipeIngredientRole.OUTPUT,154,68).addItemStack(bucket); } - index++; } - - for (List s : ingredients.getOutputs(VanillaTypes.FLUID)) { - if (s.size() > 0 && !s.get(0).isEmpty()) { - recipeLayout.getFluidStacks().init(index,true,156,31); - recipeLayout.getFluidStacks().set(index,s); - } - - index++; + if (!recipe.getGasIn().isEmpty()) { + builder.addSlot(RecipeIngredientRole.INPUT,20,25).addItemStack(recipe.getGasIn()); } + if (!recipe.getGasOut().isEmpty()) { + builder.addSlot(RecipeIngredientRole.OUTPUT,136,25).addItemStack(recipe.getGasOut()); + } + builder.addSlot(RecipeIngredientRole.INPUT,44,7).addIngredients(recipe.getIngredient1()); + builder.addSlot(RecipeIngredientRole.INPUT,62,7).addIngredients(recipe.getIngredient2()); - for (int i = 0; i < ingredients.getOutputs(VanillaTypes.ITEM).size(); i++) { - List stacks = ingredients.getOutputs(VanillaTypes.ITEM).get(i); - if (!stacks.contains(ItemStack.EMPTY) && stacks.stream().noneMatch((s) -> s.getItem() == RankineItems.ELEMENT.get())) { - if (i == 0) { - recipeLayout.getItemStacks().init(index, false, 109, 19); - } else if (i == 1) { - recipeLayout.getItemStacks().init(index, false, 109, 45); - } else { - recipeLayout.getItemStacks().init(index, false, 137, 30); - } + builder.addSlot(RecipeIngredientRole.OUTPUT,108,14).addItemStack(recipe.getResult1()); + builder.addSlot(RecipeIngredientRole.OUTPUT,108,40).addItemStack(recipe.getResult2()); + + builder.addSlot(RecipeIngredientRole.CATALYST,53,43).addIngredients(Ingredient.merge(List.of(Ingredient.of(RankineTags.Items.BATTERIES),Ingredient.of(RankineTags.Items.RTG)))); - recipeLayout.getItemStacks().set(index, stacks); - } - index++; - } - recipeLayout.getFluidStacks().addTooltipCallback((i, b, stack, list) -> { - if (i == 0) { - list.add(new TextComponent(recipe.getFluidIn().getAmount() + "mb")); - } else { - list.add(new TextComponent(recipe.getFluidOut().getAmount() + "mb")); - } - }); } } diff --git a/src/main/java/com/cannolicatfish/rankine/client/integration/jei/categories/IntrusiveGeneratorRecipeCategory.java b/src/main/java/com/cannolicatfish/rankine/client/integration/jei/categories/IntrusiveGeneratorRecipeCategory.java index b76c5b97a1..6206513f67 100644 --- a/src/main/java/com/cannolicatfish/rankine/client/integration/jei/categories/IntrusiveGeneratorRecipeCategory.java +++ b/src/main/java/com/cannolicatfish/rankine/client/integration/jei/categories/IntrusiveGeneratorRecipeCategory.java @@ -1,50 +1,44 @@ package com.cannolicatfish.rankine.client.integration.jei.categories; import com.cannolicatfish.rankine.ProjectRankine; -import com.cannolicatfish.rankine.init.RankineBlocks; import com.cannolicatfish.rankine.recipe.RockGeneratorRecipe; -import com.google.common.collect.ImmutableList; -import com.mojang.blaze3d.vertex.PoseStack; -import com.mojang.blaze3d.systems.RenderSystem; import mezz.jei.api.constants.VanillaTypes; -import mezz.jei.api.gui.IRecipeLayout; +import mezz.jei.api.forge.ForgeTypes; +import mezz.jei.api.gui.builder.IRecipeLayoutBuilder; import mezz.jei.api.gui.drawable.IDrawable; import mezz.jei.api.helpers.IGuiHelper; -import mezz.jei.api.ingredients.IIngredients; +import mezz.jei.api.recipe.IFocusGroup; +import mezz.jei.api.recipe.RecipeIngredientRole; import mezz.jei.api.recipe.category.IRecipeCategory; +import net.minecraft.client.resources.language.I18n; import net.minecraft.network.chat.Component; import net.minecraft.network.chat.TextComponent; -import net.minecraft.world.level.block.Blocks; -import net.minecraft.client.resources.language.I18n; -import net.minecraft.world.item.ItemStack; -import net.minecraft.world.item.crafting.Ingredient; import net.minecraft.resources.ResourceLocation; - -import java.util.Arrays; -import java.util.Collections; -import java.util.List; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Items; +import net.minecraft.world.level.material.Fluids; +import net.minecraftforge.fluids.FluidStack; public class IntrusiveGeneratorRecipeCategory implements IRecipeCategory { public static ResourceLocation UID = new ResourceLocation(ProjectRankine.MODID, "intrusive_igneous"); private final IDrawable background; + private final IGuiHelper guiHelper; private final String localizedName; - private final IDrawable overlay; - private final IDrawable icon; public IntrusiveGeneratorRecipeCategory(IGuiHelper guiHelper) { - background = guiHelper.createBlankDrawable(145, 95); + this.guiHelper = guiHelper; localizedName = I18n.get("rankine.jei.intrusive_igneous"); - overlay = guiHelper.createDrawable(new ResourceLocation(ProjectRankine.MODID, "textures/gui/intrusive_igneous_jei.png"), - 0, 15, 140, 90); - icon = guiHelper.createDrawableIngredient(new ItemStack(Blocks.COBBLESTONE)); + background = guiHelper.drawableBuilder(new ResourceLocation(ProjectRankine.MODID, "textures/gui/intrusive_igneous_jei.png"), 0, 0, 118, 81) + .addPadding(1, 0, 1, 0) + .build(); } - + @SuppressWarnings("removal") @Override public ResourceLocation getUid() { return UID; } - + @SuppressWarnings("removal") @Override public Class getRecipeClass() { return RockGeneratorRecipe.class; @@ -62,46 +56,16 @@ public IDrawable getBackground() { @Override public IDrawable getIcon() { - return icon; + return guiHelper.createDrawableIngredient(VanillaTypes.ITEM_STACK,new ItemStack(Items.COBBLESTONE)); } @Override - public void draw(RockGeneratorRecipe recipe, PoseStack ms, double mouseX, double mouseY) { - //RenderSystem.enableAlphaTest(); - RenderSystem.enableBlend(); - overlay.draw(ms, 0, 4); - RenderSystem.disableBlend(); - //RenderSystem.disableAlphaTest(); - } - - @Override - public void setIngredients(RockGeneratorRecipe recipe, IIngredients iIngredients) { - ImmutableList.Builder> builder = ImmutableList.builder(); - for (Ingredient i : recipe.getIngredients()) { - builder.add(Arrays.asList(i.getItems())); - } - iIngredients.setInputLists(VanillaTypes.ITEM, builder.build()); - iIngredients.setOutputs(VanillaTypes.ITEM, Collections.singletonList(recipe.getResultItem())); - } - - @Override - public void setRecipe(IRecipeLayout recipeLayout, RockGeneratorRecipe recipe, IIngredients ingredients) { - int index = 0, posY = 0; - for (List o : ingredients.getInputs(VanillaTypes.ITEM)) { - if (index == 0) { - recipeLayout.getItemStacks().init(index, true, 54, 6); - } else { - recipeLayout.getItemStacks().init(index, true, 72, 6); - } - recipeLayout.getItemStacks().set(index, o); - index++; - posY += 52; - } - - for (int i = 0; i < ingredients.getOutputs(VanillaTypes.ITEM).size(); i++) { - List stacks = ingredients.getOutputs(VanillaTypes.ITEM).get(i); - recipeLayout.getItemStacks().init(index + i, false, 63, 63); - recipeLayout.getItemStacks().set(index + i, stacks); - } + public void setRecipe(IRecipeLayoutBuilder builder, RockGeneratorRecipe recipe, IFocusGroup focuses) { + builder.addSlot(RecipeIngredientRole.INPUT,7,32).addIngredients(recipe.getFirstIngredient()); + builder.addSlot(RecipeIngredientRole.INPUT,43,32).addIngredients(recipe.getSecondIngredient()); + builder.addSlot(RecipeIngredientRole.INPUT,2,2).addIngredient(ForgeTypes.FLUID_STACK, new FluidStack(Fluids.WATER,1000)); + builder.addSlot(RecipeIngredientRole.INPUT,2,64).addIngredient(ForgeTypes.FLUID_STACK, new FluidStack(Fluids.LAVA,1000)); + builder.addSlot(RecipeIngredientRole.OUTPUT,97,31).addItemStack(recipe.getResultItem()); + IRecipeCategory.super.setRecipe(builder, recipe, focuses); } } diff --git a/src/main/java/com/cannolicatfish/rankine/client/integration/jei/categories/MetamorphicGeneratorRecipeCategory.java b/src/main/java/com/cannolicatfish/rankine/client/integration/jei/categories/MetamorphicGeneratorRecipeCategory.java index d3f2ea6f2b..479eeb1624 100644 --- a/src/main/java/com/cannolicatfish/rankine/client/integration/jei/categories/MetamorphicGeneratorRecipeCategory.java +++ b/src/main/java/com/cannolicatfish/rankine/client/integration/jei/categories/MetamorphicGeneratorRecipeCategory.java @@ -1,49 +1,44 @@ package com.cannolicatfish.rankine.client.integration.jei.categories; import com.cannolicatfish.rankine.ProjectRankine; -import com.cannolicatfish.rankine.init.RankineBlocks; +import com.cannolicatfish.rankine.init.RankineItems; import com.cannolicatfish.rankine.recipe.RockGeneratorRecipe; -import com.google.common.collect.ImmutableList; -import com.mojang.blaze3d.vertex.PoseStack; -import com.mojang.blaze3d.systems.RenderSystem; import mezz.jei.api.constants.VanillaTypes; -import mezz.jei.api.gui.IRecipeLayout; +import mezz.jei.api.forge.ForgeTypes; +import mezz.jei.api.gui.builder.IRecipeLayoutBuilder; import mezz.jei.api.gui.drawable.IDrawable; import mezz.jei.api.helpers.IGuiHelper; -import mezz.jei.api.ingredients.IIngredients; +import mezz.jei.api.recipe.IFocusGroup; +import mezz.jei.api.recipe.RecipeIngredientRole; import mezz.jei.api.recipe.category.IRecipeCategory; import net.minecraft.client.resources.language.I18n; import net.minecraft.network.chat.Component; import net.minecraft.network.chat.TextComponent; -import net.minecraft.world.item.ItemStack; -import net.minecraft.world.item.crafting.Ingredient; import net.minecraft.resources.ResourceLocation; - -import java.util.Arrays; -import java.util.Collections; -import java.util.List; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.material.Fluids; +import net.minecraftforge.fluids.FluidStack; public class MetamorphicGeneratorRecipeCategory implements IRecipeCategory { public static ResourceLocation UID = new ResourceLocation(ProjectRankine.MODID, "metamorphic"); - private final IDrawable background; private final String localizedName; - private final IDrawable overlay; - private final IDrawable icon; + private final IDrawable background; + private final IGuiHelper guiHelper; public MetamorphicGeneratorRecipeCategory(IGuiHelper guiHelper) { - background = guiHelper.createBlankDrawable(145, 95); + this.guiHelper = guiHelper; localizedName = I18n.get("rankine.jei.metamorphic"); - overlay = guiHelper.createDrawable(new ResourceLocation(ProjectRankine.MODID, "textures/gui/metamorphic_jei.png"), - 0, 15, 140, 90); - icon = guiHelper.createDrawableIngredient(new ItemStack(RankineBlocks.SKARN.get())); + background = guiHelper.drawableBuilder(new ResourceLocation(ProjectRankine.MODID, "textures/gui/metamorphic_jei.png"), 0, 0, 102, 64) + .addPadding(1, 0, 1, 0) + .build(); } - + @SuppressWarnings("removal") @Override public ResourceLocation getUid() { return UID; } - + @SuppressWarnings("removal") @Override public Class getRecipeClass() { return RockGeneratorRecipe.class; @@ -61,45 +56,16 @@ public IDrawable getBackground() { @Override public IDrawable getIcon() { - return icon; - } - - @Override - public void draw(RockGeneratorRecipe recipe, PoseStack ms, double mouseX, double mouseY) { - //RenderSystem.enableAlphaTest(); - RenderSystem.enableBlend(); - overlay.draw(ms, 0, 4); - RenderSystem.disableBlend(); - //RenderSystem.disableAlphaTest(); - } + return guiHelper.createDrawableIngredient(VanillaTypes.ITEM_STACK,new ItemStack(RankineItems.SKARN.get())); - @Override - public void setIngredients(RockGeneratorRecipe recipe, IIngredients iIngredients) { - ImmutableList.Builder> builder = ImmutableList.builder(); - for (Ingredient i : recipe.getIngredients()) { - builder.add(Arrays.asList(i.getItems())); - } - iIngredients.setInputLists(VanillaTypes.ITEM, builder.build()); - iIngredients.setOutputs(VanillaTypes.ITEM, Collections.singletonList(recipe.getResultItem())); } @Override - public void setRecipe(IRecipeLayout recipeLayout, RockGeneratorRecipe recipe, IIngredients ingredients) { - int index = 0, posY = 0; - for (List o : ingredients.getInputs(VanillaTypes.ITEM)) { - if (index == 0) { - recipeLayout.getItemStacks().init(index, true, 38, 40); - } else { - recipeLayout.getItemStacks().init(index, true, 38, 58); - } - recipeLayout.getItemStacks().set(index, o); - index++; - } - - for (int i = 0; i < ingredients.getOutputs(VanillaTypes.ITEM).size(); i++) { - List stacks = ingredients.getOutputs(VanillaTypes.ITEM).get(i); - recipeLayout.getItemStacks().init(index + i, false, 95, 40); - recipeLayout.getItemStacks().set(index + i, stacks); - } + public void setRecipe(IRecipeLayoutBuilder builder, RockGeneratorRecipe recipe, IFocusGroup focuses) { + builder.addSlot(RecipeIngredientRole.INPUT,25,46).addIngredients(recipe.getFirstIngredient()); + builder.addSlot(RecipeIngredientRole.INPUT,2,2).addIngredient(ForgeTypes.FLUID_STACK, new FluidStack(Fluids.LAVA,1000)); + builder.addSlot(RecipeIngredientRole.INPUT,25,28).addIngredient(ForgeTypes.FLUID_STACK, new FluidStack(Fluids.WATER,1000)); + builder.addSlot(RecipeIngredientRole.OUTPUT,80,27).addItemStack(recipe.getResultItem()); + IRecipeCategory.super.setRecipe(builder, recipe, focuses); } } diff --git a/src/main/java/com/cannolicatfish/rankine/client/integration/jei/categories/MixingRecipeCategory.java b/src/main/java/com/cannolicatfish/rankine/client/integration/jei/categories/MixingRecipeCategory.java index 4aa2e0fc93..e1cd556093 100644 --- a/src/main/java/com/cannolicatfish/rankine/client/integration/jei/categories/MixingRecipeCategory.java +++ b/src/main/java/com/cannolicatfish/rankine/client/integration/jei/categories/MixingRecipeCategory.java @@ -1,52 +1,61 @@ package com.cannolicatfish.rankine.client.integration.jei.categories; import com.cannolicatfish.rankine.ProjectRankine; -import com.cannolicatfish.rankine.init.RankineBlocks; import com.cannolicatfish.rankine.init.RankineItems; import com.cannolicatfish.rankine.recipe.MixingRecipe; -import com.google.common.collect.ImmutableList; +import com.mojang.blaze3d.platform.InputConstants; import com.mojang.blaze3d.vertex.PoseStack; -import com.mojang.blaze3d.systems.RenderSystem; import mezz.jei.api.constants.VanillaTypes; -import mezz.jei.api.gui.IRecipeLayout; +import mezz.jei.api.forge.ForgeTypes; +import mezz.jei.api.gui.builder.IRecipeLayoutBuilder; import mezz.jei.api.gui.drawable.IDrawable; +import mezz.jei.api.gui.ingredient.IRecipeSlotsView; import mezz.jei.api.helpers.IGuiHelper; -import mezz.jei.api.ingredients.IIngredients; +import mezz.jei.api.recipe.IFocusGroup; +import mezz.jei.api.recipe.RecipeIngredientRole; import mezz.jei.api.recipe.category.IRecipeCategory; +import net.minecraft.ChatFormatting; +import net.minecraft.Util; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.Font; import net.minecraft.client.resources.language.I18n; import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.TextComponent; +import net.minecraft.network.chat.TranslatableComponent; +import net.minecraft.resources.ResourceLocation; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.crafting.Ingredient; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.network.chat.TextComponent; -import net.minecraftforge.fluids.FluidStack; +import net.minecraft.world.level.Level; -import java.util.Arrays; +import java.text.DecimalFormat; +import java.text.DecimalFormatSymbols; +import java.util.ArrayList; import java.util.List; +import java.util.Locale; public class MixingRecipeCategory implements IRecipeCategory { public static ResourceLocation UID = new ResourceLocation(ProjectRankine.MODID, "mixing"); private final IDrawable background; - private final String localizedName; - private final IDrawable overlay; - private final IDrawable icon; + private final IDrawable slotDrawable; + private final IGuiHelper guiHelper; + + private int totalCount = 1; public MixingRecipeCategory(IGuiHelper guiHelper) { - background = guiHelper.createBlankDrawable(185, 146); - localizedName = I18n.get("rankine.jei.mixing"); - overlay = guiHelper.createDrawable(new ResourceLocation(ProjectRankine.MODID, "textures/gui/mixing_jei.png"), - 0, 15, 180, 141); - icon = guiHelper.createDrawableIngredient(new ItemStack(RankineBlocks.MIXING_BARREL.get())); + this.guiHelper = guiHelper; + background = guiHelper.drawableBuilder(new ResourceLocation(ProjectRankine.MODID, "textures/gui/mixing_jei.png"), 0, 0, 180, 140) + .addPadding(1, 0, 0, 0) + .build(); + slotDrawable = guiHelper.getSlotDrawable(); } + @SuppressWarnings("removal") @Override public ResourceLocation getUid() { return UID; } - + @SuppressWarnings("removal") @Override public Class getRecipeClass() { return MixingRecipe.class; @@ -54,7 +63,7 @@ public Class getRecipeClass() { @Override public Component getTitle() { - return new TextComponent(localizedName); + return new TextComponent(I18n.get("rankine.jei.mixing")); } @Override @@ -64,83 +73,125 @@ public IDrawable getBackground() { @Override public IDrawable getIcon() { - return icon; + return guiHelper.createDrawableIngredient(VanillaTypes.ITEM_STACK,new ItemStack(RankineItems.MIXING_BARREL.get())); + } @Override - public void draw(MixingRecipe recipe, PoseStack ms, double mouseX, double mouseY) { - Font font = Minecraft.getInstance().font; - //RenderSystem.enableAlphaTest(); - RenderSystem.enableBlend(); - overlay.draw(ms, 0, 4); - RenderSystem.disableBlend(); - //RenderSystem.disableAlphaTest(); - - float matScale = recipe.getMatScale(); - if (matScale < 1) { - font.draw(ms, Math.round(1/matScale) + ":" + 1, (float)151, 26, 0x000000); - } else { - font.draw(ms, 1 + ":" + Math.round(matScale), (float)151, 26, 0x000000); + public boolean handleInput(MixingRecipe recipe, double mouseX, double mouseY, InputConstants.Key input) { + if (mouseX >= 1 && mouseX <= 11 && mouseY >= 55 && mouseY <= 69 && input.getValue() == InputConstants.MOUSE_BUTTON_LEFT) { + if (this.totalCount > 1) { + this.totalCount--; + } + } else if (mouseX > 14 && mouseX < 24 && mouseY >= 55 && mouseY <= 69 && input.getValue() == InputConstants.MOUSE_BUTTON_LEFT) { + if (this.totalCount < 64) { + this.totalCount++; + } } - - font.draw(ms, String.valueOf(recipe.getMixTime()), (float)151, 100, 0x7C3E3E); + return IRecipeCategory.super.handleInput(recipe, mouseX, mouseY, input); } @Override - public void setIngredients(MixingRecipe recipe, IIngredients iIngredients) { - ImmutableList.Builder> builder = ImmutableList.builder(); - for (Ingredient i : recipe.getIngredients()) { - builder.add(Arrays.asList(i.getItems())); + public List getTooltipStrings(MixingRecipe recipe, IRecipeSlotsView recipeSlotsView, double mouseX, double mouseY) { + if (mouseX >= 58 && mouseX <= 79 && mouseY >= 27 && mouseY <= 48) { + DecimalFormat df = Util.make(new DecimalFormat("##.##"), (p_234699_0_) -> { + p_234699_0_.setDecimalFormatSymbols(DecimalFormatSymbols.getInstance(Locale.ROOT)); + }); + List components = new ArrayList<>(); + components.add(new TranslatableComponent("rankine.jei.tooltip_mixing_time",recipe.getOutputMixTime(1))); + components.add(new TranslatableComponent("rankine.jei.tooltip_total_mixing_time",recipe.getOutputMixTime(totalCount))); + components.add(new TranslatableComponent("rankine.jei.tooltip_total_button_lever",df.format(recipe.getOutputMixTime(totalCount)/15))); + + return components; + } + return IRecipeCategory.super.getTooltipStrings(recipe, recipeSlotsView, mouseX, mouseY); + } + @Override + public void draw(MixingRecipe recipe, IRecipeSlotsView recipeSlotsView, PoseStack stack, double mouseX, double mouseY) { + List reqs = recipe.getRequired(); + List mins = recipe.getMins(); + List maxes = recipe.getMaxes(); + DecimalFormat df = Util.make(new DecimalFormat("##.##"), (p_234699_0_) -> { + p_234699_0_.setDecimalFormatSymbols(DecimalFormatSymbols.getInstance(Locale.ROOT)); + }); + Font font = Minecraft.getInstance().font; + + font.draw(stack,new TranslatableComponent("rankine.jei.tooltip_required"),120, 0, 0x000000); + font.draw(stack,new TranslatableComponent("rankine.jei.tooltip_additional"),1, 96, 0x000000); + font.draw(stack,new TranslatableComponent("rankine.jei.tooltip_total_ingredients",totalCount),1, 75, totalCount < (int) reqs.stream().filter(aBoolean -> aBoolean).count() ? 0xFF5555 : 0x000000); + font.draw(stack,new TranslatableComponent("rankine.jei.tooltip_total_output",Math.round(totalCount*recipe.getMatScale())),1, 84, Math.round(totalCount*recipe.getMatScale()) > 64 || Math.round(totalCount*recipe.getMatScale()) < 1 ? 0xFF5555 : 0x000000); + int count = 0; + for (int i = 0; i < reqs.size(); i++) { + if (reqs.get(i)) { + String s = df.format(mins.get(i)*100) + "-" + df.format(maxes.get(i)*100)+"%"; + font.draw(stack,s,130, 16 + count * 18, 0x000000); + count++; + } } - iIngredients.setInput(VanillaTypes.FLUID,recipe.getFluidFilled()); - iIngredients.setInputLists(VanillaTypes.ITEM, builder.build()); - iIngredients.setOutput(VanillaTypes.ITEM, recipe.getResultItem()); + String mixTime = String.valueOf(recipe.getOutputMixTime(totalCount)); + font.draw(stack,mixTime,69 - font.width(mixTime) / 2.0F, 52, 0xAA0000); + font.draw(stack,df.format(recipe.getOutputFluidReq(totalCount).getAmount())+"mb",130, 16 + count * 18, recipe.getOutputFluidReq(totalCount).getAmount() > 8000 ? 0xFF5555 : 0x000000); + IRecipeCategory.super.draw(recipe, recipeSlotsView, stack, mouseX, mouseY); } @Override - public void setRecipe(IRecipeLayout recipeLayout, MixingRecipe recipe, IIngredients ingredients) { - int index = 0; - int amtReq = (int) recipe.getRequired().stream().filter(aBoolean -> aBoolean).count(); - for (int i = 0; i < ingredients.getInputs(VanillaTypes.ITEM).size(); i++) { - if (i < amtReq) { - recipeLayout.getItemStacks().init(i, false, 14 + 18*i, 6); + public void setRecipe(IRecipeLayoutBuilder builder, MixingRecipe recipe, IFocusGroup focuses) { + Level level = Minecraft.getInstance().level; + List ingredients = recipe.getIngredients(); + List reqs = recipe.getRequired(); + List mins = recipe.getMins(); + List maxes = recipe.getMaxes(); + ItemStack output = recipe.getResultItem(); + DecimalFormat df = Util.make(new DecimalFormat("##.##"), (p_234699_0_) -> { + p_234699_0_.setDecimalFormatSymbols(DecimalFormatSymbols.getInstance(Locale.ROOT)); + }); + + int rcount = 0; + int nrcount = 0; + + + builder.addSlot(RecipeIngredientRole.OUTPUT,5,31).addItemStack(output); + + for (int i = 0; i < ingredients.size(); i++) { + float min = mins.get(i); + float max = maxes.get(i); + + if (reqs.get(i)) { + int x = 110; + int y = 12 + rcount * 18; + + + builder.addSlot(RecipeIngredientRole.INPUT, x, y).addIngredients(ingredients.get(i)) + .setBackground(slotDrawable, -1, -1) + .addTooltipCallback(((recipeSlotView, tooltip) -> tooltip + .add(new TextComponent(Math.round(min * 100) + "%") + .append(new TextComponent("-" + Math.round(max * 100) + "%")) + .withStyle(ChatFormatting.GOLD)))); + rcount++; } else { - int floor = Math.floorDiv(i - amtReq,10); - recipeLayout.getItemStacks().init(i, true, ((i - amtReq) - (10*floor)) * 18 + 2, 40 + (16*floor)); + if (!ingredients.get(i).equals(Ingredient.EMPTY)) { + int x = nrcount <= 9 ? ((nrcount)*18) + 1 : ((nrcount-10)*18) + 1; + int y = nrcount <= 9 ? 106 : 124; + builder.addSlot(RecipeIngredientRole.INPUT,x,y).addIngredients(ingredients.get(i)) + .addTooltipCallback(((recipeSlotView, tooltip) -> tooltip + .add(new TextComponent( Math.round(min * 100) + "%") + .append(new TextComponent("-" + Math.round(max * 100) + "%")) + .withStyle(ChatFormatting.GOLD)))); + nrcount++; + } } - if (!ingredients.getInputs(VanillaTypes.ITEM).get(i).contains(ItemStack.EMPTY) && ingredients.getInputs(VanillaTypes.ITEM).get(i).stream().noneMatch((s) -> s.getItem() == RankineItems.ELEMENT.get())) { - recipeLayout.getItemStacks().set(i, ingredients.getInputs(VanillaTypes.ITEM).get(i)); - } - index = i; - } - for (List s : ingredients.getInputs(VanillaTypes.FLUID)) { - if (s.size() > 0 && !s.get(0).isEmpty()) { - recipeLayout.getFluidStacks().init(index,true,150,7); - recipeLayout.getFluidStacks().set(index,s); - } - index++; - } - int endIndex = index; - recipeLayout.getItemStacks().addTooltipCallback((i, b, stack, list) -> { - if (i < endIndex) { - list.add(new TextComponent("Min: " + Math.round(recipe.getMins().get(i) * 100) + "%")); - list.add(new TextComponent("Max: " + Math.round(recipe.getMaxes().get(i) * 100) + "%")); - } + } - }); + if (!recipe.getFluid().isEmpty()) { + int x = 110; + int y = 12 + rcount * 18; - for (int i = 0; i < ingredients.getOutputs(VanillaTypes.ITEM).size(); i++) { - List stacks = ingredients.getOutputs(VanillaTypes.ITEM).get(i); - recipeLayout.getItemStacks().init(index + i + 1, false, 2 + 18 * i, 110); - recipeLayout.getItemStacks().set(index + i + 1, stacks); - index += 1; + builder.addSlot(RecipeIngredientRole.INPUT,x,y).addIngredients(ForgeTypes.FLUID_STACK,List.of(recipe.getFluidFilled())).setBackground(slotDrawable, -1, -1); } - recipeLayout.getFluidStacks().addTooltipCallback((i, b, stack, list) -> { - list.add(new TextComponent(recipe.getFluid().getAmount() + "mb")); - }); + } } diff --git a/src/main/java/com/cannolicatfish/rankine/client/integration/jei/categories/SedimentaryGeneratorRecipeCategory.java b/src/main/java/com/cannolicatfish/rankine/client/integration/jei/categories/SedimentaryGeneratorRecipeCategory.java index 48996a9892..52e48da671 100644 --- a/src/main/java/com/cannolicatfish/rankine/client/integration/jei/categories/SedimentaryGeneratorRecipeCategory.java +++ b/src/main/java/com/cannolicatfish/rankine/client/integration/jei/categories/SedimentaryGeneratorRecipeCategory.java @@ -1,49 +1,45 @@ package com.cannolicatfish.rankine.client.integration.jei.categories; import com.cannolicatfish.rankine.ProjectRankine; -import com.cannolicatfish.rankine.init.RankineBlocks; +import com.cannolicatfish.rankine.init.RankineItems; import com.cannolicatfish.rankine.recipe.RockGeneratorRecipe; -import com.google.common.collect.ImmutableList; -import com.mojang.blaze3d.vertex.PoseStack; -import com.mojang.blaze3d.systems.RenderSystem; import mezz.jei.api.constants.VanillaTypes; -import mezz.jei.api.gui.IRecipeLayout; +import mezz.jei.api.forge.ForgeTypes; +import mezz.jei.api.gui.builder.IRecipeLayoutBuilder; import mezz.jei.api.gui.drawable.IDrawable; import mezz.jei.api.helpers.IGuiHelper; -import mezz.jei.api.ingredients.IIngredients; +import mezz.jei.api.recipe.IFocusGroup; +import mezz.jei.api.recipe.RecipeIngredientRole; import mezz.jei.api.recipe.category.IRecipeCategory; import net.minecraft.client.resources.language.I18n; import net.minecraft.network.chat.Component; import net.minecraft.network.chat.TextComponent; -import net.minecraft.world.item.ItemStack; -import net.minecraft.world.item.crafting.Ingredient; import net.minecraft.resources.ResourceLocation; - -import java.util.Arrays; -import java.util.Collections; -import java.util.List; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.material.Fluids; +import net.minecraftforge.fluids.FluidStack; public class SedimentaryGeneratorRecipeCategory implements IRecipeCategory { public static ResourceLocation UID = new ResourceLocation(ProjectRankine.MODID, "sedimentary"); private final IDrawable background; private final String localizedName; - private final IDrawable overlay; - private final IDrawable icon; + private final IGuiHelper guiHelper; + public SedimentaryGeneratorRecipeCategory(IGuiHelper guiHelper) { - background = guiHelper.createBlankDrawable(145, 95); + this.guiHelper = guiHelper; localizedName = I18n.get("rankine.jei.sedimentary"); - overlay = guiHelper.createDrawable(new ResourceLocation(ProjectRankine.MODID, "textures/gui/sedimentary_jei.png"), - 0, 15, 140, 90); - icon = guiHelper.createDrawableIngredient(new ItemStack(RankineBlocks.BRECCIA.get())); + background = guiHelper.drawableBuilder(new ResourceLocation(ProjectRankine.MODID, "textures/gui/sedimentary_jei.png"), 0, 0, 97, 49) + .addPadding(1, 0, 1, 0) + .build(); } - + @SuppressWarnings("removal") @Override public ResourceLocation getUid() { return UID; } - + @SuppressWarnings("removal") @Override public Class getRecipeClass() { return RockGeneratorRecipe.class; @@ -61,48 +57,14 @@ public IDrawable getBackground() { @Override public IDrawable getIcon() { - return icon; + return guiHelper.createDrawableIngredient(VanillaTypes.ITEM_STACK,new ItemStack(RankineItems.BRECCIA.get())); } @Override - public void draw(RockGeneratorRecipe recipe, PoseStack ms, double mouseX, double mouseY) { - //RenderSystem.enableAlphaTest(); - RenderSystem.enableBlend(); - overlay.draw(ms, 0, 4); - RenderSystem.disableBlend(); - //RenderSystem.disableAlphaTest(); - } - - @Override - public void setIngredients(RockGeneratorRecipe recipe, IIngredients iIngredients) { - ImmutableList.Builder> builder = ImmutableList.builder(); - for (Ingredient i : recipe.getIngredients()) { - builder.add(Arrays.asList(i.getItems())); - } - iIngredients.setInputLists(VanillaTypes.ITEM, builder.build()); - iIngredients.setOutputs(VanillaTypes.ITEM, Collections.singletonList(recipe.getResultItem())); - } - - @Override - public void setRecipe(IRecipeLayout recipeLayout, RockGeneratorRecipe recipe, IIngredients ingredients) { - int index = 0, posY = 0; - for (List o : ingredients.getInputs(VanillaTypes.ITEM)) { - if (index == 0) { - recipeLayout.getItemStacks().init(index, true, 53, 54); - } else if (index == 1) { - recipeLayout.getItemStacks().init(index, true, 71, 54); - } else { - recipeLayout.getItemStacks().init(index, true, 34, 28); - } - recipeLayout.getItemStacks().set(index, o); - index++; - posY += 52; - } - - for (int i = 0; i < ingredients.getOutputs(VanillaTypes.ITEM).size(); i++) { - List stacks = ingredients.getOutputs(VanillaTypes.ITEM).get(i); - recipeLayout.getItemStacks().init(index + i, false, 94, 28); - recipeLayout.getItemStacks().set(index + i, stacks); - } + public void setRecipe(IRecipeLayoutBuilder builder, RockGeneratorRecipe recipe, IFocusGroup focuses) { + builder.addSlot(RecipeIngredientRole.INPUT,2,2).addIngredients(recipe.getFirstIngredient()); + builder.addSlot(RecipeIngredientRole.INPUT,24,28).addIngredient(ForgeTypes.FLUID_STACK, new FluidStack(Fluids.WATER,1000)); + builder.addSlot(RecipeIngredientRole.OUTPUT,75,27).addItemStack(recipe.getResultItem()); + IRecipeCategory.super.setRecipe(builder, recipe, focuses); } } diff --git a/src/main/java/com/cannolicatfish/rankine/client/integration/jei/categories/SluicingRecipeCategory.java b/src/main/java/com/cannolicatfish/rankine/client/integration/jei/categories/SluicingRecipeCategory.java index 6aa35a7089..b2f2fb3642 100644 --- a/src/main/java/com/cannolicatfish/rankine/client/integration/jei/categories/SluicingRecipeCategory.java +++ b/src/main/java/com/cannolicatfish/rankine/client/integration/jei/categories/SluicingRecipeCategory.java @@ -2,29 +2,26 @@ import com.cannolicatfish.rankine.ProjectRankine; import com.cannolicatfish.rankine.init.RankineItems; +import com.cannolicatfish.rankine.init.RankineTags; import com.cannolicatfish.rankine.recipe.SluicingRecipe; -import com.google.common.collect.ImmutableList; -import com.mojang.blaze3d.vertex.PoseStack; -import com.mojang.blaze3d.systems.RenderSystem; import mezz.jei.api.constants.VanillaTypes; -import mezz.jei.api.gui.IRecipeLayout; +import mezz.jei.api.gui.builder.IRecipeLayoutBuilder; import mezz.jei.api.gui.drawable.IDrawable; import mezz.jei.api.helpers.IGuiHelper; -import mezz.jei.api.ingredients.IIngredients; +import mezz.jei.api.recipe.IFocusGroup; +import mezz.jei.api.recipe.RecipeIngredientRole; import mezz.jei.api.recipe.category.IRecipeCategory; -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.Font; +import net.minecraft.Util; import net.minecraft.client.resources.language.I18n; import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.TextComponent; +import net.minecraft.resources.ResourceLocation; import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Items; import net.minecraft.world.item.crafting.Ingredient; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.Util; -import net.minecraft.network.chat.TextComponent; import java.text.DecimalFormat; import java.text.DecimalFormatSymbols; -import java.util.Arrays; import java.util.List; import java.util.Locale; @@ -32,23 +29,22 @@ public class SluicingRecipeCategory implements IRecipeCategory { public static ResourceLocation UID = new ResourceLocation(ProjectRankine.MODID, "sluicing"); private final IDrawable background; - private final String localizedName; - private final IDrawable overlay; - private final IDrawable icon; + private final IGuiHelper guiHelper; + private final IDrawable slotDrawable; public SluicingRecipeCategory(IGuiHelper guiHelper) { - background = guiHelper.createBlankDrawable(145, 125); - localizedName = I18n.get("rankine.jei.sluicing"); - overlay = guiHelper.createDrawable(new ResourceLocation(ProjectRankine.MODID, "textures/gui/sluicing_jei.png"), - 0, 15, 140, 120); - icon = guiHelper.createDrawableIngredient(new ItemStack(RankineItems.STEEL_GOLD_PAN.get())); + this.guiHelper = guiHelper; + background = guiHelper.drawableBuilder(new ResourceLocation(ProjectRankine.MODID, "textures/gui/sluicing_jei.png"), 0, 0, 170, 140) + .addPadding(1, 0, 0, 15) + .build(); + slotDrawable = guiHelper.getSlotDrawable(); } - + @SuppressWarnings("removal") @Override public ResourceLocation getUid() { return UID; } - + @SuppressWarnings("removal") @Override public Class getRecipeClass() { return SluicingRecipe.class; @@ -56,7 +52,7 @@ public Class getRecipeClass() { @Override public Component getTitle() { - return new TextComponent(localizedName); + return new TextComponent(I18n.get("rankine.jei.sluicing")); } @Override @@ -66,66 +62,38 @@ public IDrawable getBackground() { @Override public IDrawable getIcon() { - return icon; - } - - @Override - public void draw(SluicingRecipe recipe, PoseStack ms, double mouseX, double mouseY) { - Font font = Minecraft.getInstance().font; - //RenderSystem.enableAlphaTest(); - RenderSystem.enableBlend(); - overlay.draw(ms, 0, 4); - RenderSystem.disableBlend(); - //RenderSystem.disableAlphaTest(); + return guiHelper.createDrawableIngredient(VanillaTypes.ITEM_STACK, new ItemStack(RankineItems.STEEL_GOLD_PAN.get())); } @Override - public void setIngredients(SluicingRecipe recipe, IIngredients iIngredients) { - ImmutableList.Builder> builder = ImmutableList.builder(); - for (Ingredient i : recipe.getIngredients()) { - builder.add(Arrays.asList(i.getItems())); - } - iIngredients.setInputLists(VanillaTypes.ITEM, builder.build()); - ImmutableList.Builder> builder2 = ImmutableList.builder(); - for (Ingredient i : recipe.getOutputs()) { - builder2.add(Arrays.asList(i.getItems())); - } - iIngredients.setOutputLists(VanillaTypes.ITEM, builder2.build()); - } - - @Override - public void setRecipe(IRecipeLayout recipeLayout, SluicingRecipe recipe, IIngredients ingredients) { - //System.out.println(ingredients); - //System.out.println(recipe.getOutputs()); - int index = 0, posY = 0; - for (List o : ingredients.getInputs(VanillaTypes.ITEM)) { - recipeLayout.getItemStacks().init(index, true, 63, 9 + posY); - recipeLayout.getItemStacks().set(index, o); - posY += 21; - index++; - } + public void setRecipe(IRecipeLayoutBuilder builder, SluicingRecipe recipe, IFocusGroup focuses) { + builder.addSlot(RecipeIngredientRole.CATALYST,37,20).addIngredients(Ingredient.of(RankineTags.Items.GOLD_PANS)); + List outputs = recipe.getOutputs(); + DecimalFormat df = Util.make(new DecimalFormat("##.##"), (p_234699_0_) -> { + p_234699_0_.setDecimalFormatSymbols(DecimalFormatSymbols.getInstance(Locale.ROOT)); + }); + builder.addSlot(RecipeIngredientRole.INPUT,78,20).addIngredients(recipe.getIngredients().get(0)); - int reducer = 0; - int ymod = -1; - int outputcount = 0; - for (List o : ingredients.getOutputs(VanillaTypes.ITEM)) { - if (outputcount % 6 == 0) { - reducer = index - 3; - ymod += 1; + int count = 1; + int ycount = 1; + for (int i = 0; i < outputs.size(); i++) { + if (count % 9 == 0) { + count = 1; + ycount++; } - recipeLayout.getItemStacks().init(index, true, (outputcount - reducer) * 18, 48 + ymod * 18); - recipeLayout.getItemStacks().set(index, o); - outputcount++; - index++; - } - recipeLayout.getItemStacks().addTooltipCallback((i, b, stack, list) -> { - DecimalFormat df = Util.make(new DecimalFormat("##.##"), (p_234699_0_) -> { - p_234699_0_.setDecimalFormatSymbols(DecimalFormatSymbols.getInstance(Locale.ROOT)); - }); - if (i != 0 && i != 1) { - list.add(new TextComponent("Chance: " + df.format(recipe.getChance(i - 2) * 100) + "%")); + int x = (count * 18); + int y = 48 + (ycount * 18); + + int currentI = i; + Ingredient currentOutput = outputs.get(i); + if (currentOutput.isEmpty()) { + currentOutput = Ingredient.of(new ItemStack(Items.BARRIER).setHoverName(new TextComponent(I18n.get("rankine.jei.tooltip_nothing")))); } - }); + builder.addSlot(RecipeIngredientRole.OUTPUT, x, y).addIngredients(currentOutput) + .setBackground(slotDrawable, -1, -1) + .addTooltipCallback((recipeSlotView, tooltip) -> tooltip.add(new TextComponent(I18n.get("rankine.jei.tooltip_chance") + df.format(recipe.getChance(currentI) * 100) + "%"))); + count++; + } } } diff --git a/src/main/java/com/cannolicatfish/rankine/client/integration/jei/categories/StrippingRecipeCategory.java b/src/main/java/com/cannolicatfish/rankine/client/integration/jei/categories/StrippingRecipeCategory.java index f8fef90842..08cd39c04f 100644 --- a/src/main/java/com/cannolicatfish/rankine/client/integration/jei/categories/StrippingRecipeCategory.java +++ b/src/main/java/com/cannolicatfish/rankine/client/integration/jei/categories/StrippingRecipeCategory.java @@ -1,56 +1,43 @@ package com.cannolicatfish.rankine.client.integration.jei.categories; import com.cannolicatfish.rankine.ProjectRankine; -import com.cannolicatfish.rankine.init.RankineBlocks; +import com.cannolicatfish.rankine.init.RankineItems; +import com.cannolicatfish.rankine.init.RankineTags; import com.cannolicatfish.rankine.recipe.StrippingRecipe; -import com.google.common.collect.ImmutableList; -import com.mojang.blaze3d.vertex.PoseStack; -import com.mojang.blaze3d.systems.RenderSystem; import mezz.jei.api.constants.VanillaTypes; -import mezz.jei.api.gui.IRecipeLayout; +import mezz.jei.api.gui.builder.IRecipeLayoutBuilder; import mezz.jei.api.gui.drawable.IDrawable; import mezz.jei.api.helpers.IGuiHelper; -import mezz.jei.api.ingredients.IIngredients; +import mezz.jei.api.recipe.IFocusGroup; +import mezz.jei.api.recipe.RecipeIngredientRole; import mezz.jei.api.recipe.category.IRecipeCategory; -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.Font; import net.minecraft.client.resources.language.I18n; import net.minecraft.network.chat.Component; import net.minecraft.network.chat.TextComponent; +import net.minecraft.resources.ResourceLocation; import net.minecraft.world.item.ItemStack; -import net.minecraft.world.item.Items; import net.minecraft.world.item.crafting.Ingredient; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.Util; -import net.minecraftforge.fluids.FluidStack; - -import java.text.DecimalFormat; -import java.text.DecimalFormatSymbols; -import java.util.Arrays; -import java.util.List; -import java.util.Locale; public class StrippingRecipeCategory implements IRecipeCategory { public static ResourceLocation UID = new ResourceLocation(ProjectRankine.MODID, "stripping"); - private final IDrawable background; private final String localizedName; - private final IDrawable overlay; - private final IDrawable icon; + private final IDrawable background; + private final IGuiHelper guiHelper; public StrippingRecipeCategory(IGuiHelper guiHelper) { - background = guiHelper.createBlankDrawable(145, 95); + this.guiHelper = guiHelper; localizedName = I18n.get("rankine.jei.stripping"); - overlay = guiHelper.createDrawable(new ResourceLocation(ProjectRankine.MODID, "textures/gui/stripping_jei.png"), - 0, 15, 140, 90); - icon = guiHelper.createDrawableIngredient(new ItemStack(Items.IRON_AXE)); + background = guiHelper.drawableBuilder(new ResourceLocation(ProjectRankine.MODID, "textures/gui/stripping_jei.png"), 0, 0, 78, 28) + .addPadding(1, 0, 1, 0) + .build(); } - + @SuppressWarnings("removal") @Override public ResourceLocation getUid() { return UID; } - + @SuppressWarnings("removal") @Override public Class getRecipeClass() { return StrippingRecipe.class; @@ -68,50 +55,15 @@ public IDrawable getBackground() { @Override public IDrawable getIcon() { - return icon; + return guiHelper.createDrawableIngredient(VanillaTypes.ITEM_STACK,new ItemStack(RankineItems.INNER_BARK.get())); } @Override - public void draw(StrippingRecipe recipe, PoseStack ms, double mouseX, double mouseY) { - Font font = Minecraft.getInstance().font; - //RenderSystem.enableAlphaTest(); - RenderSystem.enableBlend(); - overlay.draw(ms, 0, 4); - RenderSystem.disableBlend(); - //RenderSystem.disableAlphaTest(); - DecimalFormat df = Util.make(new DecimalFormat("##.#"), (p_234699_0_) -> { - p_234699_0_.setDecimalFormatSymbols(DecimalFormatSymbols.getInstance(Locale.ROOT)); - }); - if (recipe.getChance() < 1) { - font.draw(ms, df.format(recipe.getChance()*100f)+"%", 107, 55, 0x7E7E7E); - } - } - - @Override - public void setIngredients(StrippingRecipe recipe, IIngredients iIngredients) { - ImmutableList.Builder> builder = ImmutableList.builder(); - for (Ingredient i : recipe.getIngredients()) { - builder.add(Arrays.asList(i.getItems())); - } - iIngredients.setInputLists(VanillaTypes.ITEM, builder.build()); - iIngredients.setOutput(VanillaTypes.ITEM, recipe.getResult()); - } - - @Override - public void setRecipe(IRecipeLayout recipeLayout, StrippingRecipe recipe, IIngredients ingredients) { - int index = 0, posX = 31; - for (List o : ingredients.getInputs(VanillaTypes.ITEM)) { - recipeLayout.getItemStacks().init(index, true, posX, 34); - recipeLayout.getItemStacks().set(index, o); - index++; - posX += 18; - } - - for (int i = 0; i < ingredients.getOutputs(VanillaTypes.ITEM).size(); i++) { - List stacks = ingredients.getOutputs(VanillaTypes.ITEM).get(i); - recipeLayout.getItemStacks().init(index + i, false, 106, 34); - recipeLayout.getItemStacks().set(index + i, stacks); - } + public void setRecipe(IRecipeLayoutBuilder builder, StrippingRecipe recipe, IFocusGroup focuses) { + builder.addSlot(RecipeIngredientRole.INPUT,2,10).addIngredients(recipe.getIngredient()); + builder.addSlot(RecipeIngredientRole.CATALYST,23,0).addIngredients(Ingredient.of(RankineTags.Items.AXES)); + builder.addSlot(RecipeIngredientRole.OUTPUT,60,10).addItemStack(recipe.getResult()); + IRecipeCategory.super.setRecipe(builder, recipe, focuses); } } diff --git a/src/main/java/com/cannolicatfish/rankine/client/integration/jei/categories/TreetappingRecipeCategory.java b/src/main/java/com/cannolicatfish/rankine/client/integration/jei/categories/TreetappingRecipeCategory.java index 81c36dd1d7..95641d662f 100644 --- a/src/main/java/com/cannolicatfish/rankine/client/integration/jei/categories/TreetappingRecipeCategory.java +++ b/src/main/java/com/cannolicatfish/rankine/client/integration/jei/categories/TreetappingRecipeCategory.java @@ -1,55 +1,63 @@ package com.cannolicatfish.rankine.client.integration.jei.categories; import com.cannolicatfish.rankine.ProjectRankine; -import com.cannolicatfish.rankine.init.RankineBlocks; +import com.cannolicatfish.rankine.init.RankineItems; import com.cannolicatfish.rankine.recipe.TreetappingRecipe; -import com.google.common.collect.ImmutableList; +import com.google.common.cache.CacheBuilder; +import com.google.common.cache.CacheLoader; +import com.google.common.cache.LoadingCache; import com.mojang.blaze3d.vertex.PoseStack; -import com.mojang.blaze3d.systems.RenderSystem; import mezz.jei.api.constants.VanillaTypes; -import mezz.jei.api.gui.IRecipeLayout; +import mezz.jei.api.forge.ForgeTypes; +import mezz.jei.api.gui.builder.IRecipeLayoutBuilder; import mezz.jei.api.gui.drawable.IDrawable; +import mezz.jei.api.gui.drawable.IDrawableAnimated; +import mezz.jei.api.gui.ingredient.IRecipeSlotsView; import mezz.jei.api.helpers.IGuiHelper; -import mezz.jei.api.ingredients.IIngredients; +import mezz.jei.api.recipe.IFocusGroup; +import mezz.jei.api.recipe.RecipeIngredientRole; import mezz.jei.api.recipe.category.IRecipeCategory; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.Font; import net.minecraft.client.resources.language.I18n; import net.minecraft.network.chat.Component; -import net.minecraft.world.item.ItemStack; -import net.minecraft.world.item.crafting.Ingredient; -import net.minecraft.resources.ResourceLocation; import net.minecraft.network.chat.TextComponent; -import net.minecraftforge.fluids.FluidStack; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.item.ItemStack; -import java.text.DecimalFormat; -import java.text.DecimalFormatSymbols; -import java.util.Arrays; -import java.util.Collections; import java.util.List; -import java.util.Locale; public class TreetappingRecipeCategory implements IRecipeCategory { public static ResourceLocation UID = new ResourceLocation(ProjectRankine.MODID, "treetapping"); - private final IDrawable background; private final String localizedName; - private final IDrawable overlay; - private final IDrawable icon; + private final IDrawable background; + private final IGuiHelper guiHelper; + + private final LoadingCache cachedArrows; public TreetappingRecipeCategory(IGuiHelper guiHelper) { - background = guiHelper.createBlankDrawable(145, 95); + this.guiHelper = guiHelper; localizedName = I18n.get("rankine.jei.treetapping"); - overlay = guiHelper.createDrawable(new ResourceLocation(ProjectRankine.MODID, "textures/gui/treetapping_jei.png"), - 0, 15, 140, 90); - icon = guiHelper.createDrawableIngredient(new ItemStack(RankineBlocks.TREE_TAP.get())); + background = guiHelper.drawableBuilder(new ResourceLocation(ProjectRankine.MODID, "textures/gui/treetapping_jei.png"), 0, 0, 78, 34) + .addPadding(1, 0, 1, 0) + .build(); + this.cachedArrows = CacheBuilder.newBuilder() + .maximumSize(25) + .build(new CacheLoader<>() { + @Override + public IDrawableAnimated load(Integer cookTime) { + return guiHelper.drawableBuilder(new ResourceLocation(ProjectRankine.MODID, "textures/gui/treetapping_jei.png"), 232, 14, 24, 17) + .buildAnimated(cookTime, IDrawableAnimated.StartDirection.LEFT, false); + } + }); } - + @SuppressWarnings("removal") @Override public ResourceLocation getUid() { return UID; } - + @SuppressWarnings("removal") @Override public Class getRecipeClass() { return TreetappingRecipe.class; @@ -67,51 +75,43 @@ public IDrawable getBackground() { @Override public IDrawable getIcon() { - return icon; + return guiHelper.createDrawableIngredient(VanillaTypes.ITEM_STACK,new ItemStack(RankineItems.TREE_TAP.get())); } + protected IDrawableAnimated getArrow(TreetappingRecipe recipe) { + int cookTime = Math.round(recipe.getTapTime()); + if (cookTime <= 0) { + cookTime = 1600; + } + return this.cachedArrows.getUnchecked(cookTime); + } @Override - public void draw(TreetappingRecipe recipe, PoseStack ms, double mouseX, double mouseY) { - Font font = Minecraft.getInstance().font; - //RenderSystem.enableAlphaTest(); - RenderSystem.enableBlend(); - overlay.draw(ms, 0, 4); - RenderSystem.disableBlend(); - //RenderSystem.disableAlphaTest(); + public void draw(TreetappingRecipe recipe, IRecipeSlotsView recipeSlotsView, PoseStack stack, double mouseX, double mouseY) { if (recipe.getTapTime() > 0) { - font.draw(ms, Math.round(recipe.getTapTime()/20f)+"s", 107, 55, 0x7E7E7E); + Font font = Minecraft.getInstance().font; + font.draw(stack, Math.round(recipe.getTapTime()/20f)+"s", 59, 29, 0x7E7E7E); } + IDrawableAnimated arrow = getArrow(recipe); + arrow.draw(stack, 27, 10); + IRecipeCategory.super.draw(recipe, recipeSlotsView, stack, mouseX, mouseY); } @Override - public void setIngredients(TreetappingRecipe recipe, IIngredients iIngredients) { - ImmutableList.Builder> builder = ImmutableList.builder(); - for (Ingredient i : recipe.getIngredients()) { - builder.add(Arrays.asList(i.getItems())); + public List getTooltipStrings(TreetappingRecipe recipe, IRecipeSlotsView recipeSlotsView, double mouseX, double mouseY) { + if (mouseX >= 24 && mouseX <= 37 && mouseY >= 20 && mouseY <= 33) { + return List.of(new TextComponent("08:00 - 16:00")); } - iIngredients.setInputLists(VanillaTypes.ITEM, builder.build()); - iIngredients.setOutput(VanillaTypes.FLUID, recipe.getFilledResult()); + return IRecipeCategory.super.getTooltipStrings(recipe, recipeSlotsView, mouseX, mouseY); } @Override - public void setRecipe(IRecipeLayout recipeLayout, TreetappingRecipe recipe, IIngredients ingredients) { - int index = 0, posX = 31; - for (List o : ingredients.getInputs(VanillaTypes.ITEM)) { - recipeLayout.getItemStacks().init(index, true, posX, 34); - recipeLayout.getItemStacks().set(index, o); - index++; - posX += 18; - } - - for (int i = 0; i < ingredients.getOutputs(VanillaTypes.FLUID).size(); i++) { - List stacks = ingredients.getOutputs(VanillaTypes.FLUID).get(i); - recipeLayout.getFluidStacks().init(index + i, false, 107, 35); - recipeLayout.getFluidStacks().set(index + i, stacks); - } + public void setRecipe(IRecipeLayoutBuilder builder, TreetappingRecipe recipe, IFocusGroup focuses) { + builder.addSlot(RecipeIngredientRole.INPUT,2,10).addIngredients(recipe.getIngredient()); + builder.addSlot(RecipeIngredientRole.CATALYST,23,0).addItemStack(RankineItems.TREE_TAP.get().getDefaultInstance()); + builder.addSlot(RecipeIngredientRole.OUTPUT,60,10).addIngredient(ForgeTypes.FLUID_STACK,recipe.getFilledResult()).addTooltipCallback(((recipeSlotView, tooltip) -> tooltip + .add(new TextComponent(recipe.getResult().getAmount()+"mb")))); - recipeLayout.getFluidStacks().addTooltipCallback((i, b, stack, list) -> { - list.add(new TextComponent(recipe.getResult().getAmount() + "mb")); - }); + IRecipeCategory.super.setRecipe(builder, recipe, focuses); } } diff --git a/src/main/java/com/cannolicatfish/rankine/client/integration/jei/categories/VolcanicGeneratorRecipeCategory.java b/src/main/java/com/cannolicatfish/rankine/client/integration/jei/categories/VolcanicGeneratorRecipeCategory.java index 41a47a7fac..913912d055 100644 --- a/src/main/java/com/cannolicatfish/rankine/client/integration/jei/categories/VolcanicGeneratorRecipeCategory.java +++ b/src/main/java/com/cannolicatfish/rankine/client/integration/jei/categories/VolcanicGeneratorRecipeCategory.java @@ -2,48 +2,43 @@ import com.cannolicatfish.rankine.ProjectRankine; import com.cannolicatfish.rankine.recipe.RockGeneratorRecipe; -import com.google.common.collect.ImmutableList; -import com.mojang.blaze3d.vertex.PoseStack; -import com.mojang.blaze3d.systems.RenderSystem; import mezz.jei.api.constants.VanillaTypes; -import mezz.jei.api.gui.IRecipeLayout; +import mezz.jei.api.forge.ForgeTypes; +import mezz.jei.api.gui.builder.IRecipeLayoutBuilder; import mezz.jei.api.gui.drawable.IDrawable; import mezz.jei.api.helpers.IGuiHelper; -import mezz.jei.api.ingredients.IIngredients; +import mezz.jei.api.recipe.IFocusGroup; +import mezz.jei.api.recipe.RecipeIngredientRole; import mezz.jei.api.recipe.category.IRecipeCategory; +import net.minecraft.client.resources.language.I18n; import net.minecraft.network.chat.Component; import net.minecraft.network.chat.TextComponent; -import net.minecraft.world.level.block.Blocks; -import net.minecraft.client.resources.language.I18n; -import net.minecraft.world.item.ItemStack; -import net.minecraft.world.item.crafting.Ingredient; import net.minecraft.resources.ResourceLocation; - -import java.util.Arrays; -import java.util.Collections; -import java.util.List; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Items; +import net.minecraft.world.level.material.Fluids; +import net.minecraftforge.fluids.FluidStack; public class VolcanicGeneratorRecipeCategory implements IRecipeCategory { public static ResourceLocation UID = new ResourceLocation(ProjectRankine.MODID, "volcanic"); - private final IDrawable background; private final String localizedName; - private final IDrawable overlay; - private final IDrawable icon; + private final IDrawable background; + private final IGuiHelper guiHelper; public VolcanicGeneratorRecipeCategory(IGuiHelper guiHelper) { - background = guiHelper.createBlankDrawable(145, 95); + this.guiHelper = guiHelper; localizedName = I18n.get("rankine.jei.volcanic"); - overlay = guiHelper.createDrawable(new ResourceLocation(ProjectRankine.MODID, "textures/gui/volcanic_jei.png"), - 0, 15, 140, 90); - icon = guiHelper.createDrawableIngredient(new ItemStack(Blocks.OBSIDIAN)); + background = guiHelper.drawableBuilder(new ResourceLocation(ProjectRankine.MODID, "textures/gui/volcanic_jei.png"), 0, 0, 102, 64) + .addPadding(1, 0, 1, 0) + .build(); } - + @SuppressWarnings("removal") @Override public ResourceLocation getUid() { return UID; } - + @SuppressWarnings("removal") @Override public Class getRecipeClass() { return RockGeneratorRecipe.class; @@ -61,45 +56,16 @@ public IDrawable getBackground() { @Override public IDrawable getIcon() { - return icon; - } + return guiHelper.createDrawableIngredient(VanillaTypes.ITEM_STACK,new ItemStack(Items.OBSIDIAN)); - @Override - public void draw(RockGeneratorRecipe recipe, PoseStack ms, double mouseX, double mouseY) { - //RenderSystem.enableAlphaTest(); - RenderSystem.enableBlend(); - overlay.draw(ms, 0, 4); - RenderSystem.disableBlend(); - //RenderSystem.disableAlphaTest(); } @Override - public void setIngredients(RockGeneratorRecipe recipe, IIngredients iIngredients) { - ImmutableList.Builder> builder = ImmutableList.builder(); - for (Ingredient i : recipe.getIngredients()) { - builder.add(Arrays.asList(i.getItems())); - } - iIngredients.setInputLists(VanillaTypes.ITEM, builder.build()); - iIngredients.setOutputs(VanillaTypes.ITEM, Collections.singletonList(recipe.getResultItem())); - } - - @Override - public void setRecipe(IRecipeLayout recipeLayout, RockGeneratorRecipe recipe, IIngredients ingredients) { - int index = 0, posY = 0; - for (List o : ingredients.getInputs(VanillaTypes.ITEM)) { - if (index == 0) { - recipeLayout.getItemStacks().init(index, true, 38, 40); - } else { - recipeLayout.getItemStacks().init(index, true, 38, 58); - } - recipeLayout.getItemStacks().set(index, o); - index++; - } - - for (int i = 0; i < ingredients.getOutputs(VanillaTypes.ITEM).size(); i++) { - List stacks = ingredients.getOutputs(VanillaTypes.ITEM).get(i); - recipeLayout.getItemStacks().init(index + i, false, 95, 40); - recipeLayout.getItemStacks().set(index + i, stacks); - } + public void setRecipe(IRecipeLayoutBuilder builder, RockGeneratorRecipe recipe, IFocusGroup focuses) { + builder.addSlot(RecipeIngredientRole.INPUT,25,46).addIngredients(recipe.getFirstIngredient()); + builder.addSlot(RecipeIngredientRole.INPUT,2,2).addIngredient(ForgeTypes.FLUID_STACK, new FluidStack(Fluids.WATER,1000)); + builder.addSlot(RecipeIngredientRole.INPUT,25,28).addIngredient(ForgeTypes.FLUID_STACK, new FluidStack(Fluids.LAVA,1000)); + builder.addSlot(RecipeIngredientRole.OUTPUT,80,27).addItemStack(recipe.getResultItem()); + IRecipeCategory.super.setRecipe(builder, recipe, focuses); } } diff --git a/src/main/java/com/cannolicatfish/rankine/client/integration/jei/recipes/BatteryRecipe.java b/src/main/java/com/cannolicatfish/rankine/client/integration/jei/recipes/BatteryRecipe.java new file mode 100644 index 0000000000..bdffd83267 --- /dev/null +++ b/src/main/java/com/cannolicatfish/rankine/client/integration/jei/recipes/BatteryRecipe.java @@ -0,0 +1,28 @@ +package com.cannolicatfish.rankine.client.integration.jei.recipes; + +import com.google.common.base.Preconditions; +import net.minecraft.world.item.ItemStack; + +import java.util.Collection; +import java.util.List; + +public class BatteryRecipe implements IBatteryRecipe{ + private final List inputs; + private final int charge; + + public BatteryRecipe(Collection input, int charge) { + Preconditions.checkArgument(charge > 0, "charge must be greater than 0"); + this.inputs = List.copyOf(input); + this.charge = charge; + } + + @Override + public List getInputs() { + return inputs; + } + + @Override + public int getBatteryCharge() { + return charge; + } +} diff --git a/src/main/java/com/cannolicatfish/rankine/client/integration/jei/recipes/IBatteryRecipe.java b/src/main/java/com/cannolicatfish/rankine/client/integration/jei/recipes/IBatteryRecipe.java new file mode 100644 index 0000000000..75e6cff782 --- /dev/null +++ b/src/main/java/com/cannolicatfish/rankine/client/integration/jei/recipes/IBatteryRecipe.java @@ -0,0 +1,22 @@ +package com.cannolicatfish.rankine.client.integration.jei.recipes; + +import net.minecraft.world.item.ItemStack; +import org.jetbrains.annotations.Unmodifiable; + +import javax.annotation.Nonnegative; +import java.util.List; + +public interface IBatteryRecipe { + + /** + * @return the inputs that act as a battery + */ + @Unmodifiable + List getInputs(); + + /** + * @return the battery's duration in ticks. Always greater than 0. + */ + @Nonnegative + int getBatteryCharge(); +} diff --git a/src/main/java/com/cannolicatfish/rankine/client/integration/jei/recipes/IRankineCauldronRecipe.java b/src/main/java/com/cannolicatfish/rankine/client/integration/jei/recipes/IRankineCauldronRecipe.java new file mode 100644 index 0000000000..1e40d95f99 --- /dev/null +++ b/src/main/java/com/cannolicatfish/rankine/client/integration/jei/recipes/IRankineCauldronRecipe.java @@ -0,0 +1,40 @@ +package com.cannolicatfish.rankine.client.integration.jei.recipes; + +import net.minecraft.world.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; +import org.jetbrains.annotations.Nullable; +import org.jetbrains.annotations.Unmodifiable; + +public interface IRankineCauldronRecipe { + + /** + * @return the fluid input for the recipe + */ + @Unmodifiable + FluidStack getInputFluid(); + + /** + * @return the item used to gain the item output (bucket or bottle) + */ + ItemStack getFluidHolderItem(); + + /** + * @return the output if bottled/bucketed + */ + @Unmodifiable + ItemStack getHolderOutputItem(); + + /** + * @return the fluid output for the recipe if dried + */ + @Nullable + @Unmodifiable + FluidStack getOutputFluid(); + + /** + * @return the item output for the recipe if dried + */ + @Nullable + @Unmodifiable + ItemStack getOutputItem(); +} diff --git a/src/main/java/com/cannolicatfish/rankine/client/integration/jei/recipes/RankineCauldronDryingRecipe.java b/src/main/java/com/cannolicatfish/rankine/client/integration/jei/recipes/RankineCauldronDryingRecipe.java new file mode 100644 index 0000000000..7ff5316710 --- /dev/null +++ b/src/main/java/com/cannolicatfish/rankine/client/integration/jei/recipes/RankineCauldronDryingRecipe.java @@ -0,0 +1,56 @@ +package com.cannolicatfish.rankine.client.integration.jei.recipes; + +import net.minecraft.world.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; +import org.jetbrains.annotations.Nullable; +import org.jetbrains.annotations.Unmodifiable; + +public class RankineCauldronDryingRecipe implements IRankineCauldronRecipe { + + FluidStack inputFluid; + ItemStack fluidHolderItem; + ItemStack holderOutputItem; + FluidStack outputFluid; + ItemStack outputItem; + + + public RankineCauldronDryingRecipe(FluidStack input, ItemStack holder, ItemStack holderOutput, ItemStack output) { + this.inputFluid = input; + this.holderOutputItem = holderOutput; + this.fluidHolderItem = holder; + this.outputItem = output; + this.outputFluid = null; + } + + public RankineCauldronDryingRecipe(FluidStack input, ItemStack holder, ItemStack holderOutput, FluidStack output) { + this.inputFluid = input; + this.holderOutputItem = holderOutput; + this.fluidHolderItem = holder; + this.outputFluid = output; + this.outputItem = null; + } + @Override + public @Unmodifiable FluidStack getInputFluid() { + return this.inputFluid; + } + + @Override + public ItemStack getFluidHolderItem() { + return this.fluidHolderItem; + } + + @Override + public @Unmodifiable ItemStack getHolderOutputItem() { + return this.holderOutputItem; + } + + @Override + public @Nullable @Unmodifiable FluidStack getOutputFluid() { + return this.outputFluid; + } + + @Override + public @Nullable @Unmodifiable ItemStack getOutputItem() { + return this.outputItem; + } +} diff --git a/src/main/java/com/cannolicatfish/rankine/client/integration/jei/RankineJEIRecipes.java b/src/main/java/com/cannolicatfish/rankine/client/integration/jei/recipes/RankineJEIRecipes.java similarity index 66% rename from src/main/java/com/cannolicatfish/rankine/client/integration/jei/RankineJEIRecipes.java rename to src/main/java/com/cannolicatfish/rankine/client/integration/jei/recipes/RankineJEIRecipes.java index 734a206848..2715ce94e1 100644 --- a/src/main/java/com/cannolicatfish/rankine/client/integration/jei/RankineJEIRecipes.java +++ b/src/main/java/com/cannolicatfish/rankine/client/integration/jei/recipes/RankineJEIRecipes.java @@ -1,12 +1,20 @@ -package com.cannolicatfish.rankine.client.integration.jei; +package com.cannolicatfish.rankine.client.integration.jei.recipes; +import com.cannolicatfish.rankine.blocks.cauldrons.AbstractRankineCauldronBlock; +import com.cannolicatfish.rankine.blocks.cauldrons.MapleSyrupCauldronBlock; import com.cannolicatfish.rankine.init.RankineRecipeTypes; +import com.cannolicatfish.rankine.items.BatteryItem; import com.cannolicatfish.rankine.recipe.*; import com.cannolicatfish.rankine.util.RockGeneratorUtils; -import mezz.jei.api.recipe.category.IRecipeCategory; import net.minecraft.client.Minecraft; import net.minecraft.client.multiplayer.ClientLevel; +import net.minecraft.world.item.BucketItem; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Items; import net.minecraft.world.item.crafting.RecipeManager; +import net.minecraft.world.level.material.Fluids; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.registries.ForgeRegistries; import javax.annotation.Nullable; import java.util.List; @@ -22,6 +30,28 @@ public RankineJEIRecipes() { this.recipeManager = world.getRecipeManager(); } + public List getCauldronRecipes() { + return ForgeRegistries.BLOCKS.getValues().stream().filter(block -> block instanceof AbstractRankineCauldronBlock && !(block instanceof MapleSyrupCauldronBlock)).map(block -> (AbstractRankineCauldronBlock) block) + .mapMulti((block, consumer) -> { + if (block.getTransformFluid() == Fluids.EMPTY || block.getTransformFluid() == null) { + consumer.accept(new RankineCauldronDryingRecipe(!block.getFluid().equals(Fluids.EMPTY) ? new FluidStack(block.getFluid(), 1000) : FluidStack.EMPTY, block.getBottle() instanceof BucketItem ? Items.BUCKET.getDefaultInstance() : Items.GLASS_BOTTLE.getDefaultInstance(), block.getBottle().getDefaultInstance(), block.getOutput().getDefaultInstance())); + } else { + consumer.accept(new RankineCauldronDryingRecipe(!block.getFluid().equals(Fluids.EMPTY) ? new FluidStack(block.getFluid(), 1000) : FluidStack.EMPTY,block.getBottle() instanceof BucketItem ? Items.BUCKET.getDefaultInstance() : Items.GLASS_BOTTLE.getDefaultInstance(), block.getBottle().getDefaultInstance(), new FluidStack(block.getTransformFluid(),1000))); + } + + }).collect(Collectors.toList()); + + } + public List getBatteryRecipes() { + return ForgeRegistries.ITEMS.getValues().stream().filter(item -> item instanceof BatteryItem).mapMulti((item, consumer) -> { + int charge = item.getDefaultInstance().getMaxDamage(); + if (charge > 0) { + consumer.accept(new BatteryRecipe(List.of(new ItemStack(item)), charge)); + } + }).collect(Collectors.toList()); + + } + public List getCrushingRecipes() { return recipeManager.getAllRecipesFor(RankineRecipeTypes.CRUSHING); } diff --git a/src/main/java/com/cannolicatfish/rankine/client/renders/RankineBoatRenderer.java b/src/main/java/com/cannolicatfish/rankine/client/renders/RankineBoatRenderer.java index 8a01571d6d..97b7cdccb0 100644 --- a/src/main/java/com/cannolicatfish/rankine/client/renders/RankineBoatRenderer.java +++ b/src/main/java/com/cannolicatfish/rankine/client/renders/RankineBoatRenderer.java @@ -58,7 +58,6 @@ public class RankineBoatRenderer extends EntityRenderer { }; private final Map> boatResources; - public Pair getModelWithLocation(Boat boat) { return this.boatResources.get(boat.getBoatType()); } public static final RankineBoatRenderer.RenderFactory instance = new RankineBoatRenderer.RenderFactory(); @@ -69,7 +68,7 @@ public RankineBoatRenderer(EntityRendererProvider.Context renderManagerIn) this.boatResources = Stream.of(Boat.Type.values()).collect(ImmutableMap.toImmutableMap((p_173938_) -> { return p_173938_; }, (p_173941_) -> { - return Pair.of(new ResourceLocation("textures/entity/boat/" + p_173941_.getName() + ".png"), new BoatModel(renderManagerIn.bakeLayer(ModelLayers.createBoatModelName(p_173941_)))); + return Pair.of(new ResourceLocation("rankine:textures/entity/boat/" + p_173941_.getName() + ".png"), new BoatModel(renderManagerIn.bakeLayer(ModelLayers.createBoatModelName(p_173941_)))); })); } @@ -98,7 +97,7 @@ public void render(RankineBoatEntity p_113929_, float p_113930_, float p_113931_ p_113932_.scale(-1.0F, -1.0F, 1.0F); p_113932_.mulPose(Vector3f.YP.rotationDegrees(90.0F)); boatmodel.setupAnim(p_113929_, p_113931_, 0.0F, -0.1F, 0.0F, 0.0F); - VertexConsumer vertexconsumer = p_113933_.getBuffer(boatmodel.renderType(resourcelocation)); + VertexConsumer vertexconsumer = p_113933_.getBuffer(boatmodel.renderType(this.getTextureLocation(p_113929_))); boatmodel.renderToBuffer(p_113932_, vertexconsumer, p_113934_, OverlayTexture.NO_OVERLAY, 1.0F, 1.0F, 1.0F, 1.0F); if (!p_113929_.isUnderWater()) { VertexConsumer vertexconsumer1 = p_113933_.getBuffer(RenderType.waterMask()); @@ -109,11 +108,14 @@ public void render(RankineBoatEntity p_113929_, float p_113930_, float p_113931_ super.render(p_113929_, p_113930_, p_113931_, p_113932_, p_113933_, p_113934_); } + @Override public ResourceLocation getTextureLocation(RankineBoatEntity entity) { return BOAT_TEXTURES[entity.getRankineBoatType().ordinal()]; } + public Pair getModelWithLocation(Boat boat) { return this.boatResources.get(boat.getBoatType()); } + public static class RenderFactory implements EntityRendererProvider { @Override public EntityRenderer create(Context manager) { diff --git a/src/main/java/com/cannolicatfish/rankine/data/DataGenerators.java b/src/main/java/com/cannolicatfish/rankine/data/DataGenerators.java index 67414a8afc..d6289d2b2f 100644 --- a/src/main/java/com/cannolicatfish/rankine/data/DataGenerators.java +++ b/src/main/java/com/cannolicatfish/rankine/data/DataGenerators.java @@ -31,7 +31,6 @@ public static void gatherData(GatherDataEvent event) { gen.addProvider(new RankineItemModelProvider(gen, event.getExistingFileHelper())); RankineLangProvider langProvider = new RankineLangProvider(gen, "en_us"); - gen.addProvider(new RankineModonomiconBookProvider(gen, ProjectRankine.MODID, langProvider)); gen.addProvider(langProvider); } } diff --git a/src/main/java/com/cannolicatfish/rankine/data/RankineBlockLootTables.java b/src/main/java/com/cannolicatfish/rankine/data/RankineBlockLootTables.java index cce6f3e422..236c6b9498 100644 --- a/src/main/java/com/cannolicatfish/rankine/data/RankineBlockLootTables.java +++ b/src/main/java/com/cannolicatfish/rankine/data/RankineBlockLootTables.java @@ -248,7 +248,7 @@ protected void addTables() { lootTables.put(RankineBlocks.TETRATAENITE_ORE.get(), createBlockLootTable(RankineBlocks.TETRATAENITE_ORE.get())); lootTables.put(RankineBlocks.ANTITAENITE_ORE.get(), createBlockLootTable(RankineBlocks.ANTITAENITE_ORE.get())); lootTables.put(RankineBlocks.KAMACITE_ORE.get(), createBlockLootTable(RankineBlocks.KAMACITE_ORE.get())); - + lootTables.put(RankineBlocks.BATTERY_CHARGER.get(), droppingWithName(RankineBlocks.BATTERY_CHARGER.get())); lootTables.put(RankineBlocks.MIXING_BARREL.get(), droppingWithName(RankineBlocks.MIXING_BARREL.get())); lootTables.put(RankineBlocks.FUSION_FURNACE.get(), droppingWithName(RankineBlocks.FUSION_FURNACE.get())); lootTables.put(RankineBlocks.ALLOY_FURNACE.get(), droppingWithName(RankineBlocks.ALLOY_FURNACE.get())); diff --git a/src/main/java/com/cannolicatfish/rankine/data/RankineBlockStateProvider.java b/src/main/java/com/cannolicatfish/rankine/data/RankineBlockStateProvider.java index f41d1f0238..c27c0dbcbc 100644 --- a/src/main/java/com/cannolicatfish/rankine/data/RankineBlockStateProvider.java +++ b/src/main/java/com/cannolicatfish/rankine/data/RankineBlockStateProvider.java @@ -623,7 +623,7 @@ protected void registerStatesAndModels() { simpleBlock(RankineBlocks.REACTION_CHAMBER_CORE.get()); simpleBlock(RankineBlocks.DIAMOND_ANVIL_CELL.get()); simpleBlock(RankineBlocks.PARTICLE_ACCELERATOR.get()); - simpleBlock(RankineBlocks.SEDIMENT_FAN.get()); + simpleBlock(RankineBlocks.SEDIMENT_FAN.get(), models().cubeColumn("sediment_fan",getBlockRSL("sediment_fan_front"),getBlockRSL("sediment_fan_side"))); simpleBlock(RankineBlocks.CARBON_DIOXIDE_FUMAROLE.get()); simpleBlock(RankineBlocks.HYDROGEN_CHLORIDE_FUMAROLE.get()); simpleBlock(RankineBlocks.HYDROGEN_SULFIDE_FUMAROLE.get()); @@ -639,6 +639,7 @@ protected void registerStatesAndModels() { onOffBlock(RankineBlocks.ALLOY_FURNACE.get(), models().cubeBottomTop(RankineBlocks.ALLOY_FURNACE.get().getRegistryName().getPath(), getBlockRSL("alloy_furnace_front"), getBlockRSL("refractory_bricks"), getBlockRSL("alloy_furnace_top")), models().cubeBottomTop(RankineBlocks.ALLOY_FURNACE.get().getRegistryName().getPath()+"_on", getBlockRSL("alloy_furnace_front_on"), getBlockRSL("refractory_bricks"), getBlockRSL("alloy_furnace_top"))); rotateableMachineBlock(RankineBlocks.INDUCTION_FURNACE.get(), models().orientable(RankineBlocks.INDUCTION_FURNACE.get().getRegistryName().getPath(), getBlockRSL("induction_furnace_side"), getBlockRSL("induction_furnace_front"), getBlockRSL("induction_furnace_top")), models().orientable(RankineBlocks.INDUCTION_FURNACE.get().getRegistryName().getPath()+"_on", getBlockRSL("induction_furnace_side"), getBlockRSL("induction_furnace_front"), getBlockRSL("induction_furnace_top_on"))); rotateableMachineBlock(RankineBlocks.FUSION_FURNACE.get(), models().orientable(RankineBlocks.FUSION_FURNACE.get().getRegistryName().getPath(), getBlockRSL("fusion_furnace_side"), getBlockRSL("fusion_furnace_front"), getBlockRSL("fusion_furnace_top")), models().orientable(RankineBlocks.FUSION_FURNACE.get().getRegistryName().getPath()+"_on", getBlockRSL("fusion_furnace_side"), getBlockRSL("fusion_furnace_front_on"), getBlockRSL("fusion_furnace_top"))); + directionalBlock(RankineBlocks.BATTERY_CHARGER.get(), models().orientable(RankineBlocks.BATTERY_CHARGER.get().getRegistryName().getPath(), getBlockRSL("battery_charger_side"), getBlockRSL("battery_charger_front"), getBlockRSL("battery_charger_top"))); simpleBlock(RankineBlocks.PISTON_CRUSHER.get()); simpleBlock(RankineBlocks.GYRATORY_CRUSHER.get()); diff --git a/src/main/java/com/cannolicatfish/rankine/data/RankineBlockTagsProvider.java b/src/main/java/com/cannolicatfish/rankine/data/RankineBlockTagsProvider.java index 6320ebb207..27d671ef86 100644 --- a/src/main/java/com/cannolicatfish/rankine/data/RankineBlockTagsProvider.java +++ b/src/main/java/com/cannolicatfish/rankine/data/RankineBlockTagsProvider.java @@ -152,7 +152,7 @@ protected void addTags() { tag(BlockTags.MINEABLE_WITH_AXE).add(blk); } for (Block blk : Stream.of(RankineLists.NEEDS_WOODEN_TOOL_ORES,RankineLists.NEEDS_STONE_TOOL_ORES,RankineLists.NEEDS_IRON_TOOL_ORES,RankineLists.NEEDS_DIAMOND_TOOL_ORES,RankineLists.NEEDS_NETHERITE_TOOL_ORES,RankineLists.GLAZED_PORCELAIN_BLOCKS,RankineLists.CRUSHING_HEADS,RankineLists.ELECTROMAGNETS,RankineLists.DRIPSTONES,RankineLists.POINTED_DRIPSTONES,RankineLists.VANILLA_BRICKS,RankineLists.VANILLA_BRICKS_SLABS,RankineLists.VANILLA_BRICKS_STAIRS,RankineLists.VANILLA_BRICKS_WALLS,RankineLists.VANILLA_BRICKS_PRESSURE_PLATES,RankineLists.SANDSTONES,RankineLists.SANDSTONE_SLABS,RankineLists.SANDSTONE_STAIRS,RankineLists.SANDSTONE_WALLS,RankineLists.CUT_SANDSTONES,RankineLists.CUT_SANDSTONE_SLABS,RankineLists.CHISELED_SANDSTONES,RankineLists.SMOOTH_SANDSTONES,RankineLists.SMOOTH_SANDSTONE_SLABS,RankineLists.SMOOTH_SANDSTONE_STAIRS,RankineLists.SMOOTH_SANDSTONE_WALLS,RankineLists.BRICKS,RankineLists.BRICKS_SLAB,RankineLists.BRICKS_STAIRS,RankineLists.BRICKS_WALL,RankineLists.SHEETMETALS,RankineLists.ALLOY_SHEETMETALS,RankineLists.GEODES,RankineLists.LEDS,RankineLists.METAL_DOORS,RankineLists.METAL_TRAPDOORS,RankineLists.ALLOY_LADDERS,RankineLists.ELEMENT_BLOCKS,RankineLists.ALLOY_BLOCKS,RankineLists.ALLOY_BARS,RankineLists.ALLOY_POLES,RankineLists.ALLOY_PEDESTALS,RankineLists.LANTERNS,RankineLists.LIGHTNING_GLASSES,RankineLists.ASPHALT_BLOCKS,RankineLists.GREEN_ASPHALT_BLOCKS,RankineLists.BLUE_ASPHALT_BLOCKS,RankineLists.DARK_GRAY_ASPHALT_BLOCKS,RankineLists.RED_ASPHALT_BLOCKS,RankineLists.GRAY_ASPHALT_BLOCKS,RankineLists.CONCRETE_STAIRS,RankineLists.CONCRETE_BLOCKS,RankineLists.CONCRETE_WALLS,RankineLists.QUARTER_SLABS,RankineLists.MINERAL_BLOCKS, - Arrays.asList(RankineBlocks.SLATE_STEPPING_STONES.get(),RankineBlocks.SODIUM_VAPOR_LAMP.get(),RankineBlocks.SEDIMENT_FAN.get(),RankineBlocks.METAL_PIPE.get(),RankineBlocks.GROUND_TAP.get(),RankineBlocks.ORNAMENT.get(),RankineBlocks.REACTION_CHAMBER_CELL.get(),RankineBlocks.GAS_BOTTLER.get(),RankineBlocks.GAS_VENT.get(),RankineBlocks.REACTION_CHAMBER_CORE.get(),RankineBlocks.AIR_DISTILLATION_PACKING.get(),RankineBlocks.DISTILLATION_TOWER.get(),RankineBlocks.FUSION_FURNACE.get(),RankineBlocks.PARTICLE_ACCELERATOR.get(),RankineBlocks.DIAMOND_ANVIL_CELL.get(),RankineBlocks.EVAPORATION_TOWER.get(),RankineBlocks.GYRATORY_CRUSHER.get(),RankineBlocks.INDUCTION_FURNACE.get(),RankineBlocks.PISTON_CRUSHER.get(),RankineBlocks.ALLOY_FURNACE.get(),RankineBlocks.CRUCIBLE_BLOCK.get(),RankineBlocks.MIXING_BARREL.get(),RankineBlocks.BEEHIVE_OVEN_PIT.get(),RankineBlocks.GWIHABAITE_CRYSTAL.get(),RankineBlocks.FLOOD_GATE.get(),RankineBlocks.GREEN_TEKTITE.get(),RankineBlocks.GRAY_TEKTITE.get(),RankineBlocks.BROWN_TEKTITE.get(),RankineBlocks.BLACK_TEKTITE.get(),RankineBlocks.ENSTATITE_CHONDRITE_BRICKS.get(),RankineBlocks.ENSTATITE_CHONDRITE.get(),RankineBlocks.FROZEN_METEORITE.get(),RankineBlocks.FROZEN_METEORITE_BRICKS.get(),RankineBlocks.METEORITE_BRICKS.get(),RankineBlocks.METEORITE.get(),RankineBlocks.GEODE.get(),RankineBlocks.FULGURITE.get(),RankineBlocks.CHECKERED_MARBLE.get(),RankineBlocks.CHECKERED_MARBLE_WALL.get(),RankineBlocks.CHECKERED_MARBLE_STAIRS.get(),RankineBlocks.CHECKERED_MARBLE_SLAB.get(),RankineBlocks.PORCELAIN.get(),RankineBlocks.BLOOD_OBSIDIAN.get(),RankineBlocks.SNOWFLAKE_OBSIDIAN.get(),RankineBlocks.BONE_CHAR_BLOCK.get(),RankineBlocks.KOMATIITIC_TUFF.get(),RankineBlocks.KIMBERLITIC_TUFF.get(),RankineBlocks.BASALTIC_TUFF.get(),RankineBlocks.RHYOLITIC_TUFF.get(),RankineBlocks.ANDESITIC_TUFF.get(),RankineBlocks.PHOSPHORITE.get(),RankineBlocks.SYLVINITE.get(),RankineBlocks.BANDED_IRON_FORMATION.get(),RankineBlocks.ENDER_SHIRO.get(),RankineBlocks.SKARN.get(),RankineBlocks.SKARN_SLAB.get(),RankineBlocks.SKARN_STAIRS.get(),RankineBlocks.SKARN_WALL.get(),RankineBlocks.BRECCIA.get(),RankineBlocks.BRECCIA_SLAB.get(),RankineBlocks.BRECCIA_STAIRS.get(),RankineBlocks.BRECCIA_WALL.get(),RankineBlocks.ICE_BRICKS.get(),RankineBlocks.ICE_BRICKS_SLAB.get(),RankineBlocks.ICE_BRICKS_STAIRS.get(),RankineBlocks.ICE_BRICKS_WALL.get(),RankineBlocks.SCORIA.get(),RankineBlocks.PUMICE.get(),RankineBlocks.DRY_ICE.get(),RankineBlocks.METEORIC_ICE.get(),RankineBlocks.SULFUR_DIOXIDE_FUMAROLE.get(),RankineBlocks.HYDROGEN_SULFIDE_FUMAROLE.get(),RankineBlocks.HYDROGEN_CHLORIDE_FUMAROLE.get(),RankineBlocks.CARBON_DIOXIDE_FUMAROLE.get(),RankineBlocks.FUMAROLE_DEPOSIT.get())).flatMap(Collection::stream).collect(Collectors.toList())) { + Arrays.asList(RankineBlocks.SLATE_STEPPING_STONES.get(),RankineBlocks.SODIUM_VAPOR_LAMP.get(),RankineBlocks.SEDIMENT_FAN.get(),RankineBlocks.METAL_PIPE.get(),RankineBlocks.GROUND_TAP.get(),RankineBlocks.ORNAMENT.get(),RankineBlocks.REACTION_CHAMBER_CELL.get(),RankineBlocks.GAS_BOTTLER.get(),RankineBlocks.GAS_VENT.get(),RankineBlocks.REACTION_CHAMBER_CORE.get(),RankineBlocks.AIR_DISTILLATION_PACKING.get(),RankineBlocks.DISTILLATION_TOWER.get(),RankineBlocks.BATTERY_CHARGER.get(),RankineBlocks.FUSION_FURNACE.get(),RankineBlocks.PARTICLE_ACCELERATOR.get(),RankineBlocks.DIAMOND_ANVIL_CELL.get(),RankineBlocks.EVAPORATION_TOWER.get(),RankineBlocks.GYRATORY_CRUSHER.get(),RankineBlocks.INDUCTION_FURNACE.get(),RankineBlocks.PISTON_CRUSHER.get(),RankineBlocks.ALLOY_FURNACE.get(),RankineBlocks.CRUCIBLE_BLOCK.get(),RankineBlocks.MIXING_BARREL.get(),RankineBlocks.BEEHIVE_OVEN_PIT.get(),RankineBlocks.GWIHABAITE_CRYSTAL.get(),RankineBlocks.FLOOD_GATE.get(),RankineBlocks.GREEN_TEKTITE.get(),RankineBlocks.GRAY_TEKTITE.get(),RankineBlocks.BROWN_TEKTITE.get(),RankineBlocks.BLACK_TEKTITE.get(),RankineBlocks.ENSTATITE_CHONDRITE_BRICKS.get(),RankineBlocks.ENSTATITE_CHONDRITE.get(),RankineBlocks.FROZEN_METEORITE.get(),RankineBlocks.FROZEN_METEORITE_BRICKS.get(),RankineBlocks.METEORITE_BRICKS.get(),RankineBlocks.METEORITE.get(),RankineBlocks.GEODE.get(),RankineBlocks.FULGURITE.get(),RankineBlocks.CHECKERED_MARBLE.get(),RankineBlocks.CHECKERED_MARBLE_WALL.get(),RankineBlocks.CHECKERED_MARBLE_STAIRS.get(),RankineBlocks.CHECKERED_MARBLE_SLAB.get(),RankineBlocks.PORCELAIN.get(),RankineBlocks.BLOOD_OBSIDIAN.get(),RankineBlocks.SNOWFLAKE_OBSIDIAN.get(),RankineBlocks.BONE_CHAR_BLOCK.get(),RankineBlocks.KOMATIITIC_TUFF.get(),RankineBlocks.KIMBERLITIC_TUFF.get(),RankineBlocks.BASALTIC_TUFF.get(),RankineBlocks.RHYOLITIC_TUFF.get(),RankineBlocks.ANDESITIC_TUFF.get(),RankineBlocks.PHOSPHORITE.get(),RankineBlocks.SYLVINITE.get(),RankineBlocks.BANDED_IRON_FORMATION.get(),RankineBlocks.ENDER_SHIRO.get(),RankineBlocks.SKARN.get(),RankineBlocks.SKARN_SLAB.get(),RankineBlocks.SKARN_STAIRS.get(),RankineBlocks.SKARN_WALL.get(),RankineBlocks.BRECCIA.get(),RankineBlocks.BRECCIA_SLAB.get(),RankineBlocks.BRECCIA_STAIRS.get(),RankineBlocks.BRECCIA_WALL.get(),RankineBlocks.ICE_BRICKS.get(),RankineBlocks.ICE_BRICKS_SLAB.get(),RankineBlocks.ICE_BRICKS_STAIRS.get(),RankineBlocks.ICE_BRICKS_WALL.get(),RankineBlocks.SCORIA.get(),RankineBlocks.PUMICE.get(),RankineBlocks.DRY_ICE.get(),RankineBlocks.METEORIC_ICE.get(),RankineBlocks.SULFUR_DIOXIDE_FUMAROLE.get(),RankineBlocks.HYDROGEN_SULFIDE_FUMAROLE.get(),RankineBlocks.HYDROGEN_CHLORIDE_FUMAROLE.get(),RankineBlocks.CARBON_DIOXIDE_FUMAROLE.get(),RankineBlocks.FUMAROLE_DEPOSIT.get())).flatMap(Collection::stream).collect(Collectors.toList())) { tag(BlockTags.MINEABLE_WITH_PICKAXE).add(blk); } diff --git a/src/main/java/com/cannolicatfish/rankine/data/RankineItemModelProvider.java b/src/main/java/com/cannolicatfish/rankine/data/RankineItemModelProvider.java index 975749e0e6..13c061fb70 100644 --- a/src/main/java/com/cannolicatfish/rankine/data/RankineItemModelProvider.java +++ b/src/main/java/com/cannolicatfish/rankine/data/RankineItemModelProvider.java @@ -309,6 +309,7 @@ protected void registerModels() { basicItem(RankineItems.EMERGENCY_FLOTATION_DEVICE.get()); basicItem(RankineItems.ELEMENT.get()); basicItem(RankineItems.BUILDING_TOOL.get()); + basicItem(RankineItems.GAS_DETECTOR.get()); basicItem(RankineItems.ORE_DETECTOR.get()); basicItem(RankineItems.PROSPECTING_STICK.get()); basicItem(RankineItems.PACKAGED_TOOL.get()); @@ -337,6 +338,7 @@ protected void registerModels() { basicItem(RankineItems.TOTEM_OF_INFUSING.get()); basicItem(RankineItems.TOTEM_OF_INVIGORATING.get()); basicItem(RankineItems.TOTEM_OF_LEVITATING.get()); + basicItem(RankineItems.TOTEM_OF_POWERING.get()); basicItem(RankineItems.TOTEM_OF_PROMISING.get()); basicItem(RankineItems.TOTEM_OF_REPULSING.get()); basicItem(RankineItems.TOTEM_OF_SOFTENING.get()); @@ -416,6 +418,7 @@ protected void registerModels() { RankineBlocks.AIR_DISTILLATION_PACKING.get(), RankineBlocks.REACTION_CHAMBER_CELL.get(), RankineBlocks.REACTION_CHAMBER_CORE.get(), + RankineBlocks.BATTERY_CHARGER.get(), RankineBlocks.FUSION_FURNACE.get(), RankineBlocks.BEEHIVE_OVEN_PIT.get(), RankineBlocks.ALLOY_FURNACE.get(), @@ -483,7 +486,7 @@ protected void registerModels() { } for (Item TOOL : Stream.of(RankineLists.WOODEN_TOOLS,RankineLists.STONE_TOOLS, RankineLists.FLINT_TOOLS, RankineLists.BRONZE_TOOLS, RankineLists.ALLOY_TOOLS, RankineLists.PEWTER_TOOLS, RankineLists.INVAR_TOOLS, RankineLists.TITANIUM_ALLOY_TOOLS, RankineLists.ZIRCONIUM_ALLOY_TOOLS, RankineLists.NIOBIUM_ALLOY_TOOLS, RankineLists.STEEL_TOOLS, RankineLists.STAINLESS_STEEL_TOOLS, RankineLists.COBALT_SUPERALLOY_TOOLS, RankineLists.NICKEL_SUPERALLOY_TOOLS, RankineLists.TUNGSTEN_HEAVY_ALLOY_TOOLS, RankineLists.BLACK_GOLD_TOOLS, RankineLists.BLUE_GOLD_TOOLS, RankineLists.GREEN_GOLD_TOOLS, RankineLists.ROSE_GOLD_TOOLS, RankineLists.PURPLE_GOLD_TOOLS, RankineLists.WHITE_GOLD_TOOLS, RankineLists.OSMIRIDIUM_TOOLS, RankineLists.AMALGAM_TOOLS, RankineLists.ENDER_AMALGAM_TOOLS).flatMap(Collection::stream).collect(Collectors.toList())) { - if (TOOL instanceof AlloyCrowbarItem || TOOL.equals(RankineItems.ALLOY_SURF_ROD.get())) { + if (TOOL instanceof AlloyCrowbarItem ) { basicItemHandheldRod(TOOL); } else if (TOOL instanceof SpearItem) { //need custom model diff --git a/src/main/java/com/cannolicatfish/rankine/data/RankineItemTagsProvider.java b/src/main/java/com/cannolicatfish/rankine/data/RankineItemTagsProvider.java index aacdb5d628..ef0d59207a 100644 --- a/src/main/java/com/cannolicatfish/rankine/data/RankineItemTagsProvider.java +++ b/src/main/java/com/cannolicatfish/rankine/data/RankineItemTagsProvider.java @@ -435,6 +435,7 @@ protected void addTags() { tag(RankineTags.Items.NUGGETS_GALINSTAN).add(RankineItems.GALINSTAN_NUGGET.get()); tag(RankineTags.Items.NUGGETS_OSMIRIDIUM).add(RankineItems.OSMIRIDIUM_NUGGET.get()); tag(RankineTags.Items.NUGGETS_SODIUM_POTASSIUM_ALLOY).add(RankineItems.SODIUM_POTASSIUM_ALLOY_NUGGET.get()); + tag(RankineTags.Items.NUGGETS_NEPTUNIUM_ALLOY).add(RankineItems.NEPTUNIUM_ALLOY_NUGGET.get()); tag(RankineTags.Items.NUGGETS_AMALGAM).add(RankineItems.AMALGAM_NUGGET.get()); tag(RankineTags.Items.NUGGETS_ENDER_AMALGAM).add(RankineItems.ENDER_AMALGAM_NUGGET.get()); tag(RankineTags.Items.NUGGETS_ROSE_GOLD).add(RankineItems.ROSE_GOLD_NUGGET.get()); @@ -587,6 +588,7 @@ protected void addTags() { tag(RankineTags.Items.INGOTS_GALINSTAN).add(RankineItems.GALINSTAN_INGOT.get()); tag(RankineTags.Items.INGOTS_OSMIRIDIUM).add(RankineItems.OSMIRIDIUM_INGOT.get()); tag(RankineTags.Items.INGOTS_SODIUM_POTASSIUM_ALLOY).add(RankineItems.SODIUM_POTASSIUM_ALLOY_INGOT.get()); + tag(RankineTags.Items.INGOTS_NEPTUNIUM_ALLOY).add(RankineItems.NEPTUNIUM_ALLOY_INGOT.get()); tag(RankineTags.Items.INGOTS_AMALGAM).add(RankineItems.AMALGAM_INGOT.get()); tag(RankineTags.Items.INGOTS_ENDER_AMALGAM).add(RankineItems.ENDER_AMALGAM_INGOT.get()); tag(RankineTags.Items.INGOTS_ROSE_GOLD).add(RankineItems.ROSE_GOLD_INGOT.get()); @@ -653,7 +655,6 @@ protected void addTags() { tag(RankineTags.Items.GOLD_PANS).add(RankineItems.WOODEN_GOLD_PAN.get(), RankineItems.PEWTER_GOLD_PAN.get(), RankineItems.STEEL_GOLD_PAN.get()); tag(RankineTags.Items.SLUICING_TOOLS).addTags(RankineTags.Items.GOLD_PANS,RankineTags.Items.HAMMERS); tag(RankineTags.Items.BOWS).add(Items.BOW); - tag(RankineTags.Items.FISHING_RODS).add(Items.FISHING_ROD,RankineItems.ALLOY_SURF_ROD.get()); tag(RankineTags.Items.SHIELDS).add(Items.SHIELD); tag(RankineTags.Items.MTT_DURABILITY_TOOLS).add(Items.PISTON); @@ -819,6 +820,8 @@ protected void addTags() { tag(RankineTags.Items.ALKALI_HYDROXIDES).add(RankineItems.LITHIUM_HYDROXIDE.get(),RankineItems.SODIUM_HYDROXIDE.get(),RankineItems.POTASSIUM_HYDROXIDE.get(),RankineItems.RUBIDIUM_HYDROXIDE.get(),RankineItems.CESIUM_HYDROXIDE.get(),RankineItems.FRANCIUM_HYDROXIDE.get()); tag(RankineTags.Items.ELECTROMAGNETS).add(RankineItems.SIMPLE_ELECTROMAGNET.get(),RankineItems.ALNICO_ELECTROMAGNET.get(),RankineItems.RARE_EARTH_ELECTROMAGNET.get()); + tag(RankineTags.Items.BATTERIES).add(RankineItems.SILVER_ZINC_BATTERY.get(),RankineItems.MAGNESIUM_BATTERY.get(),RankineItems.LEAD_ACID_BATTERY.get(),RankineItems.VANADIUM_REDOX_BATTERY.get(),RankineItems.ZINC_BROMINE_BATTERY.get(),RankineItems.SODIUM_SULFUR_BATTERY.get(),RankineItems.LITHIUM_ION_BATTERY.get()); + tag(RankineTags.Items.RTG).add(RankineItems.STRONTIUM_RTG.get(),RankineItems.POLONIUM_RTG.get(),RankineItems.PLUTONIUM_RTG.get(),RankineItems.AMERICIUM_RTG.get(),RankineItems.CURIUM_RTG.get()); copy(RankineTags.Blocks.HARDENED_GLASS, RankineTags.Items.HARDENED_GLASS); copy(RankineTags.Blocks.CLAY, RankineTags.Items.CLAY); diff --git a/src/main/java/com/cannolicatfish/rankine/data/RankineLangProvider.java b/src/main/java/com/cannolicatfish/rankine/data/RankineLangProvider.java index bb3418fe64..0c9a74a5a0 100644 --- a/src/main/java/com/cannolicatfish/rankine/data/RankineLangProvider.java +++ b/src/main/java/com/cannolicatfish/rankine/data/RankineLangProvider.java @@ -6,8 +6,6 @@ import com.cannolicatfish.rankine.init.RankineBlocks; import com.cannolicatfish.rankine.init.RankineItems; import com.cannolicatfish.rankine.init.RankineLists; -import com.klikli_dev.modonomicon.api.ModonomiconAPI; -import com.klikli_dev.modonomicon.api.datagen.BookLangHelper; import net.minecraft.data.DataGenerator; import net.minecraft.world.item.Item; import net.minecraft.world.level.block.Block; @@ -176,6 +174,7 @@ protected void addTranslations() { RankineBlocks.SODIUM_VAPOR_LAMP.get(), RankineBlocks.ALLOY_FURNACE.get(), RankineBlocks.INDUCTION_FURNACE.get(), + RankineBlocks.BATTERY_CHARGER.get(), RankineBlocks.FUSION_FURNACE.get(), RankineBlocks.MIXING_BARREL.get(), RankineBlocks.CRUCIBLE_BLOCK.get(), @@ -424,6 +423,7 @@ protected void addTranslations() { RankineItems.ELEMENT.get(), RankineItems.ALLOY_TEMPLATE.get(), RankineItems.BUILDING_TOOL.get(), + RankineItems.GAS_DETECTOR.get(), RankineItems.ORE_DETECTOR.get(), RankineItems.PROSPECTING_STICK.get(), RankineItems.DOWSING_ROD.get(), @@ -453,6 +453,7 @@ protected void addTranslations() { RankineItems.TOTEM_OF_INFUSING.get(), RankineItems.TOTEM_OF_INVIGORATING.get(), RankineItems.TOTEM_OF_LEVITATING.get(), + RankineItems.TOTEM_OF_POWERING.get(), RankineItems.TOTEM_OF_PROMISING.get(), RankineItems.TOTEM_OF_REPULSING.get(), RankineItems.TOTEM_OF_SOFTENING.get(), @@ -515,6 +516,7 @@ protected void addTranslations() { add("item.rankine.packaged_tool_desc","Contains a completely random tool. Results may vary."); add("item.rankine.packaged_armor_desc","Contains a completely random armor item. Results may vary."); + add("rankine.battery.charge","Charge: %1$s/%2$s"); //Alloy Lang add("rankine.alloys","Alloys"); add("item.rankine.custom_alloy_default","Alloy"); @@ -556,6 +558,7 @@ protected void addTranslations() { add("item.rankine.rose_gold_nr_alloying", "Rose Netherite"); add("item.rankine.rose_metal_alloying", "Rose Metal"); add("item.rankine.sodium_potassium_alloy_alloying", "Sodium Potassium Alloy"); + add("item.rankine.neptunium_alloy_alloying", "Neptunium Alloy"); add("item.rankine.solder_ag_alloying", "Solder"); add("item.rankine.solder_pb_alloying", "Solder"); add("item.rankine.stainless_steel_alloying", "Stainless Steel"); @@ -591,6 +594,7 @@ protected void addTranslations() { add("item.rankine.prospecting_stick_cobbles.message", "Trace amounts of %1$s were detected"); add("item.rankine.prospecting_stick.message", "%1$s (HL:%2$s) was detected nearby"); add("item.rankine.ore_detector.message", "%1$s (HL:%2$s) was detected at x:%3$s y:%4$s z:%5$s"); + add("item.rankine.gas_detector.message", "%1$s was detected at x:%2$s y:%3$s z:%4$s"); add("item.rankine.magnetometer.message1", "Field Strength: %s"); add("item.rankine.dowsing_rod.message", "Water table height is y=%s"); @@ -744,26 +748,47 @@ protected void addTranslations() { add("enchantment.rankine.vacuum", "Vacuum Shot"); add("enchantment.rankine.vacuum.desc", "Charging the Blunderbuss now also sucks enemies toward you. On firing, do minor damage and knockback to enemies in front of you."); add("jei.description.crushing_basic", "Can be obtained by crushing ores using a machine or a Bronze Hammer."); + add("rankine.jei.info_sap", "Can be placed in a cauldron. If a heat source is placed adjacent to the cauldron, the fluid is turned into Sugar."); + add("rankine.jei.info_maple_sap", "Can be placed in a cauldron. If a heat source is placed adjacent to the cauldron, the fluid is turned into Maple Syrup, which can be bottled out."); + add("rankine.jei.info_resin", "Can be placed in a cauldron. If a heat source is placed adjacent to the cauldron, the fluid is turned into Amber."); + add("rankine.jei.info_juglone", "Can be placed in a cauldron. If a heat source is placed adjacent to the cauldron, the fluid is turned into Brown Dye."); + add("rankine.jei.info_latex", "Can be placed in a cauldron. If a heat source is placed adjacent to the cauldron, the fluid is turned into Dry Rubber."); + add("rankine.jei.info_amber", "Resin can be placed in a cauldron. If a heat source is placed adjacent to the cauldron, Resin is turned into Amber."); + add("rankine.jei.info_dry_rubber", "Latex can be placed in a cauldron. If a heat source is placed adjacent to the cauldron, Latex is turned into Dry Rubber."); + add("rankine.jei.info_battery_energy", "Total Charge: %1$s [?]"); + add("rankine.jei.info_battery_fusion", "%1$s Fusion Furnace processes"); + add("rankine.jei.info_battery_induction", "%1$s Induction Furnace processes"); + add("rankine.jei.info_battery_rechargeable", "Rechargeable"); + add("rankine.jei.info_battery_rtg", "Single-use"); add("rankine.jei.tooltip_chance", "Chance: "); add("rankine.jei.tooltip_failure_chance", "Failure Chance: "); add("rankine.jei.tooltip_guaranteed", "Guaranteed"); - add("rankine.jei.tooltip_limited", "Can obtain once"); + add("rankine.jei.tooltip_limited", "Can only drop once per block"); add("rankine.jei.tooltip_max_rolls", "Max outputs: "); - add("rankine.jei.tooltip_nonlimited", "Can obtain multiple times"); + add("rankine.jei.tooltip_nonlimited", "Can drop multiple times per block"); add("rankine.jei.tooltip_nothing", "Skip Output"); add("rankine.jei.tooltip_additional", "Additional"); + add("rankine.jei.crucible_tooltip_additional", "Additional (Pick %s Unique Ingredients)"); add("rankine.jei.tooltip_required", "Required"); add("rankine.jei.tooltip_enchantment_required", "Requires Foraging enchantment"); add("rankine.jei.tooltip_starting_enchantability", "Obtained at %s enchantability"); add("rankine.jei.tooltip_enchantability_interval","Gains a level every %s enchantability"); add("rankine.jei.tooltip_max_level", "Max Level: "); + add("rankine.jei.tooltip_material_info", "Material Count: "); add("rankine.jei.tooltip_biomes_info", "Biomes: "); add("rankine.jei.tooltip_biomes_tags_info", "Biome Tags: "); + add("rankine.jei.tooltip_dimension_info", "Dimension: "); + add("rankine.jei.tooltip_mixing_time","Base Mixing Time: %s redstone power per ingredient total"); + add("rankine.jei.tooltip_total_mixing_time","Total Mixing Time: %s redstone power"); + add("rankine.jei.tooltip_total_button_lever","(%s button presses or lever flicks)"); + add("rankine.jei.tooltip_total_ingredients","%s total ingredients"); + add("rankine.jei.tooltip_total_output","%s total output"); add("rankine.jei.tooltip_none", "None"); add("rankine.jei.tooltip_any", "Any"); add("rankine.jei.tooltip_tier", "Tier: "); add("rankine.jei.alloying_bonus_stats", "Bonus Stats"); add("rankine.jei.alloying_enchantments", "Bonus Enchantments"); + add("rankine.jei.battery", "Battery"); add("rankine.jei.crushing", "Crushing"); add("rankine.jei.crucible", "Crucible"); add("rankine.jei.alloying", "Alloying"); @@ -859,6 +884,7 @@ protected void addTranslations() { add("item.rankine.totem_of_imitating.tooltip", "False promises"); add("item.rankine.totem_of_levitating.tooltip", "For keeping your feet clean"); add("item.rankine.totem_of_mending.tooltip", "Regenerate your losses"); + add("item.rankine.totem_of_powering.tooltip", "The sea heart calls and infuses"); add("item.rankine.totem_of_promising.tooltip", "Fortune is on your side"); add("item.rankine.totem_of_repulsing.tooltip", "Invisibility while visible"); add("item.rankine.totem_of_softening.tooltip", "Soft fingers and toes"); @@ -1653,59 +1679,6 @@ protected void addTranslations() { add("rankine.journal.cat_tools.standard_tools.text20", "Surf Rods"); add("rankine.journal.cat_tools.standard_tools.text21", ""); - - addModonomiconBook(); - } - - private void addModonomiconBook(){ - //We again set up a lang helper to keep track of the translation keys for us. - //Forge language provider does not give us access to this.modid, so we get it from our main mod class - var helper = ModonomiconAPI.get().getLangHelper(ProjectRankine.MODID); - helper.book("rankine_research"); //we tell the helper the book we're in. - this.add(helper.bookName(), "Rankine Research Notes"); //and now we add the actual textual book name - this.add(helper.bookTooltip(), "A book to assist in learning the world of Project Rankine."); //and the tooltip text - - this.addModonomiconBookAlloyingCategory(helper); - } - - private void addModonomiconBookAlloyingCategory(BookLangHelper helper) { - helper.category("alloying"); //tell the helper the category we are in - this.add(helper.categoryName(), "Elements and Alloying"); //annd provide the category name text - - this.addModonomiconBookBasicAlloyingEntry(helper); - this.addModonomiconBookMultiblockEntry(helper); - } - - private void addModonomiconBookBasicAlloyingEntry(BookLangHelper helper) { - helper.entry("basic_alloying"); //tell the helper the entry we are in - this.add(helper.entryName(), "Multiblock Entry"); //provide the entry name - this.add(helper.entryDescription(), "An entry showcasing a multiblock."); //and description - - helper.page("basic_alloying"); //now we configure the intro page - this.add(helper.pageTitle(), "Basic Alloying"); //page title - this.add(helper.pageText(), "Multiblock pages allow to preview multiblocks both in the book and in the world."); //page text - - helper.page("alloy_furnace"); //and finally the multiblock page - //now provide the multiblock name - //the lang helper does not handle multiblocks, so we manually add the same key we provided in the ModonomiconBookProvider - this.add(helper.pageTitle(), "Alloy Furnace"); //page title - this.add(helper.pageText(), "Multiblock pages allow to preview multiblocks both in the book and in the world."); //page text - } - - private void addModonomiconBookMultiblockEntry(BookLangHelper helper) { - helper.entry("multiblock"); //tell the helper the entry we are in - this.add(helper.entryName(), "Multiblock Entry"); //provide the entry name - this.add(helper.entryDescription(), "An entry showcasing a multiblock."); //and description - - helper.page("intro"); //now we configure the intro page - this.add(helper.pageTitle(), "Multiblock Page"); //page title - this.add(helper.pageText(), "Multiblock pages allow to preview multiblocks both in the book and in the world."); //page text - - helper.page("multiblock"); //and finally the multiblock page - //now provide the multiblock name - //the lang helper does not handle multiblocks, so we manually add the same key we provided in the ModonomiconBookProvider - this.add("multiblocks.modonomicon.blockentity", "Blockentity Multiblock."); - this.add(helper.pageText(), "A sample multiblock."); //and the multiblock page text } private String parseLangName(String registryName) { diff --git a/src/main/java/com/cannolicatfish/rankine/data/RankineLootModifierProvider.java b/src/main/java/com/cannolicatfish/rankine/data/RankineLootModifierProvider.java index f8e9ff9ca9..af105fad0d 100644 --- a/src/main/java/com/cannolicatfish/rankine/data/RankineLootModifierProvider.java +++ b/src/main/java/com/cannolicatfish/rankine/data/RankineLootModifierProvider.java @@ -1,20 +1,9 @@ package com.cannolicatfish.rankine.data; import com.cannolicatfish.rankine.ProjectRankine; -import com.cannolicatfish.rankine.init.RankineItems; -import com.cannolicatfish.rankine.loot.SurfRodModifier; -import net.minecraft.advancements.critereon.EntityPredicate; -import net.minecraft.advancements.critereon.ItemPredicate; import net.minecraft.data.DataGenerator; -import net.minecraft.world.item.Items; -import net.minecraft.advancements.critereon.FishingHookPredicate; -import net.minecraft.world.level.storage.loot.LootContext; import net.minecraftforge.common.data.GlobalLootModifierProvider; -import net.minecraft.world.level.storage.loot.predicates.LootItemCondition; -import net.minecraft.world.level.storage.loot.predicates.LootItemEntityPropertyCondition; -import net.minecraft.world.level.storage.loot.predicates.MatchTool; - public class RankineLootModifierProvider extends GlobalLootModifierProvider { public RankineLootModifierProvider(DataGenerator dataGeneratorIn) { super(dataGeneratorIn, ProjectRankine.MODID); @@ -26,7 +15,6 @@ public String getName() { @Override protected void start() { - add("surf_rod_modifier",SurfRodModifier.SERIALIZER,new SurfRodModifier(new LootItemCondition[]{MatchTool.toolMatches(ItemPredicate.Builder.item().of(RankineItems.ALLOY_SURF_ROD.get())).build(), LootItemEntityPropertyCondition.hasProperties(LootContext.EntityTarget.THIS, EntityPredicate.Builder.entity().fishingHook(FishingHookPredicate.inOpenWater(true))).build()}, Items.COD, RankineItems.TUNA.get())); } } diff --git a/src/main/java/com/cannolicatfish/rankine/data/RankineModonomiconBookProvider.java b/src/main/java/com/cannolicatfish/rankine/data/RankineModonomiconBookProvider.java deleted file mode 100644 index 8c08fe3d57..0000000000 --- a/src/main/java/com/cannolicatfish/rankine/data/RankineModonomiconBookProvider.java +++ /dev/null @@ -1,142 +0,0 @@ -package com.cannolicatfish.rankine.data; - -import com.klikli_dev.modonomicon.api.ModonomiconAPI; -import com.klikli_dev.modonomicon.api.datagen.BookLangHelper; -import com.klikli_dev.modonomicon.api.datagen.BookProvider; -import com.klikli_dev.modonomicon.api.datagen.EntryLocationHelper; -import com.klikli_dev.modonomicon.api.datagen.book.BookCategoryModel; -import com.klikli_dev.modonomicon.api.datagen.book.BookEntryModel; -import com.klikli_dev.modonomicon.api.datagen.book.BookModel; -import com.klikli_dev.modonomicon.api.datagen.book.condition.BookAdvancementConditionModel; -import com.klikli_dev.modonomicon.api.datagen.book.page.BookMultiblockPageModel; -import com.klikli_dev.modonomicon.api.datagen.book.page.BookTextPageModel; -import net.minecraft.data.DataGenerator; -import net.minecraft.resources.ResourceLocation; -import net.minecraftforge.common.data.LanguageProvider; - -public class RankineModonomiconBookProvider extends BookProvider { - - public RankineModonomiconBookProvider(DataGenerator generator, String modid, LanguageProvider lang) { - super(generator, modid, lang); - } - - private BookModel makeBook(String bookName) { - //The lang helper keeps track of the "DescriptionIds", that is, the language keys for translations, for us - var helper = ModonomiconAPI.get().getLangHelper(this.modid); - - //we tell the helper the book we're in. - helper.book(bookName); - - var alloyingCategory = this.makeAlloyingCategory(helper); - - //Now we create the book with settings of our choosing - var researchJournal = BookModel.builder() - .withId(this.modLoc(bookName)) //the id of the book. modLoc() prepends the mod id. - .withName(helper.bookName()) //the name of the book. The lang helper gives us the correct translation key. - .withTooltip(helper.bookTooltip()) //the hover tooltip for the book. Again we get a translation key. - .withGenerateBookItem(true) //auto-generate a book item for us. - .withModel(new ResourceLocation("modonomicon:modonomicon_red")) //use the default red modonomicon icon for the book - .withCreativeTab("rankine_misc") //and put it in the modonomicon tab - .withCategories(alloyingCategory) - .build(); - return researchJournal; - } - - private BookCategoryModel makeAlloyingCategory(BookLangHelper helper) { - helper.category("alloying"); //tell our lang helper the category we are in - - //the entry helper is the second helper for book datagen - //it allows us to place entries in the category without manually defining the coordinates. - //each letter can be used to represent an entry - var entryHelper = ModonomiconAPI.get().getEntryLocationHelper(); - entryHelper.setMap( - "_____________________", - "__m______________d___", - "__________r__________", - "__c__________________", - "__________2___3___i__", - "__s_____e____________" - ); - - //place the multiblock entry where we put the "m" in the map above - var multiblockEntry = this.makeMultiblockEntry(helper, entryHelper, 'm'); - - var basicAlloyingEntry = this.makeMultiblockEntry(helper, entryHelper, 'c'); - - return BookCategoryModel.builder() - .withId(this.modLoc(helper.category)) //the id of the category, as stored in the lang helper. modLoc() prepends the mod id. - .withName(helper.categoryName()) //the name of the category. The lang helper gives us the correct translation key. - .withIcon("rankine:bronze_ingot") //the icon for the category. In this case we simply use an existing item. - .withEntries(multiblockEntry) - .build(); - } - - private BookEntryModel makeBasicAlloyingEntry(BookLangHelper helper, EntryLocationHelper entryHelper, char location) { - helper.entry("basic_alloying"); //tell our lang helper the entry we are in - - helper.page("basic_alloying"); //and now the page - var multiBlockIntroPage = - BookTextPageModel.builder() //we start with a text page - .withText(helper.pageText()) //lang key for the text - .withTitle(helper.pageTitle()) //and for the title - .build(); - - helper.page("alloy_furnace"); //next page - var multiblockPreviewPage = - BookTextPageModel.builder() //we start with a text page - .withText(helper.pageText()) //lang key for the text - .withTitle(helper.pageTitle()) //and for the title - .build(); - - - return BookEntryModel.builder() - .withId(this.modLoc(helper.category + "/" + helper.entry)) - .withName(helper.entryName()) - .withDescription(helper.entryDescription()) - .withIcon("rankine:alloy_furnace") - .withLocation(entryHelper.get(location)) - .withPages(multiBlockIntroPage, multiblockPreviewPage) - .withCondition(BookAdvancementConditionModel.builder() - .withAdvancementId("rankine:story/craft_alloy_furnace") - .withTooltipString(helper.entryCondition("craft_alloy_furnace")) - .build()) - .build(); - } - - private BookEntryModel makeMultiblockEntry(BookLangHelper helper, EntryLocationHelper entryHelper, char location) { - helper.entry("multiblock"); //tell our lang helper the entry we are in - - helper.page("intro"); //and now the page - var multiBlockIntroPage = - BookTextPageModel.builder() //we start with a text page - .withText(helper.pageText()) //lang key for the text - .withTitle(helper.pageTitle()) //and for the title - .build(); - - helper.page("multiblock"); //next page - var multiblockPreviewPage = - BookMultiblockPageModel.builder() //now a page to show a multiblock - .withMultiblockId("modonomicon:blockentity") //sample multiblock from modonomicon - .withMultiblockName("multiblocks.modonomicon.blockentity") //and the lang key for its name - .withText(helper.pageText()) //plus a page text - .build(); - - return BookEntryModel.builder() - .withId(this.modLoc(helper.category + "/" + helper.entry)) //make entry id from lang helper data - .withName(helper.entryName()) //entry name lang key - .withDescription(helper.entryDescription()) //entry description lang key - .withIcon("minecraft:furnace") //we use furnace as icon - .withLocation(entryHelper.get(location)) //and we place it at the location we defined earlier in the entry helper mapping - .withPages(multiBlockIntroPage, multiblockPreviewPage) //finally we add our pages to the entry - .build(); - } - - @Override - protected void generate() { - //call our code that generates a book with the id "demo" - var researchJournal = this.makeBook("rankine_research"); - - //then add the book to the list of books to generate - this.add(researchJournal); - } -} diff --git a/src/main/java/com/cannolicatfish/rankine/data/RankineRecipesProvider.java b/src/main/java/com/cannolicatfish/rankine/data/RankineRecipesProvider.java index d906beba6a..044bf81f26 100644 --- a/src/main/java/com/cannolicatfish/rankine/data/RankineRecipesProvider.java +++ b/src/main/java/com/cannolicatfish/rankine/data/RankineRecipesProvider.java @@ -489,6 +489,7 @@ protected void buildCraftingRecipes(Consumer consumer) { ShapedRecipeBuilder.shaped(RankineItems.TOTEM_OF_ENDURING.get(), 1).pattern("III").pattern("IRI").pattern("III").define('I', RankineTags.Items.INGOTS_BLUE_GOLD).define('R', RankineTags.Items.STORAGE_BLOCKS_GARNET).unlockedBy("has_ingredient", has(RankineTags.Items.INGOTS_BLUE_GOLD)).save(consumer); ShapedRecipeBuilder.shaped(RankineItems.TOTEM_OF_REPULSING.get(), 1).pattern("III").pattern("IRI").pattern("III").define('I', RankineTags.Items.INGOTS_BLACK_GOLD).define('R', RankineTags.Items.STORAGE_BLOCKS_RUBY).unlockedBy("has_ingredient", has(RankineTags.Items.INGOTS_BLACK_GOLD)).save(consumer); ShapedRecipeBuilder.shaped(RankineItems.TOTEM_OF_TIMESAVING.get(), 1).pattern("III").pattern("IRI").pattern("III").define('I', RankineTags.Items.INGOTS_STERLING_SILVER).define('R', RankineTags.Items.STORAGE_BLOCKS_SAPPHIRE).unlockedBy("has_ingredient", has(RankineTags.Items.INGOTS_STERLING_SILVER)).save(consumer); + ShapedRecipeBuilder.shaped(RankineItems.TOTEM_OF_POWERING.get(), 1).pattern("III").pattern("IRI").pattern("III").define('I', RankineTags.Items.INGOTS_NEPTUNIUM_ALLOY).define('R', Items.CONDUIT).unlockedBy("has_ingredient", has(RankineTags.Items.INGOTS_NEPTUNIUM_ALLOY)).save(consumer); ShapedRecipeBuilder.shaped(RankineItems.TOTEM_OF_PROMISING.get(), 1).pattern("III").pattern("IRI").pattern("III").define('I', RankineTags.Items.INGOTS_WHITE_GOLD).define('R', RankineTags.Items.STORAGE_BLOCKS_TOPAZ).unlockedBy("has_ingredient", has(RankineTags.Items.INGOTS_WHITE_GOLD)).save(consumer); ShapedRecipeBuilder.shaped(RankineItems.TOTEM_OF_SOFTENING.get(), 1).pattern("III").pattern("IRI").pattern("III").define('I', RankineTags.Items.INGOTS_PURPLE_GOLD).define('R', RankineTags.Items.STORAGE_BLOCKS_PEARL).unlockedBy("has_ingredient", has(RankineTags.Items.INGOTS_PURPLE_GOLD)).save(consumer); ShapedRecipeBuilder.shaped(RankineItems.TOTEM_OF_LEVITATING.get(), 1).pattern("III").pattern("IRI").pattern("III").define('I', RankineTags.Items.INGOTS_OSMIRIDIUM).define('R', RankineTags.Items.STORAGE_BLOCKS_OPAL).unlockedBy("has_ingredient", has(RankineTags.Items.INGOTS_OSMIRIDIUM)).save(consumer); @@ -537,6 +538,7 @@ protected void buildCraftingRecipes(Consumer consumer) { ShapedRecipeBuilder.shaped(RankineBlocks.MIXING_BARREL.get(), 1).pattern("R").pattern("B").pattern("S").define('B', Blocks.BARREL).define('S', ItemTags.WOODEN_SLABS).define('R', Tags.Items.RODS_WOODEN).unlockedBy("has_ingredient", has(Items.BARREL)).save(consumer); ShapedRecipeBuilder.shaped(RankineBlocks.CHARCOAL_PIT.get(), 1).pattern(" S ").pattern("SLS").pattern(" S ").define('S', Tags.Items.RODS_WOODEN).define('L', ItemTags.LOGS_THAT_BURN).unlockedBy("has_ingredient", has(ItemTags.LOGS_THAT_BURN)).save(consumer); ShapedRecipeBuilder.shaped(RankineBlocks.GAS_BOTTLER.get(), 1).pattern("XSX").pattern("S S").pattern("XSX").define('X', RankineTags.Items.SHEETMETAL).define('S', RankineTags.Items.INGOTS_BRASS).unlockedBy("has_ingredient", has(RankineTags.Items.INGOTS_BRASS)).save(consumer); + ShapedRecipeBuilder.shaped(RankineBlocks.BATTERY_CHARGER.get(), 1).pattern("XSX").pattern("R R").pattern("XSX").define('X', RankineTags.Items.SHEETMETAL).define('R', Items.REPEATER).define('S', RankineTags.Items.SHEETMETAL).unlockedBy("has_ingredient", has(RankineTags.Items.INGOTS_MAGNESIUM_ALLOY)).save(consumer); ShapedRecipeBuilder.shaped(RankineBlocks.GAS_VENT.get(), 1).pattern("XSX").pattern("SBS").pattern("XSX").define('X', RankineTags.Items.SHEETMETAL).define('S', RankineItems.BOROSILICATE_GLASS.get()).define('B', Items.GLASS_BOTTLE).unlockedBy("has_ingredient", has(RankineTags.Items.INGOTS_BRASS)).save(consumer); ShapedRecipeBuilder.shaped(RankineBlocks.FLOOD_GATE.get(), 1).pattern(" S ").pattern("SSS").pattern(" S ").define('S', RankineTags.Items.CRAFTING_METAL_INGOTS).unlockedBy("has_ingredient", has(RankineTags.Items.CRAFTING_METAL_INGOTS)).save(consumer); ShapedRecipeBuilder.shaped(RankineBlocks.CRUCIBLE_BLOCK.get(), 1).pattern("R R").pattern("R R").pattern("RCR").define('R', RankineItems.HIGH_REFRACTORY_BRICKS.get()).define('C', Items.CAULDRON).unlockedBy("has_ingredient", has(RankineItems.HIGH_REFRACTORY_BRICKS.get())).save(consumer); @@ -1317,7 +1319,6 @@ private void defaultToolRecipes(Consumer consumer, AlloyItem ing alloySpear(consumer, ForgeRegistries.ITEMS.getValue(ResourceLocation.tryParse(rs.replace("ingot","spear"))), alloyIngot, rod, ingot, 16777215, null, null,steelRod ? ingot.getDefaultRecipe().toString() : null); alloySword(consumer, ForgeRegistries.ITEMS.getValue(ResourceLocation.tryParse(rs.replace("ingot","sword"))), alloyIngot, rod, ingot, 16777215, null, null,steelRod ? ingot.getDefaultRecipe().toString() : null); alloyKnife(consumer, ForgeRegistries.ITEMS.getValue(ResourceLocation.tryParse(rs.replace("ingot","knife"))), alloyIngot, rod, ingot, 16777215, null, null,steelRod ? ingot.getDefaultRecipe().toString() : null); - alloySurfRod(consumer, RankineItems.ALLOY_SURF_ROD.get(), alloyIngot, ingot, alloyColor, alloyLang, recipeNamePart,null); } private void mimicToolRecipes(Consumer consumer, AlloyItem ingot, Item mimic, int alloyColor, String alloyLang, boolean steelRod, String recipeName) { @@ -1338,7 +1339,6 @@ private void mimicToolRecipes(Consumer consumer, AlloyItem ingot alloySpear(consumer, ForgeRegistries.ITEMS.getValue(ResourceLocation.tryParse(rs.replace("ingot","spear"))), alloyIngot, rod, ingot, 16777215, null, recipeName,steelRod ? ingot.getDefaultRecipe().toString() : null); alloySword(consumer, ForgeRegistries.ITEMS.getValue(ResourceLocation.tryParse(rs.replace("ingot","sword"))), alloyIngot, rod, ingot, 16777215, null, recipeName,steelRod ? ingot.getDefaultRecipe().toString() : null); alloyKnife(consumer, ForgeRegistries.ITEMS.getValue(ResourceLocation.tryParse(rs.replace("ingot","knife"))), alloyIngot, rod, ingot, 16777215, null, recipeName,steelRod ? ingot.getDefaultRecipe().toString() : null); - alloySurfRod(consumer, RankineItems.ALLOY_SURF_ROD.get(), alloyIngot, ingot, alloyColor, alloyLang, recipeName,null); } private void alloyRod(Consumer consumer, Item output, AlloyIngredient input, ItemLike trigger, int color, @Nullable String langName, String recipeName, String inheritRecipe) { diff --git a/src/main/java/com/cannolicatfish/rankine/init/ClientProxy.java b/src/main/java/com/cannolicatfish/rankine/init/ClientProxy.java index 4ce5cd3ba9..fc564b231e 100644 --- a/src/main/java/com/cannolicatfish/rankine/init/ClientProxy.java +++ b/src/main/java/com/cannolicatfish/rankine/init/ClientProxy.java @@ -3,9 +3,10 @@ import com.cannolicatfish.rankine.ProjectRankine; import com.cannolicatfish.rankine.blocks.HollowLogBlock; import com.cannolicatfish.rankine.blocks.LeafLitterBlock; +import com.cannolicatfish.rankine.blocks.alloyfurnace.AlloyFurnaceScreen; +import com.cannolicatfish.rankine.blocks.batterycharger.BatteryChargerScreen; import com.cannolicatfish.rankine.blocks.block_groups.RankineStone; import com.cannolicatfish.rankine.blocks.block_groups.RankineWood; -import com.cannolicatfish.rankine.blocks.alloyfurnace.AlloyFurnaceScreen; import com.cannolicatfish.rankine.blocks.buildingmodes.RankineStoneBricksBlock; import com.cannolicatfish.rankine.blocks.crucible.CrucibleScreen; import com.cannolicatfish.rankine.blocks.evaporationtower.EvaporationTowerScreen; @@ -16,7 +17,6 @@ import com.cannolicatfish.rankine.blocks.mtt.MaterialTestingTableScreen; import com.cannolicatfish.rankine.blocks.templatetable.TemplateTableScreen; import com.cannolicatfish.rankine.items.BuildingModeBlockItem; -import com.cannolicatfish.rankine.items.alloys.AlloySurfRodItem; import com.cannolicatfish.rankine.items.indexer.ElementIndexerScreen; import com.cannolicatfish.rankine.items.tools.SpearItem; import net.minecraft.client.Minecraft; @@ -83,19 +83,6 @@ public static void registerItemProperties() { new ResourceLocation(ProjectRankine.MODID, "gas_held"), (stack, world, living, id) -> stack.getTag() != null && !stack.getTag().getString("gas").isEmpty() ? 1.0F : 0.0F); - ItemProperties.register(RankineItems.ALLOY_SURF_ROD.get(), new ResourceLocation("cast"), (p_239422_0_, p_239422_1_, p_239422_2_, id) -> { - if (p_239422_2_ == null) { - return 0.0F; - } else { - boolean flag = p_239422_2_.getMainHandItem() == p_239422_0_; - boolean flag1 = p_239422_2_.getOffhandItem() == p_239422_0_; - if (p_239422_2_.getMainHandItem().getItem() instanceof AlloySurfRodItem) { - flag1 = false; - } - - return (flag || flag1) && p_239422_2_ instanceof Player && ((Player)p_239422_2_).fishing != null ? 1.0F : 0.0F; - } - }); } @Override public void init() { @@ -106,6 +93,7 @@ public void init() { MenuScreens.register(RankineItems.ELEMENT_INDEXER_CONTAINER, ElementIndexerScreen::new); MenuScreens.register(RankineBlocks.TEMPLATE_TABLE_CONTAINER, TemplateTableScreen::new); MenuScreens.register(RankineBlocks.MATERIAL_TESTING_TABLE_CONTAINER, MaterialTestingTableScreen::new); + MenuScreens.register(RankineBlocks.BATTERY_CHARGER_CONTAINER, BatteryChargerScreen::new); MenuScreens.register(RankineBlocks.CRUCIBLE_CONTAINER, CrucibleScreen::new); MenuScreens.register(RankineBlocks.INDUCTION_FURNACE_CONTAINER, InductionFurnaceScreen::new); MenuScreens.register(RankineBlocks.FUSION_FURNACE_CONTAINER, FusionFurnaceScreen::new); diff --git a/src/main/java/com/cannolicatfish/rankine/init/Config.java b/src/main/java/com/cannolicatfish/rankine/init/Config.java index e4a9ab692f..3f443ce68b 100644 --- a/src/main/java/com/cannolicatfish/rankine/init/Config.java +++ b/src/main/java/com/cannolicatfish/rankine/init/Config.java @@ -493,6 +493,8 @@ public static class Machines { public final ForgeConfigSpec.BooleanValue ELECTROMAGNET_MATERIAL_REQ; public final ForgeConfigSpec.BooleanValue EVAPORATION_TOWER_MAINTENANCE; public final ForgeConfigSpec.IntValue GAS_BOTTLER_SPEED; + + public final ForgeConfigSpec.IntValue FUSION_FURNACE_POWER; public final ForgeConfigSpec.IntValue INDUCTION_FURNACE_POWER; public final ForgeConfigSpec.IntValue AIR_DISTILLATION_SPEED; public final ForgeConfigSpec.DoubleValue CRUSHING_SUCCESS_CHANCE; @@ -522,6 +524,8 @@ public Machines(ForgeConfigSpec.Builder b) { .define("electromagnetMaterialReq",true); INDUCTION_FURNACE_POWER = b.comment("Defines the power requirement for one process in the induction furnace.") .defineInRange("inductionFurnacePower", 16, 0, 10000); + FUSION_FURNACE_POWER = b.comment("Defines the power requirement for one process in the fusion furnace.") + .defineInRange("fusionFurnacePower", 2, 0, 10000); CRUSHING_SUCCESS_CHANCE = b.comment("Chance for a piston/crushing head to crush a block.") .defineInRange("crushingSuccessChance", 0.2D, 0.0D, 1.0D); EVAPORATION_TOWER_MAINTENANCE = b.comment("If enabled, sheetmetal from the evaporation tower will occasionally break.") diff --git a/src/main/java/com/cannolicatfish/rankine/init/RankineBlockEntityTypes.java b/src/main/java/com/cannolicatfish/rankine/init/RankineBlockEntityTypes.java index c147e47069..a872dde6c1 100644 --- a/src/main/java/com/cannolicatfish/rankine/init/RankineBlockEntityTypes.java +++ b/src/main/java/com/cannolicatfish/rankine/init/RankineBlockEntityTypes.java @@ -3,6 +3,7 @@ import com.cannolicatfish.rankine.ProjectRankine; import com.cannolicatfish.rankine.blocks.alloyfurnace.AlloyFurnaceTile; import com.cannolicatfish.rankine.blocks.alloys.AlloyBlockTile; +import com.cannolicatfish.rankine.blocks.batterycharger.BatteryChargerTile; import com.cannolicatfish.rankine.blocks.beehiveoven.BeehiveOvenTile; import com.cannolicatfish.rankine.blocks.charcoalpit.CharcoalPitTile; import com.cannolicatfish.rankine.blocks.crucible.CrucibleTile; @@ -40,6 +41,11 @@ public class RankineBlockEntityTypes { () -> BlockEntityType.Builder.of(AlloyFurnaceTile::new, RankineBlocks.ALLOY_FURNACE.get()) .build(null)); + + public static final RegistryObject> BATTERY_CHARGER = BLOCK_ENTITY_TYPES.register("battery_charger", + () -> BlockEntityType.Builder.of(BatteryChargerTile::new, RankineBlocks.BATTERY_CHARGER.get()) + .build(null)); + public static final RegistryObject> CRUCIBLE = BLOCK_ENTITY_TYPES.register("crucible", () -> BlockEntityType.Builder.of(CrucibleTile::new, RankineBlocks.CRUCIBLE_BLOCK.get()) .build(null)); diff --git a/src/main/java/com/cannolicatfish/rankine/init/RankineBlocks.java b/src/main/java/com/cannolicatfish/rankine/init/RankineBlocks.java index c543fa01e5..18bd066c5a 100644 --- a/src/main/java/com/cannolicatfish/rankine/init/RankineBlocks.java +++ b/src/main/java/com/cannolicatfish/rankine/init/RankineBlocks.java @@ -8,6 +8,9 @@ import com.cannolicatfish.rankine.blocks.alloys.AlloyBlock; import com.cannolicatfish.rankine.blocks.alloys.AlloyBlockTile; import com.cannolicatfish.rankine.blocks.asphalt.*; +import com.cannolicatfish.rankine.blocks.batterycharger.BatteryChargerBlock; +import com.cannolicatfish.rankine.blocks.batterycharger.BatteryChargerContainer; +import com.cannolicatfish.rankine.blocks.batterycharger.BatteryChargerTile; import com.cannolicatfish.rankine.blocks.beehiveoven.BeehiveOvenPitBlock; import com.cannolicatfish.rankine.blocks.beehiveoven.BeehiveOvenTile; import com.cannolicatfish.rankine.blocks.block_groups.RankineStone; @@ -917,6 +920,7 @@ public class RankineBlocks { public static final RegistryObject GALINSTAN_BLOCK = BLOCKS.register("galinstan_block", () -> new AlloyBlock(DEF_METAL_BLOCK)); public static final RegistryObject OSMIRIDIUM_BLOCK = BLOCKS.register("osmiridium_block", () -> new AlloyBlock(DEF_METAL_BLOCK)); public static final RegistryObject SODIUM_POTASSIUM_ALLOY_BLOCK = BLOCKS.register("sodium_potassium_alloy_block", () -> new AlloyBlock(DEF_METAL_BLOCK)); + public static final RegistryObject NEPTUNIUM_ALLOY_BLOCK = BLOCKS.register("neptunium_alloy_block", () -> new AlloyBlock(DEF_METAL_BLOCK)); public static final RegistryObject AMALGAM_BLOCK = BLOCKS.register("amalgam_block", () -> new AlloyBlock(DEF_METAL_BLOCK)); public static final RegistryObject ENDER_AMALGAM_BLOCK = BLOCKS.register("ender_amalgam_block", () -> new AlloyBlock(DEF_METAL_BLOCK)); @@ -955,6 +959,7 @@ public class RankineBlocks { public static final RegistryObject GALINSTAN_PEDESTAL = BLOCKS.register("galinstan_pedestal", PedestalBlock::new); public static final RegistryObject OSMIRIDIUM_PEDESTAL = BLOCKS.register("osmiridium_pedestal", PedestalBlock::new); public static final RegistryObject SODIUM_POTASSIUM_ALLOY_PEDESTAL = BLOCKS.register("sodium_potassium_alloy_pedestal", PedestalBlock::new); + public static final RegistryObject NEPTUNIUM_ALLOY_PEDESTAL = BLOCKS.register("neptunium_alloy_pedestal", PedestalBlock::new); public static final RegistryObject AMALGAM_PEDESTAL = BLOCKS.register("amalgam_pedestal", PedestalBlock::new); public static final RegistryObject ENDER_AMALGAM_PEDESTAL = BLOCKS.register("ender_amalgam_pedestal", PedestalBlock::new); @@ -991,6 +996,7 @@ public class RankineBlocks { public static final RegistryObject GALINSTAN_SHEETMETAL = BLOCKS.register("galinstan_sheetmetal", () -> new SheetmetalBlock(12564673)); public static final RegistryObject OSMIRIDIUM_SHEETMETAL = BLOCKS.register("osmiridium_sheetmetal", () -> new SheetmetalBlock(13212593)); public static final RegistryObject SODIUM_POTASSIUM_ALLOY_SHEETMETAL = BLOCKS.register("sodium_potassium_alloy_sheetmetal", () -> new SheetmetalBlock(9403777)); + public static final RegistryObject NEPTUNIUM_ALLOY_SHEETMETAL = BLOCKS.register("neptunium_alloy_sheetmetal", () -> new SheetmetalBlock(5805717)); public static final RegistryObject AMALGAM_SHEETMETAL = BLOCKS.register("amalgam_sheetmetal", () -> new SheetmetalBlock(13881539)); public static final RegistryObject ENDER_AMALGAM_SHEETMETAL = BLOCKS.register("ender_amalgam_sheetmetal", () -> new SheetmetalBlock(492385)); @@ -1026,6 +1032,7 @@ public class RankineBlocks { public static final RegistryObject GALINSTAN_POLE = BLOCKS.register("galinstan_pole", () -> new MetalPoleBlock(12564673)); public static final RegistryObject OSMIRIDIUM_POLE = BLOCKS.register("osmiridium_pole", () -> new MetalPoleBlock(13212593)); public static final RegistryObject SODIUM_POTASSIUM_ALLOY_POLE = BLOCKS.register("sodium_potassium_alloy_pole", () -> new MetalPoleBlock(9403777)); + public static final RegistryObject NEPTUNIUM_ALLOY_POLE = BLOCKS.register("neptunium_alloy_pole", () -> new MetalPoleBlock(5805717)); public static final RegistryObject AMALGAM_POLE = BLOCKS.register("amalgam_pole", () -> new MetalPoleBlock(13881539)); public static final RegistryObject ENDER_AMALGAM_POLE = BLOCKS.register("ender_amalgam_pole", () -> new MetalPoleBlock(492385)); @@ -1061,6 +1068,7 @@ public class RankineBlocks { public static final RegistryObject GALINSTAN_BARS = BLOCKS.register("galinstan_bars", () -> new MetalBarsBlock(12564673)); public static final RegistryObject OSMIRIDIUM_BARS = BLOCKS.register("osmiridium_bars", () -> new MetalBarsBlock(13212593)); public static final RegistryObject SODIUM_POTASSIUM_ALLOY_BARS = BLOCKS.register("sodium_potassium_alloy_bars", () -> new MetalBarsBlock(9403777)); + public static final RegistryObject NEPTUNIUM_ALLOY_BARS = BLOCKS.register("neptunium_alloy_bars", () -> new MetalBarsBlock(5805717)); public static final RegistryObject AMALGAM_BARS = BLOCKS.register("amalgam_bars", () -> new MetalBarsBlock(13881539)); public static final RegistryObject ENDER_AMALGAM_BARS = BLOCKS.register("ender_amalgam_bars", () -> new MetalBarsBlock(492385)); @@ -1345,6 +1353,7 @@ public class RankineBlocks { public static final RegistryObject EVAPORATION_TOWER = BLOCKS.register("evaporation_tower", () -> new EvaporationTowerBlock(Block.Properties.of(Material.STONE).sound(SoundType.STONE).requiresCorrectToolForDrops().strength(2.0F))); public static final RegistryObject DIAMOND_ANVIL_CELL = BLOCKS.register("diamond_anvil_cell", () -> new DiamondAnvilCellBlock(Block.Properties.of(Material.METAL).sound(SoundType.METAL).requiresCorrectToolForDrops().strength(2.0F))); public static final RegistryObject PARTICLE_ACCELERATOR = BLOCKS.register("particle_accelerator", () -> new ParticleAcceleratorBlock(Block.Properties.of(Material.METAL).sound(SoundType.METAL).requiresCorrectToolForDrops().strength(2.0F))); + public static final RegistryObject BATTERY_CHARGER = BLOCKS.register("battery_charger", () -> new BatteryChargerBlock(Block.Properties.of(Material.METAL).sound(SoundType.METAL).requiresCorrectToolForDrops().strength(2.0F))); public static final RegistryObject FUSION_FURNACE = BLOCKS.register("fusion_furnace", () -> new FusionFurnaceBlock(Block.Properties.of(Material.METAL).sound(SoundType.METAL).requiresCorrectToolForDrops().strength(2.0F))); public static final RegistryObject DISTILLATION_TOWER = BLOCKS.register("distillation_tower", () -> new DistillationTowerBlock(DEF_METAL_BLOCK)); public static final RegistryObject AIR_DISTILLATION_PACKING = BLOCKS.register("air_distillation_packing", () -> new Block(DEF_METAL_BLOCK)); @@ -1621,6 +1630,12 @@ public class RankineBlocks { @ObjectHolder("rankine:gas_condenser") public static BlockEntityType GAS_CONDENSER_TILE; + + @ObjectHolder("rankine:battery_charger") + public static MenuType BATTERY_CHARGER_CONTAINER; + + @ObjectHolder("rankine:battery_charger") + public static BlockEntityType BATTERY_CHARGER_TILE; @ObjectHolder("rankine:gas_vent") public static BlockEntityType GAS_VENT_TILE; @ObjectHolder("rankine:sediment_fan") diff --git a/src/main/java/com/cannolicatfish/rankine/init/RankineContainers.java b/src/main/java/com/cannolicatfish/rankine/init/RankineContainers.java index 7e6f948b1d..66ffa96c34 100644 --- a/src/main/java/com/cannolicatfish/rankine/init/RankineContainers.java +++ b/src/main/java/com/cannolicatfish/rankine/init/RankineContainers.java @@ -2,6 +2,7 @@ import com.cannolicatfish.rankine.ProjectRankine; import com.cannolicatfish.rankine.blocks.alloyfurnace.AlloyFurnaceContainer; +import com.cannolicatfish.rankine.blocks.batterycharger.BatteryChargerContainer; import com.cannolicatfish.rankine.blocks.crucible.CrucibleContainer; import com.cannolicatfish.rankine.blocks.evaporationtower.EvaporationTowerContainer; import com.cannolicatfish.rankine.blocks.fusionfurnace.FusionFurnaceContainer; @@ -28,6 +29,7 @@ public class RankineContainers { public static RegistryObject> FUSION_FURNACE_CONTAINER = CONTAINERS.register("fusion_furnace", () -> IForgeMenuType.create((windowId, inv, data) -> new FusionFurnaceContainer(windowId, ProjectRankine.proxy.getClientWorld(), data.readBlockPos(), inv, ProjectRankine.proxy.getClientPlayer()))); public static RegistryObject> EVAPORATION_TOWER_CONTAINER = CONTAINERS.register("evaporation_tower", () -> IForgeMenuType.create((windowId, inv, data) -> new EvaporationTowerContainer(windowId, ProjectRankine.proxy.getClientWorld(), data.readBlockPos(), inv, ProjectRankine.proxy.getClientPlayer()))); public static RegistryObject> GAS_CONDENSER_CONTAINER = CONTAINERS.register("gas_condenser", () -> IForgeMenuType.create((windowId, inv, data) -> new GasBottlerContainer(windowId, ProjectRankine.proxy.getClientWorld(), data.readBlockPos(), inv, ProjectRankine.proxy.getClientPlayer()))); + public static RegistryObject> BATTERY_CHARGER_CONTAINER = CONTAINERS.register("battery_charger", () -> IForgeMenuType.create((windowId, inv, data) -> new BatteryChargerContainer(windowId, ProjectRankine.proxy.getClientWorld(), data.readBlockPos(), inv, ProjectRankine.proxy.getClientPlayer()))); public static RegistryObject> MATERIAL_TESTING_TABLE_CONTAINER = CONTAINERS.register("material_testing_table", () -> IForgeMenuType.create((windowId, inv, data) -> new MaterialTestingTableContainer(windowId, ProjectRankine.proxy.getClientWorld(), data.readBlockPos(), inv, ProjectRankine.proxy.getClientPlayer()))); public static RegistryObject> TEMPLATE_TABLE_CONTAINER = CONTAINERS.register("template_table", () -> IForgeMenuType.create((windowId, inv, data) -> new TemplateTableContainer(windowId, inv, ProjectRankine.proxy.getClientPlayer()))); public static RegistryObject> ELEMENT_INDEXER_CONTAINER = CONTAINERS.register("element_indexer", () -> IForgeMenuType.create((windowId, inv, data) -> new ElementIndexerContainer(windowId, inv, ProjectRankine.proxy.getClientPlayer()))); diff --git a/src/main/java/com/cannolicatfish/rankine/init/RankineItems.java b/src/main/java/com/cannolicatfish/rankine/init/RankineItems.java index 24fed83ece..bd196fa1b7 100644 --- a/src/main/java/com/cannolicatfish/rankine/init/RankineItems.java +++ b/src/main/java/com/cannolicatfish/rankine/init/RankineItems.java @@ -498,6 +498,7 @@ public class RankineItems { public static final RegistryObject GALINSTAN_SHEETMETAL = ITEMS.register("galinstan_sheetmetal", () -> new BlockItem(RankineBlocks.GALINSTAN_SHEETMETAL.get(),new Item.Properties().stacksTo(64).tab(ProjectRankine.setup.rankineWorld))); public static final RegistryObject OSMIRIDIUM_SHEETMETAL = ITEMS.register("osmiridium_sheetmetal", () -> new BlockItem(RankineBlocks.OSMIRIDIUM_SHEETMETAL.get(),new Item.Properties().stacksTo(64).tab(ProjectRankine.setup.rankineWorld))); public static final RegistryObject SODIUM_POTASSIUM_ALLOY_SHEETMETAL = ITEMS.register("sodium_potassium_alloy_sheetmetal", () -> new BlockItem(RankineBlocks.SODIUM_POTASSIUM_ALLOY_SHEETMETAL.get(),new Item.Properties().stacksTo(64).tab(ProjectRankine.setup.rankineWorld))); + public static final RegistryObject NEPTUNIUM_ALLOY_SHEETMETAL = ITEMS.register("neptunium_alloy_sheetmetal", () -> new BlockItem(RankineBlocks.NEPTUNIUM_ALLOY_SHEETMETAL.get(),new Item.Properties().stacksTo(64).tab(ProjectRankine.setup.rankineWorld))); public static final RegistryObject AMALGAM_SHEETMETAL = ITEMS.register("amalgam_sheetmetal", () -> new BlockItem(RankineBlocks.AMALGAM_SHEETMETAL.get(),new Item.Properties().stacksTo(64).tab(ProjectRankine.setup.rankineWorld))); public static final RegistryObject ENDER_AMALGAM_SHEETMETAL = ITEMS.register("ender_amalgam_sheetmetal", () -> new BlockItem(RankineBlocks.ENDER_AMALGAM_SHEETMETAL.get(),new Item.Properties().stacksTo(64).tab(ProjectRankine.setup.rankineWorld))); @@ -557,6 +558,7 @@ public class RankineItems { public static final RegistryObject GALINSTAN_PEDESTAL = ITEMS.register("galinstan_pedestal", () -> new BlockItem(RankineBlocks.GALINSTAN_PEDESTAL.get(),new Item.Properties().stacksTo(64).tab(ProjectRankine.setup.rankineWorld))); public static final RegistryObject OSMIRIDIUM_PEDESTAL = ITEMS.register("osmiridium_pedestal", () -> new BlockItem(RankineBlocks.OSMIRIDIUM_PEDESTAL.get(),new Item.Properties().stacksTo(64).tab(ProjectRankine.setup.rankineWorld))); public static final RegistryObject SODIUM_POTASSIUM_ALLOY_PEDESTAL = ITEMS.register("sodium_potassium_alloy_pedestal", () -> new BlockItem(RankineBlocks.SODIUM_POTASSIUM_ALLOY_PEDESTAL.get(),new Item.Properties().stacksTo(64).tab(ProjectRankine.setup.rankineWorld))); + public static final RegistryObject NEPTUNIUM_ALLOY_PEDESTAL = ITEMS.register("neptunium_alloy_pedestal", () -> new BlockItem(RankineBlocks.NEPTUNIUM_ALLOY_PEDESTAL.get(),new Item.Properties().stacksTo(64).tab(ProjectRankine.setup.rankineWorld))); public static final RegistryObject AMALGAM_PEDESTAL = ITEMS.register("amalgam_pedestal", () -> new BlockItem(RankineBlocks.AMALGAM_PEDESTAL.get(),new Item.Properties().stacksTo(64).tab(ProjectRankine.setup.rankineWorld))); public static final RegistryObject ENDER_AMALGAM_PEDESTAL = ITEMS.register("ender_amalgam_pedestal", () -> new BlockItem(RankineBlocks.ENDER_AMALGAM_PEDESTAL.get(),new Item.Properties().stacksTo(64).tab(ProjectRankine.setup.rankineWorld))); @@ -592,6 +594,7 @@ public class RankineItems { public static final RegistryObject GALINSTAN_POLE = ITEMS.register("galinstan_pole", () -> new BlockItem(RankineBlocks.GALINSTAN_POLE.get(),new Item.Properties().stacksTo(64).tab(ProjectRankine.setup.rankineWorld))); public static final RegistryObject OSMIRIDIUM_POLE = ITEMS.register("osmiridium_pole", () -> new BlockItem(RankineBlocks.OSMIRIDIUM_POLE.get(),new Item.Properties().stacksTo(64).tab(ProjectRankine.setup.rankineWorld))); public static final RegistryObject SODIUM_POTASSIUM_ALLOY_POLE = ITEMS.register("sodium_potassium_alloy_pole", () -> new BlockItem(RankineBlocks.SODIUM_POTASSIUM_ALLOY_POLE.get(),new Item.Properties().stacksTo(64).tab(ProjectRankine.setup.rankineWorld))); + public static final RegistryObject NEPTUNIUM_ALLOY_POLE = ITEMS.register("neptunium_alloy_pole", () -> new BlockItem(RankineBlocks.NEPTUNIUM_ALLOY_POLE.get(),new Item.Properties().stacksTo(64).tab(ProjectRankine.setup.rankineWorld))); public static final RegistryObject AMALGAM_POLE = ITEMS.register("amalgam_pole", () -> new BlockItem(RankineBlocks.AMALGAM_POLE.get(),new Item.Properties().stacksTo(64).tab(ProjectRankine.setup.rankineWorld))); public static final RegistryObject ENDER_AMALGAM_POLE = ITEMS.register("ender_amalgam_pole", () -> new BlockItem(RankineBlocks.ENDER_AMALGAM_POLE.get(),new Item.Properties().stacksTo(64).tab(ProjectRankine.setup.rankineWorld))); @@ -627,6 +630,7 @@ public class RankineItems { public static final RegistryObject GALINSTAN_BARS = ITEMS.register("galinstan_bars", () -> new BlockItem(RankineBlocks.GALINSTAN_BARS.get(),new Item.Properties().stacksTo(64).tab(ProjectRankine.setup.rankineWorld))); public static final RegistryObject OSMIRIDIUM_BARS = ITEMS.register("osmiridium_bars", () -> new BlockItem(RankineBlocks.OSMIRIDIUM_BARS.get(),new Item.Properties().stacksTo(64).tab(ProjectRankine.setup.rankineWorld))); public static final RegistryObject SODIUM_POTASSIUM_ALLOY_BARS = ITEMS.register("sodium_potassium_alloy_bars", () -> new BlockItem(RankineBlocks.SODIUM_POTASSIUM_ALLOY_BARS.get(),new Item.Properties().stacksTo(64).tab(ProjectRankine.setup.rankineWorld))); + public static final RegistryObject NEPTUNIUM_ALLOY_BARS = ITEMS.register("neptunium_alloy_bars", () -> new BlockItem(RankineBlocks.NEPTUNIUM_ALLOY_BARS.get(),new Item.Properties().stacksTo(64).tab(ProjectRankine.setup.rankineWorld))); public static final RegistryObject AMALGAM_BARS = ITEMS.register("amalgam_bars", () -> new BlockItem(RankineBlocks.AMALGAM_BARS.get(),new Item.Properties().stacksTo(64).tab(ProjectRankine.setup.rankineWorld))); public static final RegistryObject ENDER_AMALGAM_BARS = ITEMS.register("ender_amalgam_bars", () -> new BlockItem(RankineBlocks.ENDER_AMALGAM_BARS.get(),new Item.Properties().stacksTo(64).tab(ProjectRankine.setup.rankineWorld))); @@ -1303,6 +1307,7 @@ public class RankineItems { public static final RegistryObject GALINSTAN_NUGGET = ITEMS.register("galinstan_nugget", () -> new AlloyItem("70Ga-20In-10Sn",new ResourceLocation("rankine:alloying/galinstan_alloying"),new Item.Properties().stacksTo(64).tab(ProjectRankine.setup.rankineMetals))); public static final RegistryObject OSMIRIDIUM_NUGGET = ITEMS.register("osmiridium_nugget", () -> new AlloyItem("60Os-40Ir",new ResourceLocation("rankine:alloying/osmiridium_alloying"),new Item.Properties().stacksTo(64).tab(ProjectRankine.setup.rankineMetals))); public static final RegistryObject SODIUM_POTASSIUM_ALLOY_NUGGET = ITEMS.register("sodium_potassium_alloy_nugget", () -> new AlloyItem("77K-23Na",new ResourceLocation("rankine:alloying/sodium_potassium_alloy_alloying"),new Item.Properties().stacksTo(64).tab(ProjectRankine.setup.rankineMetals))); + public static final RegistryObject NEPTUNIUM_ALLOY_NUGGET = ITEMS.register("neptunium_alloy_nugget", () -> new AlloyItem("55Pd-30Al-15Np",new ResourceLocation("rankine:alloying/neptunium_alloy_alloying"),new Item.Properties().stacksTo(64).tab(ProjectRankine.setup.rankineMetals))); public static final RegistryObject AMALGAM_NUGGET = ITEMS.register("amalgam_nugget", () -> new AlloyItem("80Hg-20Au",new ResourceLocation("rankine:alloying/amalgam_alloying"),new Item.Properties().stacksTo(64).tab(ProjectRankine.setup.rankineMetals))); public static final RegistryObject ENDER_AMALGAM_NUGGET = ITEMS.register("ender_amalgam_nugget", () -> new AlloyItem("80Ed-20Au",new ResourceLocation("rankine:alloying/ender_amalgam_alloying"),new Item.Properties().stacksTo(64).tab(ProjectRankine.setup.rankineMetals))); @@ -1340,6 +1345,7 @@ public class RankineItems { public static final RegistryObject GALINSTAN_INGOT = ITEMS.register("galinstan_ingot", () -> new AlloyItem("70Ga-20In-10Sn",new ResourceLocation("rankine:alloying/galinstan_alloying"),new Item.Properties().stacksTo(64).tab(ProjectRankine.setup.rankineMetals))); public static final RegistryObject OSMIRIDIUM_INGOT = ITEMS.register("osmiridium_ingot", () -> new AlloyItem("60Os-40Ir",new ResourceLocation("rankine:alloying/osmiridium_alloying"),new Item.Properties().stacksTo(64).tab(ProjectRankine.setup.rankineMetals))); public static final RegistryObject SODIUM_POTASSIUM_ALLOY_INGOT = ITEMS.register("sodium_potassium_alloy_ingot", () -> new AlloyItem("77K-23Na",new ResourceLocation("rankine:alloying/sodium_potassium_alloy_alloying"),new Item.Properties().stacksTo(64).tab(ProjectRankine.setup.rankineMetals))); + public static final RegistryObject NEPTUNIUM_ALLOY_INGOT = ITEMS.register("neptunium_alloy_ingot", () -> new AlloyItem("55Pd-30Al-15Np",new ResourceLocation("rankine:alloying/neptunium_alloy_alloying"),new Item.Properties().stacksTo(64).tab(ProjectRankine.setup.rankineMetals))); public static final RegistryObject AMALGAM_INGOT = ITEMS.register("amalgam_ingot", () -> new AlloyItem("80Hg-20Au",new ResourceLocation("rankine:alloying/amalgam_alloying"),new Item.Properties().stacksTo(64).tab(ProjectRankine.setup.rankineMetals))); public static final RegistryObject ENDER_AMALGAM_INGOT = ITEMS.register("ender_amalgam_ingot", () -> new AlloyItem("80Ed-20Au",new ResourceLocation("rankine:alloying/ender_amalgam_alloying"),new Item.Properties().stacksTo(64).tab(ProjectRankine.setup.rankineMetals))); @@ -1376,6 +1382,7 @@ public class RankineItems { public static final RegistryObject GALINSTAN_BLOCK = ITEMS.register("galinstan_block", () -> new AlloyBlockItem(RankineBlocks.GALINSTAN_BLOCK.get(),"70Ga-20In-10Sn",new ResourceLocation("rankine:alloying/galinstan_alloying"),new Item.Properties().stacksTo(64).tab(ProjectRankine.setup.rankineMetals))); public static final RegistryObject OSMIRIDIUM_BLOCK = ITEMS.register("osmiridium_block", () -> new AlloyBlockItem(RankineBlocks.OSMIRIDIUM_BLOCK.get(),"60Os-40Ir",new ResourceLocation("rankine:alloying/osmiridium_alloying"),new Item.Properties().stacksTo(64).tab(ProjectRankine.setup.rankineMetals))); public static final RegistryObject SODIUM_POTASSIUM_ALLOY_BLOCK = ITEMS.register("sodium_potassium_alloy_block", () -> new AlloyBlockItem(RankineBlocks.SODIUM_POTASSIUM_ALLOY_BLOCK.get(),"77K-23Na",new ResourceLocation("rankine:alloying/sodium_potassium_alloy_alloying"),new Item.Properties().stacksTo(64).tab(ProjectRankine.setup.rankineMetals))); + public static final RegistryObject NEPTUNIUM_ALLOY_BLOCK = ITEMS.register("neptunium_alloy_block", () -> new AlloyBlockItem(RankineBlocks.NEPTUNIUM_ALLOY_BLOCK.get(),"55Pd-30Al-15Np",new ResourceLocation("rankine:alloying/neptunium_alloy_alloying"),new Item.Properties().stacksTo(64).tab(ProjectRankine.setup.rankineMetals))); public static final RegistryObject AMALGAM_BLOCK = ITEMS.register("amalgam_block", () -> new AlloyBlockItem(RankineBlocks.AMALGAM_BLOCK.get(),"80Hg-20Au",new ResourceLocation("rankine:alloying/amalgam_alloying"),new Item.Properties().stacksTo(64).tab(ProjectRankine.setup.rankineMetals))); public static final RegistryObject ENDER_AMALGAM_BLOCK = ITEMS.register("ender_amalgam_block", () -> new AlloyBlockItem(RankineBlocks.ENDER_AMALGAM_BLOCK.get(),"80Ed-20Au",new ResourceLocation("rankine:alloying/ender_amalgam_alloying"),new Item.Properties().stacksTo(64).tab(ProjectRankine.setup.rankineMetals))); @@ -1626,7 +1633,6 @@ public class RankineItems { public static final RegistryObject ALLOY_KNIFE = ITEMS.register("alloy_knife", () -> new AlloyKnifeItem(RankineToolMaterials.ALLOY, 1, -1.5F, "80Hg-20Au",null,new Item.Properties().tab(ProjectRankine.setup.rankineTools))); public static final RegistryObject ALLOY_CROWBAR = ITEMS.register("alloy_crowbar", () -> new AlloyCrowbarItem(RankineToolMaterials.ALLOY, 1.5F, -2.2F, "80Hg-20Au",null,new Item.Properties().tab(ProjectRankine.setup.rankineTools))); public static final RegistryObject ALLOY_BLUNDERBUSS = ITEMS.register("alloy_blunderbuss", () -> new AlloyBlunderbussItem(RankineToolMaterials.ALLOY, "80Hg-20Au",null, (new Item.Properties()).tab(ProjectRankine.setup.rankineTools))); - public static final RegistryObject ALLOY_SURF_ROD = ITEMS.register("alloy_surf_rod", () -> new AlloySurfRodItem(RankineToolMaterials.ALLOY, "80Hg-20Au",null, (new Item.Properties()).tab(ProjectRankine.setup.rankineTools))); public static final RegistryObject ALLOY_ARROW = ITEMS.register("alloy_arrow", () -> new AlloyArrowItem("80Hg-20Au",null, new Item.Properties().stacksTo(64).tab(ProjectRankine.setup.rankineTools))); public static final RegistryObject ROPE_COIL_ARROW = ITEMS.register("rope_coil_arrow", () -> new RopeCoilArrowItem(new Item.Properties().stacksTo(64).tab(ProjectRankine.setup.rankineTools))); @@ -1661,6 +1667,7 @@ public class RankineItems { public static final RegistryObject TOTEM_OF_INFUSING = ITEMS.register("totem_of_infusing", () -> new InfusingTotemItem(new Item.Properties().stacksTo(1).rarity(Rarity.UNCOMMON))); public static final RegistryObject TOTEM_OF_INVIGORATING = ITEMS.register("totem_of_invigorating", () -> new InvigoratingTotemItem(new Item.Properties().stacksTo(1).rarity(Rarity.UNCOMMON).tab(ProjectRankine.setup.rankineTools))); public static final RegistryObject TOTEM_OF_LEVITATING = ITEMS.register("totem_of_levitating", () -> new LevitationTotemItem(new Item.Properties().stacksTo(1).rarity(Rarity.UNCOMMON).tab(ProjectRankine.setup.rankineTools))); + public static final RegistryObject TOTEM_OF_POWERING = ITEMS.register("totem_of_powering", () -> new PoweringTotemItem(new Item.Properties().stacksTo(1).rarity(Rarity.UNCOMMON).tab(ProjectRankine.setup.rankineTools))); public static final RegistryObject TOTEM_OF_PROMISING = ITEMS.register("totem_of_promising", () -> new LuckTotemItem(new Item.Properties().stacksTo(1).rarity(Rarity.UNCOMMON).tab(ProjectRankine.setup.rankineTools))); public static final RegistryObject TOTEM_OF_REPULSING = ITEMS.register("totem_of_repulsing", () -> new RepulsionTotemItem(new Item.Properties().stacksTo(1).rarity(Rarity.UNCOMMON).tab(ProjectRankine.setup.rankineTools))); public static final RegistryObject TOTEM_OF_SOFTENING = ITEMS.register("totem_of_softening", () -> new SofteningTotemItem(new Item.Properties().stacksTo(1).rarity(Rarity.UNCOMMON).tab(ProjectRankine.setup.rankineTools))); @@ -1675,13 +1682,12 @@ public class RankineItems { public static final RegistryObject MATERIAL_TESTING_TABLE = ITEMS.register("material_testing_table", () -> new BlockItem(RankineBlocks.MATERIAL_TESTING_TABLE.get(),new Item.Properties().stacksTo(64).tab(ProjectRankine.setup.rankineTools))); public static final RegistryObject TEMPLATE_TABLE = ITEMS.register("template_table", () -> new BlockItem(RankineBlocks.TEMPLATE_TABLE.get(),new Item.Properties().stacksTo(64).tab(ProjectRankine.setup.rankineTools))); public static final RegistryObject ALLOY_FURNACE = ITEMS.register("alloy_furnace", () -> new BlockItem(RankineBlocks.ALLOY_FURNACE.get(),new Item.Properties().stacksTo(64).tab(ProjectRankine.setup.rankineTools))); - public static final RegistryObject PISTON_CRUSHER = ITEMS.register("piston_crusher", () -> new BlockItem(RankineBlocks.PISTON_CRUSHER.get(),new Item.Properties().stacksTo(64).tab(ProjectRankine.setup.rankineTools))); public static final RegistryObject PCF = ITEMS.register("pcf", () -> new BlockItem(RankineBlocks.PCF.get(),new Item.Properties().stacksTo(64))); public static final RegistryObject INDUCTION_FURNACE = ITEMS.register("induction_furnace", () -> new BlockItem(RankineBlocks.INDUCTION_FURNACE.get(),new Item.Properties().stacksTo(64).tab(ProjectRankine.setup.rankineTools))); - public static final RegistryObject GYRATORY_CRUSHER = ITEMS.register("gyratory_crusher", () -> new BlockItem(RankineBlocks.GYRATORY_CRUSHER.get(),new Item.Properties().stacksTo(64).tab(ProjectRankine.setup.rankineTools))); public static final RegistryObject EVAPORATION_TOWER = ITEMS.register("evaporation_tower", () -> new BlockItem(RankineBlocks.EVAPORATION_TOWER.get(),new Item.Properties().stacksTo(64).tab(ProjectRankine.setup.rankineTools))); public static final RegistryObject DIAMOND_ANVIL_CELL = ITEMS.register("diamond_anvil_cell", () -> new BlockItem(RankineBlocks.DIAMOND_ANVIL_CELL.get(),new Item.Properties().stacksTo(64).tab(ProjectRankine.setup.rankineTools))); public static final RegistryObject PARTICLE_ACCELERATOR = ITEMS.register("particle_accelerator", () -> new BlockItem(RankineBlocks.PARTICLE_ACCELERATOR.get(),new Item.Properties().stacksTo(64))); + public static final RegistryObject BATTERY_CHARGER = ITEMS.register("battery_charger", () -> new BlockItem(RankineBlocks.BATTERY_CHARGER.get(),new Item.Properties().stacksTo(64).tab(ProjectRankine.setup.rankineTools))); public static final RegistryObject FUSION_FURNACE = ITEMS.register("fusion_furnace", () -> new BlockItem(RankineBlocks.FUSION_FURNACE.get(),new Item.Properties().stacksTo(64).tab(ProjectRankine.setup.rankineTools))); public static final RegistryObject BOTANIST_STATION = ITEMS.register("botanist_station", () -> new BlockItem(RankineBlocks.BOTANIST_STATION.get(),new Item.Properties().stacksTo(64).tab(ProjectRankine.setup.rankineTools))); //public static final RegistryObject LASER_QUARRY = REGISTRY.register("laser_quarry", () -> new BlockItem(RankineBlocks.LASER_QUARRY.get(),new Item.Properties().stacksTo(64).tab(ProjectRankine.setup.rankineTools))); @@ -1731,6 +1737,7 @@ public class RankineItems { public static final RegistryObject DOWSING_ROD = ITEMS.register("dowsing_rod", () -> new DowsingRodItem(new Item.Properties().stacksTo(1).tab(ProjectRankine.setup.rankineTools))); public static final RegistryObject PROSPECTING_STICK = ITEMS.register("prospecting_stick", () -> new ProspectingStickItem(new Item.Properties().stacksTo(1).durability(7).tab(ProjectRankine.setup.rankineTools))); public static final RegistryObject ORE_DETECTOR = ITEMS.register("ore_detector", () -> new OreDetectorItem(new Item.Properties().stacksTo(1).durability(127).tab(ProjectRankine.setup.rankineTools))); + public static final RegistryObject GAS_DETECTOR = ITEMS.register("gas_detector", () -> new GasDetectorItem(new Item.Properties().stacksTo(1).durability(127).tab(ProjectRankine.setup.rankineTools))); public static final RegistryObject ROCK_DRILL = ITEMS.register("rock_drill", () -> new RockDrillItem(new Item.Properties().stacksTo(1).durability(15).tab(ProjectRankine.setup.rankineTools))); public static final RegistryObject FIRE_EXTINGUISHER = ITEMS.register("fire_extinguisher", () -> new FireExtinguisherItem(new Item.Properties().stacksTo(1).durability(15).tab(ProjectRankine.setup.rankineTools))); public static final RegistryObject GLASS_CUTTER = ITEMS.register("glass_cutter", () -> new GlassCutterItem(new Item.Properties().durability(256).tab(ProjectRankine.setup.rankineTools))); @@ -1806,11 +1813,11 @@ public class RankineItems { public static final RegistryObject SODIUM_SULFUR_BATTERY = ITEMS.register("sodium_sulfur_battery", () -> new BatteryItem(new Item.Properties().durability(896).tab(ProjectRankine.setup.rankineTools))); public static final RegistryObject LITHIUM_ION_BATTERY = ITEMS.register("lithium_ion_battery", () -> new BatteryItem(new Item.Properties().durability(1024).tab(ProjectRankine.setup.rankineTools))); - public static final RegistryObject STRONTIUM_RTG = ITEMS.register("strontium_rtg", () -> new BatteryItem(new Item.Properties().durability(3200).tab(ProjectRankine.setup.rankineTools))); - public static final RegistryObject POLONIUM_RTG = ITEMS.register("polonium_rtg", () -> new BatteryItem(new Item.Properties().durability(3200).tab(ProjectRankine.setup.rankineTools))); - public static final RegistryObject PLUTONIUM_RTG = ITEMS.register("plutonium_rtg", () -> new BatteryItem(new Item.Properties().durability(6400).tab(ProjectRankine.setup.rankineTools))); - public static final RegistryObject AMERICIUM_RTG = ITEMS.register("americium_rtg", () -> new BatteryItem(new Item.Properties().durability(9600).tab(ProjectRankine.setup.rankineTools))); - public static final RegistryObject CURIUM_RTG = ITEMS.register("curium_rtg", () -> new BatteryItem(new Item.Properties().durability(9600).tab(ProjectRankine.setup.rankineTools))); + public static final RegistryObject STRONTIUM_RTG = ITEMS.register("strontium_rtg", () -> new RTGItem(new Item.Properties().durability(3200).tab(ProjectRankine.setup.rankineTools))); + public static final RegistryObject POLONIUM_RTG = ITEMS.register("polonium_rtg", () -> new RTGItem(new Item.Properties().durability(3200).tab(ProjectRankine.setup.rankineTools))); + public static final RegistryObject PLUTONIUM_RTG = ITEMS.register("plutonium_rtg", () -> new RTGItem(new Item.Properties().durability(6400).tab(ProjectRankine.setup.rankineTools))); + public static final RegistryObject AMERICIUM_RTG = ITEMS.register("americium_rtg", () -> new RTGItem(new Item.Properties().durability(9600).tab(ProjectRankine.setup.rankineTools))); + public static final RegistryObject CURIUM_RTG = ITEMS.register("curium_rtg", () -> new RTGItem(new Item.Properties().durability(9600).tab(ProjectRankine.setup.rankineTools))); public static final RegistryObject WOOD_TIER_CRUSHING_HEAD = ITEMS.register("wood_tier_crushing_head", () -> new BlockItem(RankineBlocks.WOOD_TIER_CRUSHING_HEAD.get(),new Item.Properties().stacksTo(64).tab(ProjectRankine.setup.rankineTools))); public static final RegistryObject STONE_TIER_CRUSHING_HEAD = ITEMS.register("stone_tier_crushing_head", () -> new BlockItem(RankineBlocks.STONE_TIER_CRUSHING_HEAD.get(),new Item.Properties().stacksTo(64).tab(ProjectRankine.setup.rankineTools))); diff --git a/src/main/java/com/cannolicatfish/rankine/init/RankineLists.java b/src/main/java/com/cannolicatfish/rankine/init/RankineLists.java index 664ffa40cf..729fea794a 100644 --- a/src/main/java/com/cannolicatfish/rankine/init/RankineLists.java +++ b/src/main/java/com/cannolicatfish/rankine/init/RankineLists.java @@ -73,7 +73,7 @@ public class RankineLists { public static List ARROWS = Arrays.asList(RankineItems.ROPE_COIL_ARROW.get()); public static List WOODEN_TOOLS = Collections.singletonList(RankineItems.WOODEN_HAMMER.get()); public static List STONE_TOOLS = Collections.singletonList(RankineItems.STONE_HAMMER.get()); - public static List ALLOY_TOOLS = Arrays.asList(RankineItems.ALLOY_AXE.get(),RankineItems.ALLOY_PICKAXE.get(),RankineItems.ALLOY_SHOVEL.get(),RankineItems.ALLOY_SWORD.get(),RankineItems.ALLOY_HOE.get(),RankineItems.ALLOY_SPEAR.get(),RankineItems.ALLOY_HAMMER.get(),RankineItems.ALLOY_CROWBAR.get(),RankineItems.ALLOY_BLUNDERBUSS.get(),RankineItems.ALLOY_KNIFE.get(),RankineItems.ALLOY_SURF_ROD.get(),RankineItems.ALLOY_ARROW.get(),RankineItems.ALLOY_CHESTPLATE.get(),RankineItems.ALLOY_LEGGINGS.get(),RankineItems.ALLOY_BOOTS.get(),RankineItems.ALLOY_HELMET.get(),RankineItems.ALLOY_GEAR.get(),RankineItems.ALLOY_PLATE.get(),RankineItems.ALLOY_DUST.get(),RankineItems.ALLOY_ROD.get(),RankineItems.ALLOY_WIRE.get()); + public static List ALLOY_TOOLS = Arrays.asList(RankineItems.ALLOY_AXE.get(),RankineItems.ALLOY_PICKAXE.get(),RankineItems.ALLOY_SHOVEL.get(),RankineItems.ALLOY_SWORD.get(),RankineItems.ALLOY_HOE.get(),RankineItems.ALLOY_SPEAR.get(),RankineItems.ALLOY_HAMMER.get(),RankineItems.ALLOY_CROWBAR.get(),RankineItems.ALLOY_BLUNDERBUSS.get(),RankineItems.ALLOY_KNIFE.get(),RankineItems.ALLOY_ARROW.get(),RankineItems.ALLOY_CHESTPLATE.get(),RankineItems.ALLOY_LEGGINGS.get(),RankineItems.ALLOY_BOOTS.get(),RankineItems.ALLOY_HELMET.get(),RankineItems.ALLOY_GEAR.get(),RankineItems.ALLOY_PLATE.get(),RankineItems.ALLOY_DUST.get(),RankineItems.ALLOY_ROD.get(),RankineItems.ALLOY_WIRE.get()); public static List FLINT_TOOLS = Arrays.asList(RankineItems.FLINT_AXE.get(),RankineItems.FLINT_PICKAXE.get(),RankineItems.FLINT_SHOVEL.get(),RankineItems.FLINT_KNIFE.get(),RankineItems.FLINT_HOE.get(),RankineItems.FLINT_SPEAR.get()); public static List BRONZE_TOOLS = Arrays.asList(RankineItems.BRONZE_AXE.get(),RankineItems.BRONZE_PICKAXE.get(),RankineItems.BRONZE_SHOVEL.get(),RankineItems.BRONZE_SWORD.get(),RankineItems.BRONZE_HOE.get(),RankineItems.BRONZE_SPEAR.get(),RankineItems.BRONZE_HAMMER.get(),RankineItems.BRONZE_CROWBAR.get(),RankineItems.BRONZE_KNIFE.get(), RankineItems.BRONZE_BLUNDERBUSS.get()); public static List PEWTER_TOOLS = Arrays.asList(RankineItems.PEWTER_AXE.get(),RankineItems.PEWTER_PICKAXE.get(),RankineItems.PEWTER_SHOVEL.get(),RankineItems.PEWTER_SWORD.get(),RankineItems.PEWTER_HOE.get(),RankineItems.PEWTER_SPEAR.get(),RankineItems.PEWTER_HAMMER.get(),RankineItems.PEWTER_CROWBAR.get(),RankineItems.PEWTER_KNIFE.get(), RankineItems.PEWTER_BLUNDERBUSS.get()); @@ -101,14 +101,15 @@ public class RankineLists { public static List ELEMENT_NUGGETS = Arrays.asList(RankineItems.HYDROGEN_NUGGET.get(), RankineItems.HELIUM_NUGGET.get(), RankineItems.LITHIUM_NUGGET.get(), RankineItems.BERYLLIUM_NUGGET.get(), RankineItems.BORON_NUGGET.get(), RankineItems.CARBON_NUGGET.get(), RankineItems.NITROGEN_NUGGET.get(), RankineItems.OXYGEN_NUGGET.get(), RankineItems.FLUORINE_NUGGET.get(), RankineItems.NEON_NUGGET.get(), RankineItems.SODIUM_NUGGET.get(), RankineItems.MAGNESIUM_NUGGET.get(), RankineItems.ALUMINUM_NUGGET.get(), RankineItems.SILICON_NUGGET.get(), RankineItems.PHOSPHORUS_NUGGET.get(), RankineItems.SULFUR_NUGGET.get(), RankineItems.CHLORINE_NUGGET.get(), RankineItems.ARGON_NUGGET.get(), RankineItems.POTASSIUM_NUGGET.get(), RankineItems.CALCIUM_NUGGET.get(), RankineItems.SCANDIUM_NUGGET.get(), RankineItems.TITANIUM_NUGGET.get(), RankineItems.VANADIUM_NUGGET.get(), RankineItems.CHROMIUM_NUGGET.get(), RankineItems.MANGANESE_NUGGET.get(), RankineItems.COBALT_NUGGET.get(), RankineItems.NICKEL_NUGGET.get(), RankineItems.ZINC_NUGGET.get(), RankineItems.GALLIUM_NUGGET.get(), RankineItems.GERMANIUM_NUGGET.get(), RankineItems.ARSENIC_NUGGET.get(), RankineItems.SELENIUM_NUGGET.get(), RankineItems.BROMINE_NUGGET.get(), RankineItems. KRYPTON_NUGGET.get(), RankineItems.RUBIDIUM_NUGGET.get(), RankineItems.STRONTIUM_NUGGET.get(), RankineItems.YTTRIUM_NUGGET.get(), RankineItems.ZIRCONIUM_NUGGET.get(), RankineItems.NIOBIUM_NUGGET.get(), RankineItems.MOLYBDENUM_NUGGET.get(), RankineItems.TECHNETIUM_NUGGET.get(), RankineItems.RUTHENIUM_NUGGET.get(), RankineItems.RHODIUM_NUGGET.get(), RankineItems.PALLADIUM_NUGGET.get(), RankineItems.SILVER_NUGGET.get(), RankineItems.CADMIUM_NUGGET.get(), RankineItems.INDIUM_NUGGET.get(), RankineItems.TIN_NUGGET.get(), RankineItems.ANTIMONY_NUGGET.get(), RankineItems.TELLURIUM_NUGGET.get(), RankineItems.IODINE_NUGGET.get(), RankineItems.XENON_NUGGET.get(), RankineItems.CESIUM_NUGGET.get(), RankineItems.BARIUM_NUGGET.get(), RankineItems.LANTHANUM_NUGGET.get(), RankineItems.CERIUM_NUGGET.get(), RankineItems.PRASEODYMIUM_NUGGET.get(), RankineItems.NEODYMIUM_NUGGET.get(), RankineItems.PROMETHIUM_NUGGET.get(), RankineItems.SAMARIUM_NUGGET.get(), RankineItems.EUROPIUM_NUGGET.get(), RankineItems.GADOLINIUM_NUGGET.get(), RankineItems.TERBIUM_NUGGET.get(), RankineItems.DYSPROSIUM_NUGGET.get(), RankineItems.HOLMIUM_NUGGET.get(), RankineItems.ERBIUM_NUGGET.get(), RankineItems.THULIUM_NUGGET.get(), RankineItems. YTTERBIUM_NUGGET.get(), RankineItems.LUTETIUM_NUGGET.get(), RankineItems.HAFNIUM_NUGGET.get(), RankineItems.TANTALUM_NUGGET.get(), RankineItems.TUNGSTEN_NUGGET.get(), RankineItems.RHENIUM_NUGGET.get(), RankineItems.OSMIUM_NUGGET.get(), RankineItems.IRIDIUM_NUGGET.get(), RankineItems.PLATINUM_NUGGET.get(), RankineItems.MERCURY_NUGGET.get(), RankineItems.THALLIUM_NUGGET.get(), RankineItems.LEAD_NUGGET.get(), RankineItems.BISMUTH_NUGGET.get(), RankineItems.POLONIUM_NUGGET.get(), RankineItems.ASTATINE_NUGGET.get(), RankineItems.RADON_NUGGET.get(), RankineItems.FRANCIUM_NUGGET.get(), RankineItems. RADIUM_NUGGET.get(), RankineItems.ACTINIUM_NUGGET.get(), RankineItems.THORIUM_NUGGET.get(), RankineItems.PROTACTINIUM_NUGGET.get(), RankineItems.URANIUM_NUGGET.get(), RankineItems.NEPTUNIUM_NUGGET.get(), RankineItems.PLUTONIUM_NUGGET.get(), RankineItems.AMERICIUM_NUGGET.get(), RankineItems.CURIUM_NUGGET.get(), RankineItems.BERKELIUM_NUGGET.get(), RankineItems.CALIFORNIUM_NUGGET.get(), RankineItems.EINSTEINIUM_NUGGET.get(), RankineItems.FERMIUM_NUGGET.get(), RankineItems.MENDELEVIUM_NUGGET.get(), RankineItems.NOBELIUM_NUGGET.get(), RankineItems.LAWRENCIUM_NUGGET.get(), RankineItems.RUTHERFORDIUM_NUGGET.get(), RankineItems.DUBNIUM_NUGGET.get(), RankineItems.SEABORGIUM_NUGGET.get(), RankineItems.BOHRIUM_NUGGET.get(), RankineItems.HASSIUM_NUGGET.get(), RankineItems.MEITNERIUM_NUGGET.get(), RankineItems.DARMSTADTIUM_NUGGET.get(), RankineItems.ROENTGENIUM_NUGGET.get(), RankineItems.COPERNICIUM_NUGGET.get(), RankineItems.NIHONIUM_NUGGET.get(), RankineItems.FLEROVIUM_NUGGET.get(), RankineItems.MOSCOVIUM_NUGGET.get(), RankineItems.LIVERMORIUM_NUGGET.get(), RankineItems.TENNESSINE_NUGGET.get(), RankineItems.OGANESSON_NUGGET.get(),RankineItems.ENDOSITUM_NUGGET.get()); //public static List ELEMENTS = Arrays.asList("hydrogen","helium","lithium","beryllium","boron","carbon","nitrogen","oxygen","fluorine","neon","sodium","magnesium","aluminum","silicon","phosphorus","sulfur","chlorine","argon","potassium","calcium","scandium","titanium","vanadium","chromium","manganese","cobalt","nickel","copper","zinc","gallium","germanium","arsenic","selenium","bromine", "krypton","rubidium","strontium","yttrium","zirconium","niobium","molybdenum","technetium","ruthenium","rhodium","palladium","silver","cadmium","indium","tin","antimony","tellurium","iodine","xenon","cesium","barium","lanthanum","cerium","praseodymium","neodymium","promethium","samarium","europium","gadolinium","terbium","dysprosium","holmium","erbium","thulium", "ytterbium","lutetium","hafnium","tantalum","tungsten","rhenium","osmium","iridium","platinum","mercury","thallium","lead","bismuth","polonium","astatine","radon","francium", "radium","actinium","thorium","protactinium","uranium","neptunium","plutonium","americium","curium","berkelium","californium","einsteinium","fermium","mendelevium","nobelium","lawrencium", "rutherfordium","dubnium","seaborgium","bohrium","hassium","meitnerium","darmstadtium","roentgenium","copernicium","nihonium","flerovium","moscovium","livermorium","tennessine","oganesson","endositum"); - public static List ALLOY_NUGGETS = Arrays.asList(RankineItems.PEWTER_NUGGET.get(),RankineItems.BRONZE_NUGGET.get(),RankineItems.BRASS_NUGGET.get(),RankineItems.CAST_IRON_NUGGET.get(),RankineItems.INVAR_NUGGET.get(),RankineItems.CUPRONICKEL_NUGGET.get(),RankineItems.DURALUMIN_NUGGET.get(),RankineItems.MAGNESIUM_ALLOY_NUGGET.get(),RankineItems.STERLING_SILVER_NUGGET.get(),RankineItems.NICKEL_SILVER_NUGGET.get(),RankineItems.ALNICO_NUGGET.get(),RankineItems.STEEL_NUGGET.get(),RankineItems.STAINLESS_STEEL_NUGGET.get(),RankineItems.NITINOL_NUGGET.get(),RankineItems.ROSE_METAL_NUGGET.get(),RankineItems.MISCHMETAL_NUGGET.get(),RankineItems.FERROCERIUM_NUGGET.get(),RankineItems.GALINSTAN_NUGGET.get(),RankineItems.OSMIRIDIUM_NUGGET.get(),RankineItems.SODIUM_POTASSIUM_ALLOY_NUGGET.get(),RankineItems.AMALGAM_NUGGET.get(),RankineItems.ENDER_AMALGAM_NUGGET.get(),RankineItems.ROSE_GOLD_NUGGET.get(),RankineItems.GREEN_GOLD_NUGGET.get(),RankineItems.PURPLE_GOLD_NUGGET.get(),RankineItems.WHITE_GOLD_NUGGET.get(),RankineItems.BLUE_GOLD_NUGGET.get(),RankineItems.BLACK_GOLD_NUGGET.get(),RankineItems.NICKEL_SUPERALLOY_NUGGET.get(),RankineItems.COBALT_SUPERALLOY_NUGGET.get(),RankineItems.TUNGSTEN_HEAVY_ALLOY_NUGGET.get(),RankineItems.TITANIUM_ALLOY_NUGGET.get(),RankineItems.NIOBIUM_ALLOY_NUGGET.get(),RankineItems.ZIRCONIUM_ALLOY_NUGGET.get(),RankineItems.ALLOY_NUGGET.get()); - public static List ALLOY_INGOTS = Arrays.asList(RankineItems.PEWTER_INGOT.get(),RankineItems.BRONZE_INGOT.get(),RankineItems.BRASS_INGOT.get(),RankineItems.CAST_IRON_INGOT.get(),RankineItems.INVAR_INGOT.get(),RankineItems.CUPRONICKEL_INGOT.get(),RankineItems.DURALUMIN_INGOT.get(),RankineItems.MAGNESIUM_ALLOY_INGOT.get(),RankineItems.STERLING_SILVER_INGOT.get(),RankineItems.NICKEL_SILVER_INGOT.get(),RankineItems.ALNICO_INGOT.get(),RankineItems.STEEL_INGOT.get(),RankineItems.STAINLESS_STEEL_INGOT.get(),RankineItems.NITINOL_INGOT.get(),RankineItems.ROSE_METAL_INGOT.get(),RankineItems.MISCHMETAL_INGOT.get(),RankineItems.FERROCERIUM_INGOT.get(),RankineItems.GALINSTAN_INGOT.get(),RankineItems.OSMIRIDIUM_INGOT.get(),RankineItems.SODIUM_POTASSIUM_ALLOY_INGOT.get(),RankineItems.AMALGAM_INGOT.get(),RankineItems.ENDER_AMALGAM_INGOT.get(),RankineItems.ROSE_GOLD_INGOT.get(),RankineItems.GREEN_GOLD_INGOT.get(),RankineItems.PURPLE_GOLD_INGOT.get(),RankineItems.WHITE_GOLD_INGOT.get(),RankineItems.BLUE_GOLD_INGOT.get(),RankineItems.BLACK_GOLD_INGOT.get(),RankineItems.NICKEL_SUPERALLOY_INGOT.get(),RankineItems.COBALT_SUPERALLOY_INGOT.get(),RankineItems.TUNGSTEN_HEAVY_ALLOY_INGOT.get(),RankineItems.TITANIUM_ALLOY_INGOT.get(),RankineItems.NIOBIUM_ALLOY_INGOT.get(),RankineItems.ZIRCONIUM_ALLOY_INGOT.get(),RankineItems.ALLOY_INGOT.get()); - public static List ALLOY_BLOCKS = Arrays.asList(RankineBlocks.PEWTER_BLOCK.get(),RankineBlocks.BRONZE_BLOCK.get(),RankineBlocks.BRASS_BLOCK.get(),RankineBlocks.CAST_IRON_BLOCK.get(),RankineBlocks.INVAR_BLOCK.get(),RankineBlocks.CUPRONICKEL_BLOCK.get(),RankineBlocks.DURALUMIN_BLOCK.get(),RankineBlocks.MAGNESIUM_ALLOY_BLOCK.get(),RankineBlocks.STERLING_SILVER_BLOCK.get(),RankineBlocks.NICKEL_SILVER_BLOCK.get(),RankineBlocks.ALNICO_BLOCK.get(),RankineBlocks.STEEL_BLOCK.get(),RankineBlocks.STAINLESS_STEEL_BLOCK.get(),RankineBlocks.NITINOL_BLOCK.get(),RankineBlocks.ROSE_METAL_BLOCK.get(),RankineBlocks.MISCHMETAL_BLOCK.get(),RankineBlocks.FERROCERIUM_BLOCK.get(),RankineBlocks.GALINSTAN_BLOCK.get(),RankineBlocks.OSMIRIDIUM_BLOCK.get(),RankineBlocks.SODIUM_POTASSIUM_ALLOY_BLOCK.get(),RankineBlocks.AMALGAM_BLOCK.get(),RankineBlocks.ENDER_AMALGAM_BLOCK.get(),RankineBlocks.ROSE_GOLD_BLOCK.get(),RankineBlocks.GREEN_GOLD_BLOCK.get(),RankineBlocks.PURPLE_GOLD_BLOCK.get(),RankineBlocks.WHITE_GOLD_BLOCK.get(),RankineBlocks.BLUE_GOLD_BLOCK.get(),RankineBlocks.BLACK_GOLD_BLOCK.get(),RankineBlocks.NICKEL_SUPERALLOY_BLOCK.get(),RankineBlocks.COBALT_SUPERALLOY_BLOCK.get(),RankineBlocks.TUNGSTEN_HEAVY_ALLOY_BLOCK.get(),RankineBlocks.TITANIUM_ALLOY_BLOCK.get(),RankineBlocks.NIOBIUM_ALLOY_BLOCK.get(),RankineBlocks.ZIRCONIUM_ALLOY_BLOCK.get(),RankineBlocks.ALLOY_BLOCK.get()); - public static List ALLOY_PEDESTALS = Arrays.asList(RankineBlocks.PEWTER_PEDESTAL.get(),RankineBlocks.BRONZE_PEDESTAL.get(),RankineBlocks.BRASS_PEDESTAL.get(),RankineBlocks.CAST_IRON_PEDESTAL.get(),RankineBlocks.INVAR_PEDESTAL.get(),RankineBlocks.CUPRONICKEL_PEDESTAL.get(),RankineBlocks.DURALUMIN_PEDESTAL.get(),RankineBlocks.MAGNESIUM_ALLOY_PEDESTAL.get(),RankineBlocks.STERLING_SILVER_PEDESTAL.get(),RankineBlocks.NICKEL_SILVER_PEDESTAL.get(),RankineBlocks.ALNICO_PEDESTAL.get(),RankineBlocks.STEEL_PEDESTAL.get(),RankineBlocks.STAINLESS_STEEL_PEDESTAL.get(),RankineBlocks.NITINOL_PEDESTAL.get(),RankineBlocks.ROSE_METAL_PEDESTAL.get(),RankineBlocks.MISCHMETAL_PEDESTAL.get(),RankineBlocks.FERROCERIUM_PEDESTAL.get(),RankineBlocks.GALINSTAN_PEDESTAL.get(),RankineBlocks.OSMIRIDIUM_PEDESTAL.get(),RankineBlocks.SODIUM_POTASSIUM_ALLOY_PEDESTAL.get(),RankineBlocks.AMALGAM_PEDESTAL.get(),RankineBlocks.ENDER_AMALGAM_PEDESTAL.get(),RankineBlocks.ROSE_GOLD_PEDESTAL.get(),RankineBlocks.GREEN_GOLD_PEDESTAL.get(),RankineBlocks.PURPLE_GOLD_PEDESTAL.get(),RankineBlocks.WHITE_GOLD_PEDESTAL.get(),RankineBlocks.BLUE_GOLD_PEDESTAL.get(),RankineBlocks.BLACK_GOLD_PEDESTAL.get(),RankineBlocks.NICKEL_SUPERALLOY_PEDESTAL.get(),RankineBlocks.COBALT_SUPERALLOY_PEDESTAL.get(),RankineBlocks.TUNGSTEN_HEAVY_ALLOY_PEDESTAL.get(),RankineBlocks.TITANIUM_ALLOY_PEDESTAL.get(),RankineBlocks.NIOBIUM_ALLOY_PEDESTAL.get(),RankineBlocks.ZIRCONIUM_ALLOY_PEDESTAL.get()); - public static List ALLOY_SHEETMETALS = Arrays.asList(RankineBlocks.PEWTER_SHEETMETAL.get(),RankineBlocks.BRONZE_SHEETMETAL.get(),RankineBlocks.BRASS_SHEETMETAL.get(),RankineBlocks.CAST_IRON_SHEETMETAL.get(),RankineBlocks.INVAR_SHEETMETAL.get(),RankineBlocks.CUPRONICKEL_SHEETMETAL.get(),RankineBlocks.DURALUMIN_SHEETMETAL.get(),RankineBlocks.MAGNESIUM_ALLOY_SHEETMETAL.get(),RankineBlocks.STERLING_SILVER_SHEETMETAL.get(),RankineBlocks.NICKEL_SILVER_SHEETMETAL.get(),RankineBlocks.ALNICO_SHEETMETAL.get(),RankineBlocks.STEEL_SHEETMETAL.get(),RankineBlocks.STAINLESS_STEEL_SHEETMETAL.get(),RankineBlocks.NITINOL_SHEETMETAL.get(),RankineBlocks.ROSE_METAL_SHEETMETAL.get(),RankineBlocks.MISCHMETAL_SHEETMETAL.get(),RankineBlocks.FERROCERIUM_SHEETMETAL.get(),RankineBlocks.GALINSTAN_SHEETMETAL.get(),RankineBlocks.OSMIRIDIUM_SHEETMETAL.get(),RankineBlocks.SODIUM_POTASSIUM_ALLOY_SHEETMETAL.get(),RankineBlocks.AMALGAM_SHEETMETAL.get(),RankineBlocks.ENDER_AMALGAM_SHEETMETAL.get(),RankineBlocks.ROSE_GOLD_SHEETMETAL.get(),RankineBlocks.GREEN_GOLD_SHEETMETAL.get(),RankineBlocks.PURPLE_GOLD_SHEETMETAL.get(),RankineBlocks.WHITE_GOLD_SHEETMETAL.get(),RankineBlocks.BLUE_GOLD_SHEETMETAL.get(),RankineBlocks.BLACK_GOLD_SHEETMETAL.get(),RankineBlocks.NICKEL_SUPERALLOY_SHEETMETAL.get(),RankineBlocks.COBALT_SUPERALLOY_SHEETMETAL.get(),RankineBlocks.TUNGSTEN_HEAVY_ALLOY_SHEETMETAL.get(),RankineBlocks.TITANIUM_ALLOY_SHEETMETAL.get(),RankineBlocks.NIOBIUM_ALLOY_SHEETMETAL.get(),RankineBlocks.ZIRCONIUM_ALLOY_SHEETMETAL.get()); - public static List ALLOY_POLES = Arrays.asList(RankineBlocks.PEWTER_POLE.get(),RankineBlocks.BRONZE_POLE.get(),RankineBlocks.BRASS_POLE.get(),RankineBlocks.CAST_IRON_POLE.get(),RankineBlocks.INVAR_POLE.get(),RankineBlocks.CUPRONICKEL_POLE.get(),RankineBlocks.DURALUMIN_POLE.get(),RankineBlocks.MAGNESIUM_ALLOY_POLE.get(),RankineBlocks.STERLING_SILVER_POLE.get(),RankineBlocks.NICKEL_SILVER_POLE.get(),RankineBlocks.ALNICO_POLE.get(),RankineBlocks.STEEL_POLE.get(),RankineBlocks.STAINLESS_STEEL_POLE.get(),RankineBlocks.NITINOL_POLE.get(),RankineBlocks.ROSE_METAL_POLE.get(),RankineBlocks.MISCHMETAL_POLE.get(),RankineBlocks.FERROCERIUM_POLE.get(),RankineBlocks.GALINSTAN_POLE.get(),RankineBlocks.OSMIRIDIUM_POLE.get(),RankineBlocks.SODIUM_POTASSIUM_ALLOY_POLE.get(),RankineBlocks.AMALGAM_POLE.get(),RankineBlocks.ENDER_AMALGAM_POLE.get(),RankineBlocks.ROSE_GOLD_POLE.get(),RankineBlocks.GREEN_GOLD_POLE.get(),RankineBlocks.PURPLE_GOLD_POLE.get(),RankineBlocks.WHITE_GOLD_POLE.get(),RankineBlocks.BLUE_GOLD_POLE.get(),RankineBlocks.BLACK_GOLD_POLE.get(),RankineBlocks.NICKEL_SUPERALLOY_POLE.get(),RankineBlocks.COBALT_SUPERALLOY_POLE.get(),RankineBlocks.TUNGSTEN_HEAVY_ALLOY_POLE.get(),RankineBlocks.TITANIUM_ALLOY_POLE.get(),RankineBlocks.NIOBIUM_ALLOY_POLE.get(),RankineBlocks.ZIRCONIUM_ALLOY_POLE.get()); - public static List ALLOY_BARS = Arrays.asList(RankineBlocks.PEWTER_BARS.get(),RankineBlocks.BRONZE_BARS.get(),RankineBlocks.BRASS_BARS.get(),RankineBlocks.CAST_IRON_BARS.get(),RankineBlocks.INVAR_BARS.get(),RankineBlocks.CUPRONICKEL_BARS.get(),RankineBlocks.DURALUMIN_BARS.get(),RankineBlocks.MAGNESIUM_ALLOY_BARS.get(),RankineBlocks.STERLING_SILVER_BARS.get(),RankineBlocks.NICKEL_SILVER_BARS.get(),RankineBlocks.ALNICO_BARS.get(),RankineBlocks.STEEL_BARS.get(),RankineBlocks.STAINLESS_STEEL_BARS.get(),RankineBlocks.NITINOL_BARS.get(),RankineBlocks.ROSE_METAL_BARS.get(),RankineBlocks.MISCHMETAL_BARS.get(),RankineBlocks.FERROCERIUM_BARS.get(),RankineBlocks.GALINSTAN_BARS.get(),RankineBlocks.OSMIRIDIUM_BARS.get(),RankineBlocks.SODIUM_POTASSIUM_ALLOY_BARS.get(),RankineBlocks.AMALGAM_BARS.get(),RankineBlocks.ENDER_AMALGAM_BARS.get(),RankineBlocks.ROSE_GOLD_BARS.get(),RankineBlocks.GREEN_GOLD_BARS.get(),RankineBlocks.PURPLE_GOLD_BARS.get(),RankineBlocks.WHITE_GOLD_BARS.get(),RankineBlocks.BLUE_GOLD_BARS.get(),RankineBlocks.BLACK_GOLD_BARS.get(),RankineBlocks.NICKEL_SUPERALLOY_BARS.get(),RankineBlocks.COBALT_SUPERALLOY_BARS.get(),RankineBlocks.TUNGSTEN_HEAVY_ALLOY_BARS.get(),RankineBlocks.TITANIUM_ALLOY_BARS.get(),RankineBlocks.NIOBIUM_ALLOY_BARS.get(),RankineBlocks.ZIRCONIUM_ALLOY_BARS.get()); - public static List ALLOY_LADDERS = Arrays.asList(RankineBlocks.PEWTER_LADDER.get(),RankineBlocks.BRONZE_LADDER.get(),RankineBlocks.BRASS_LADDER.get(),RankineBlocks.CAST_IRON_LADDER.get(),RankineBlocks.INVAR_LADDER.get(),RankineBlocks.CUPRONICKEL_LADDER.get(),RankineBlocks.DURALUMIN_LADDER.get(),RankineBlocks.MAGNESIUM_ALLOY_LADDER.get(),RankineBlocks.STERLING_SILVER_LADDER.get(),RankineBlocks.NICKEL_SILVER_LADDER.get(),RankineBlocks.ALNICO_LADDER.get(),RankineBlocks.STEEL_LADDER.get(),RankineBlocks.STAINLESS_STEEL_LADDER.get(),RankineBlocks.NITINOL_LADDER.get(),RankineBlocks.ROSE_METAL_LADDER.get(),RankineBlocks.MISCHMETAL_LADDER.get(),RankineBlocks.FERROCERIUM_LADDER.get(),RankineBlocks.GALINSTAN_LADDER.get(),RankineBlocks.OSMIRIDIUM_LADDER.get(),RankineBlocks.SODIUM_POTASSIUM_ALLOY_LADDER.get(),RankineBlocks.AMALGAM_LADDER.get(),RankineBlocks.ENDER_AMALGAM_LADDER.get(),RankineBlocks.ROSE_GOLD_LADDER.get(),RankineBlocks.GREEN_GOLD_LADDER.get(),RankineBlocks.PURPLE_GOLD_LADDER.get(),RankineBlocks.WHITE_GOLD_LADDER.get(),RankineBlocks.BLUE_GOLD_LADDER.get(),RankineBlocks.BLACK_GOLD_LADDER.get(),RankineBlocks.NICKEL_SUPERALLOY_LADDER.get(),RankineBlocks.COBALT_SUPERALLOY_LADDER.get(),RankineBlocks.TUNGSTEN_HEAVY_ALLOY_LADDER.get(),RankineBlocks.TITANIUM_ALLOY_LADDER.get(),RankineBlocks.NIOBIUM_ALLOY_LADDER.get(),RankineBlocks.ZIRCONIUM_ALLOY_LADDER.get()); + public static List ALLOY_NUGGETS = Arrays.asList(RankineItems.PEWTER_NUGGET.get(),RankineItems.BRONZE_NUGGET.get(),RankineItems.BRASS_NUGGET.get(),RankineItems.CAST_IRON_NUGGET.get(),RankineItems.INVAR_NUGGET.get(),RankineItems.CUPRONICKEL_NUGGET.get(),RankineItems.DURALUMIN_NUGGET.get(),RankineItems.MAGNESIUM_ALLOY_NUGGET.get(),RankineItems.STERLING_SILVER_NUGGET.get(),RankineItems.NICKEL_SILVER_NUGGET.get(),RankineItems.ALNICO_NUGGET.get(),RankineItems.STEEL_NUGGET.get(),RankineItems.STAINLESS_STEEL_NUGGET.get(),RankineItems.NITINOL_NUGGET.get(),RankineItems.ROSE_METAL_NUGGET.get(),RankineItems.MISCHMETAL_NUGGET.get(),RankineItems.FERROCERIUM_NUGGET.get(),RankineItems.GALINSTAN_NUGGET.get(),RankineItems.OSMIRIDIUM_NUGGET.get(),RankineItems.SODIUM_POTASSIUM_ALLOY_NUGGET.get(),RankineItems.NEPTUNIUM_ALLOY_NUGGET.get(),RankineItems.AMALGAM_NUGGET.get(),RankineItems.ENDER_AMALGAM_NUGGET.get(),RankineItems.ROSE_GOLD_NUGGET.get(),RankineItems.GREEN_GOLD_NUGGET.get(),RankineItems.PURPLE_GOLD_NUGGET.get(),RankineItems.WHITE_GOLD_NUGGET.get(),RankineItems.BLUE_GOLD_NUGGET.get(),RankineItems.BLACK_GOLD_NUGGET.get(),RankineItems.NICKEL_SUPERALLOY_NUGGET.get(),RankineItems.COBALT_SUPERALLOY_NUGGET.get(),RankineItems.TUNGSTEN_HEAVY_ALLOY_NUGGET.get(),RankineItems.TITANIUM_ALLOY_NUGGET.get(),RankineItems.NIOBIUM_ALLOY_NUGGET.get(),RankineItems.ZIRCONIUM_ALLOY_NUGGET.get(),RankineItems.ALLOY_NUGGET.get()); + public static List ALLOY_INGOTS = Arrays.asList(RankineItems.PEWTER_INGOT.get(),RankineItems.BRONZE_INGOT.get(),RankineItems.BRASS_INGOT.get(),RankineItems.CAST_IRON_INGOT.get(),RankineItems.INVAR_INGOT.get(),RankineItems.CUPRONICKEL_INGOT.get(),RankineItems.DURALUMIN_INGOT.get(),RankineItems.MAGNESIUM_ALLOY_INGOT.get(),RankineItems.STERLING_SILVER_INGOT.get(),RankineItems.NICKEL_SILVER_INGOT.get(),RankineItems.ALNICO_INGOT.get(),RankineItems.STEEL_INGOT.get(),RankineItems.STAINLESS_STEEL_INGOT.get(),RankineItems.NITINOL_INGOT.get(),RankineItems.ROSE_METAL_INGOT.get(),RankineItems.MISCHMETAL_INGOT.get(),RankineItems.FERROCERIUM_INGOT.get(),RankineItems.GALINSTAN_INGOT.get(),RankineItems.OSMIRIDIUM_INGOT.get(),RankineItems.SODIUM_POTASSIUM_ALLOY_INGOT.get(),RankineItems.NEPTUNIUM_ALLOY_INGOT.get(),RankineItems.AMALGAM_INGOT.get(),RankineItems.ENDER_AMALGAM_INGOT.get(),RankineItems.ROSE_GOLD_INGOT.get(),RankineItems.GREEN_GOLD_INGOT.get(),RankineItems.PURPLE_GOLD_INGOT.get(),RankineItems.WHITE_GOLD_INGOT.get(),RankineItems.BLUE_GOLD_INGOT.get(),RankineItems.BLACK_GOLD_INGOT.get(),RankineItems.NICKEL_SUPERALLOY_INGOT.get(),RankineItems.COBALT_SUPERALLOY_INGOT.get(),RankineItems.TUNGSTEN_HEAVY_ALLOY_INGOT.get(),RankineItems.TITANIUM_ALLOY_INGOT.get(),RankineItems.NIOBIUM_ALLOY_INGOT.get(),RankineItems.ZIRCONIUM_ALLOY_INGOT.get(),RankineItems.ALLOY_INGOT.get()); + public static List ALLOY_BLOCKS = Arrays.asList(RankineBlocks.PEWTER_BLOCK.get(),RankineBlocks.BRONZE_BLOCK.get(),RankineBlocks.BRASS_BLOCK.get(),RankineBlocks.CAST_IRON_BLOCK.get(),RankineBlocks.INVAR_BLOCK.get(),RankineBlocks.CUPRONICKEL_BLOCK.get(),RankineBlocks.DURALUMIN_BLOCK.get(),RankineBlocks.MAGNESIUM_ALLOY_BLOCK.get(),RankineBlocks.STERLING_SILVER_BLOCK.get(),RankineBlocks.NICKEL_SILVER_BLOCK.get(),RankineBlocks.ALNICO_BLOCK.get(),RankineBlocks.STEEL_BLOCK.get(),RankineBlocks.STAINLESS_STEEL_BLOCK.get(),RankineBlocks.NITINOL_BLOCK.get(),RankineBlocks.ROSE_METAL_BLOCK.get(),RankineBlocks.MISCHMETAL_BLOCK.get(),RankineBlocks.FERROCERIUM_BLOCK.get(),RankineBlocks.GALINSTAN_BLOCK.get(),RankineBlocks.OSMIRIDIUM_BLOCK.get(),RankineBlocks.SODIUM_POTASSIUM_ALLOY_BLOCK.get(),RankineBlocks.NEPTUNIUM_ALLOY_BLOCK.get(),RankineBlocks.AMALGAM_BLOCK.get(),RankineBlocks.ENDER_AMALGAM_BLOCK.get(),RankineBlocks.ROSE_GOLD_BLOCK.get(),RankineBlocks.GREEN_GOLD_BLOCK.get(),RankineBlocks.PURPLE_GOLD_BLOCK.get(),RankineBlocks.WHITE_GOLD_BLOCK.get(),RankineBlocks.BLUE_GOLD_BLOCK.get(),RankineBlocks.BLACK_GOLD_BLOCK.get(),RankineBlocks.NICKEL_SUPERALLOY_BLOCK.get(),RankineBlocks.COBALT_SUPERALLOY_BLOCK.get(),RankineBlocks.TUNGSTEN_HEAVY_ALLOY_BLOCK.get(),RankineBlocks.TITANIUM_ALLOY_BLOCK.get(),RankineBlocks.NIOBIUM_ALLOY_BLOCK.get(),RankineBlocks.ZIRCONIUM_ALLOY_BLOCK.get(),RankineBlocks.ALLOY_BLOCK.get()); + public static List ALLOY_PEDESTALS = Arrays.asList(RankineBlocks.PEWTER_PEDESTAL.get(),RankineBlocks.BRONZE_PEDESTAL.get(),RankineBlocks.BRASS_PEDESTAL.get(),RankineBlocks.CAST_IRON_PEDESTAL.get(),RankineBlocks.INVAR_PEDESTAL.get(),RankineBlocks.CUPRONICKEL_PEDESTAL.get(),RankineBlocks.DURALUMIN_PEDESTAL.get(),RankineBlocks.MAGNESIUM_ALLOY_PEDESTAL.get(),RankineBlocks.STERLING_SILVER_PEDESTAL.get(),RankineBlocks.NICKEL_SILVER_PEDESTAL.get(),RankineBlocks.ALNICO_PEDESTAL.get(),RankineBlocks.STEEL_PEDESTAL.get(),RankineBlocks.STAINLESS_STEEL_PEDESTAL.get(),RankineBlocks.NITINOL_PEDESTAL.get(),RankineBlocks.ROSE_METAL_PEDESTAL.get(),RankineBlocks.MISCHMETAL_PEDESTAL.get(),RankineBlocks.FERROCERIUM_PEDESTAL.get(),RankineBlocks.GALINSTAN_PEDESTAL.get(),RankineBlocks.OSMIRIDIUM_PEDESTAL.get(),RankineBlocks.SODIUM_POTASSIUM_ALLOY_PEDESTAL.get(),RankineBlocks.NEPTUNIUM_ALLOY_PEDESTAL.get(),RankineBlocks.AMALGAM_PEDESTAL.get(),RankineBlocks.ENDER_AMALGAM_PEDESTAL.get(),RankineBlocks.ROSE_GOLD_PEDESTAL.get(),RankineBlocks.GREEN_GOLD_PEDESTAL.get(),RankineBlocks.PURPLE_GOLD_PEDESTAL.get(),RankineBlocks.WHITE_GOLD_PEDESTAL.get(),RankineBlocks.BLUE_GOLD_PEDESTAL.get(),RankineBlocks.BLACK_GOLD_PEDESTAL.get(),RankineBlocks.NICKEL_SUPERALLOY_PEDESTAL.get(),RankineBlocks.COBALT_SUPERALLOY_PEDESTAL.get(),RankineBlocks.TUNGSTEN_HEAVY_ALLOY_PEDESTAL.get(),RankineBlocks.TITANIUM_ALLOY_PEDESTAL.get(),RankineBlocks.NIOBIUM_ALLOY_PEDESTAL.get(),RankineBlocks.ZIRCONIUM_ALLOY_PEDESTAL.get()); + public static List ALLOY_SHEETMETALS = Arrays.asList(RankineBlocks.PEWTER_SHEETMETAL.get(),RankineBlocks.BRONZE_SHEETMETAL.get(),RankineBlocks.BRASS_SHEETMETAL.get(),RankineBlocks.CAST_IRON_SHEETMETAL.get(),RankineBlocks.INVAR_SHEETMETAL.get(),RankineBlocks.CUPRONICKEL_SHEETMETAL.get(),RankineBlocks.DURALUMIN_SHEETMETAL.get(),RankineBlocks.MAGNESIUM_ALLOY_SHEETMETAL.get(),RankineBlocks.STERLING_SILVER_SHEETMETAL.get(),RankineBlocks.NICKEL_SILVER_SHEETMETAL.get(),RankineBlocks.ALNICO_SHEETMETAL.get(),RankineBlocks.STEEL_SHEETMETAL.get(),RankineBlocks.STAINLESS_STEEL_SHEETMETAL.get(),RankineBlocks.NITINOL_SHEETMETAL.get(),RankineBlocks.ROSE_METAL_SHEETMETAL.get(),RankineBlocks.MISCHMETAL_SHEETMETAL.get(),RankineBlocks.FERROCERIUM_SHEETMETAL.get(),RankineBlocks.GALINSTAN_SHEETMETAL.get(),RankineBlocks.OSMIRIDIUM_SHEETMETAL.get(),RankineBlocks.SODIUM_POTASSIUM_ALLOY_SHEETMETAL.get(),RankineBlocks.NEPTUNIUM_ALLOY_SHEETMETAL.get(),RankineBlocks.AMALGAM_SHEETMETAL.get(),RankineBlocks.ENDER_AMALGAM_SHEETMETAL.get(),RankineBlocks.ROSE_GOLD_SHEETMETAL.get(),RankineBlocks.GREEN_GOLD_SHEETMETAL.get(),RankineBlocks.PURPLE_GOLD_SHEETMETAL.get(),RankineBlocks.WHITE_GOLD_SHEETMETAL.get(),RankineBlocks.BLUE_GOLD_SHEETMETAL.get(),RankineBlocks.BLACK_GOLD_SHEETMETAL.get(),RankineBlocks.NICKEL_SUPERALLOY_SHEETMETAL.get(),RankineBlocks.COBALT_SUPERALLOY_SHEETMETAL.get(),RankineBlocks.TUNGSTEN_HEAVY_ALLOY_SHEETMETAL.get(),RankineBlocks.TITANIUM_ALLOY_SHEETMETAL.get(),RankineBlocks.NIOBIUM_ALLOY_SHEETMETAL.get(),RankineBlocks.ZIRCONIUM_ALLOY_SHEETMETAL.get()); + public static List ALLOY_POLES = Arrays.asList(RankineBlocks.PEWTER_POLE.get(),RankineBlocks.BRONZE_POLE.get(),RankineBlocks.BRASS_POLE.get(),RankineBlocks.CAST_IRON_POLE.get(),RankineBlocks.INVAR_POLE.get(),RankineBlocks.CUPRONICKEL_POLE.get(),RankineBlocks.DURALUMIN_POLE.get(),RankineBlocks.MAGNESIUM_ALLOY_POLE.get(),RankineBlocks.STERLING_SILVER_POLE.get(),RankineBlocks.NICKEL_SILVER_POLE.get(),RankineBlocks.ALNICO_POLE.get(),RankineBlocks.STEEL_POLE.get(),RankineBlocks.STAINLESS_STEEL_POLE.get(),RankineBlocks.NITINOL_POLE.get(),RankineBlocks.ROSE_METAL_POLE.get(),RankineBlocks.MISCHMETAL_POLE.get(),RankineBlocks.FERROCERIUM_POLE.get(),RankineBlocks.GALINSTAN_POLE.get(),RankineBlocks.OSMIRIDIUM_POLE.get(),RankineBlocks.SODIUM_POTASSIUM_ALLOY_POLE.get(),RankineBlocks.NEPTUNIUM_ALLOY_POLE.get(),RankineBlocks.AMALGAM_POLE.get(),RankineBlocks.ENDER_AMALGAM_POLE.get(),RankineBlocks.ROSE_GOLD_POLE.get(),RankineBlocks.GREEN_GOLD_POLE.get(),RankineBlocks.PURPLE_GOLD_POLE.get(),RankineBlocks.WHITE_GOLD_POLE.get(),RankineBlocks.BLUE_GOLD_POLE.get(),RankineBlocks.BLACK_GOLD_POLE.get(),RankineBlocks.NICKEL_SUPERALLOY_POLE.get(),RankineBlocks.COBALT_SUPERALLOY_POLE.get(),RankineBlocks.TUNGSTEN_HEAVY_ALLOY_POLE.get(),RankineBlocks.TITANIUM_ALLOY_POLE.get(),RankineBlocks.NIOBIUM_ALLOY_POLE.get(),RankineBlocks.ZIRCONIUM_ALLOY_POLE.get()); + public static List ALLOY_BARS = Arrays.asList(RankineBlocks.PEWTER_BARS.get(),RankineBlocks.BRONZE_BARS.get(),RankineBlocks.BRASS_BARS.get(),RankineBlocks.CAST_IRON_BARS.get(),RankineBlocks.INVAR_BARS.get(),RankineBlocks.CUPRONICKEL_BARS.get(),RankineBlocks.DURALUMIN_BARS.get(),RankineBlocks.MAGNESIUM_ALLOY_BARS.get(),RankineBlocks.STERLING_SILVER_BARS.get(),RankineBlocks.NICKEL_SILVER_BARS.get(),RankineBlocks.ALNICO_BARS.get(),RankineBlocks.STEEL_BARS.get(),RankineBlocks.STAINLESS_STEEL_BARS.get(),RankineBlocks.NITINOL_BARS.get(),RankineBlocks.ROSE_METAL_BARS.get(),RankineBlocks.MISCHMETAL_BARS.get(),RankineBlocks.FERROCERIUM_BARS.get(),RankineBlocks.GALINSTAN_BARS.get(),RankineBlocks.OSMIRIDIUM_BARS.get(),RankineBlocks.SODIUM_POTASSIUM_ALLOY_BARS.get(),RankineBlocks.NEPTUNIUM_ALLOY_BARS.get(),RankineBlocks.AMALGAM_BARS.get(),RankineBlocks.ENDER_AMALGAM_BARS.get(),RankineBlocks.ROSE_GOLD_BARS.get(),RankineBlocks.GREEN_GOLD_BARS.get(),RankineBlocks.PURPLE_GOLD_BARS.get(),RankineBlocks.WHITE_GOLD_BARS.get(),RankineBlocks.BLUE_GOLD_BARS.get(),RankineBlocks.BLACK_GOLD_BARS.get(),RankineBlocks.NICKEL_SUPERALLOY_BARS.get(),RankineBlocks.COBALT_SUPERALLOY_BARS.get(),RankineBlocks.TUNGSTEN_HEAVY_ALLOY_BARS.get(),RankineBlocks.TITANIUM_ALLOY_BARS.get(),RankineBlocks.NIOBIUM_ALLOY_BARS.get(),RankineBlocks.ZIRCONIUM_ALLOY_BARS.get()); + public static List ALLOY_LADDERS = Arrays.asList(RankineBlocks.PEWTER_LADDER.get(),RankineBlocks.BRONZE_LADDER.get(),RankineBlocks.BRASS_LADDER.get(),RankineBlocks.CAST_IRON_LADDER.get(),RankineBlocks.INVAR_LADDER.get(),RankineBlocks.CUPRONICKEL_LADDER.get(),RankineBlocks.DURALUMIN_LADDER.get(),RankineBlocks.MAGNESIUM_ALLOY_LADDER.get(),RankineBlocks.STERLING_SILVER_LADDER.get(),RankineBlocks.NICKEL_SILVER_LADDER.get(),RankineBlocks.ALNICO_LADDER.get(),RankineBlocks.STEEL_LADDER.get(),RankineBlocks.STAINLESS_STEEL_LADDER.get(),RankineBlocks.NITINOL_LADDER.get(),RankineBlocks.ROSE_METAL_LADDER.get(),RankineBlocks.MISCHMETAL_LADDER.get(),RankineBlocks.FERROCERIUM_LADDER.get(),RankineBlocks.GALINSTAN_LADDER.get(),RankineBlocks.OSMIRIDIUM_LADDER.get(),RankineBlocks.SODIUM_POTASSIUM_ALLOY_LADDER.get(),RankineBlocks.NEPTUNIUM_ALLOY_LADDER.get(),RankineBlocks.AMALGAM_LADDER.get(),RankineBlocks.ENDER_AMALGAM_LADDER.get(),RankineBlocks.ROSE_GOLD_LADDER.get(),RankineBlocks.GREEN_GOLD_LADDER.get(),RankineBlocks.PURPLE_GOLD_LADDER.get(),RankineBlocks.WHITE_GOLD_LADDER.get(),RankineBlocks.BLUE_GOLD_LADDER.get(),RankineBlocks.BLACK_GOLD_LADDER.get(),RankineBlocks.NICKEL_SUPERALLOY_LADDER.get(),RankineBlocks.COBALT_SUPERALLOY_LADDER.get(),RankineBlocks.TUNGSTEN_HEAVY_ALLOY_LADDER.get(),RankineBlocks.TITANIUM_ALLOY_LADDER.get(),RankineBlocks.NIOBIUM_ALLOY_LADDER.get(),RankineBlocks.ZIRCONIUM_ALLOY_LADDER.get()); + public static List CROPS_SINGLE = Arrays.asList(RankineBlocks.OAT_PLANT.get(),RankineBlocks.RICE_PLANT.get(),RankineBlocks.MILLET_PLANT.get(),RankineBlocks.CAMPHOR_BASIL_PLANT.get(),RankineBlocks.SOYBEAN_PLANT.get()); public static List CROPS_DOUBLE = Arrays.asList(RankineBlocks.BARLEY_PLANT.get(),RankineBlocks.RYE_PLANT.get(),RankineBlocks.COTTON_PLANT.get(),RankineBlocks.ASPARAGUS_PLANT.get()); diff --git a/src/main/java/com/cannolicatfish/rankine/init/RankineRemappings.java b/src/main/java/com/cannolicatfish/rankine/init/RankineRemappings.java index 55f0e3d0dc..67968fb400 100644 --- a/src/main/java/com/cannolicatfish/rankine/init/RankineRemappings.java +++ b/src/main/java/com/cannolicatfish/rankine/init/RankineRemappings.java @@ -1,5 +1,6 @@ package com.cannolicatfish.rankine.init; +import net.minecraft.world.item.Items; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Blocks; import net.minecraft.world.item.Item; @@ -13,6 +14,10 @@ public class RankineRemappings { public static Map itemRemappings = new HashMap<>(); public static Map getItemRemappings() { + + itemRemappings.put(new ResourceLocation("rankine:piston_crusher"), Items.PISTON); + itemRemappings.put(new ResourceLocation("rankine:gyratory_crusher"), Items.PISTON); + itemRemappings.put(new ResourceLocation("rankine:power_cell_1"),RankineItems.MAGNESIUM_BATTERY.get()); itemRemappings.put(new ResourceLocation("rankine:power_cell_2"),RankineItems.LEAD_ACID_BATTERY.get()); itemRemappings.put(new ResourceLocation("rankine:power_cell_3"),RankineItems.VANADIUM_REDOX_BATTERY.get()); @@ -96,6 +101,9 @@ public static Map getBlockRemappings() { blockRemappings.put(new ResourceLocation("rankine:aluminum_ladder"),RankineBlocks.DURALUMIN_LADDER.get()); + blockRemappings.put(new ResourceLocation("rankine:piston_crusher"), Blocks.PISTON); + blockRemappings.put(new ResourceLocation("rankine:gyratory_crusher"), Blocks.PISTON); + blockRemappings.put(new ResourceLocation("rankine:aquamarine_ore"), RankineBlocks.BERYL_ORE.get()); blockRemappings.put(new ResourceLocation("rankine:columbite_ore"), RankineBlocks.COLTAN_ORE.get()); blockRemappings.put(new ResourceLocation("rankine:fluorite_ore"), Blocks.STONE); diff --git a/src/main/java/com/cannolicatfish/rankine/init/RankineTags.java b/src/main/java/com/cannolicatfish/rankine/init/RankineTags.java index a555b08aa4..ccc06854b9 100644 --- a/src/main/java/com/cannolicatfish/rankine/init/RankineTags.java +++ b/src/main/java/com/cannolicatfish/rankine/init/RankineTags.java @@ -262,6 +262,7 @@ public static final class Blocks { public static final TagKey STORAGE_BLOCKS_GALINSTAN = forgeBlock("storage_blocks/galinstan"); public static final TagKey STORAGE_BLOCKS_OSMIRIDIUM = forgeBlock("storage_blocks/osmiridium"); public static final TagKey STORAGE_BLOCKS_SODIUM_POTASSIUM_ALLOY = forgeBlock("storage_blocks/sodium_potassium_alloy"); + public static final TagKey STORAGE_BLOCKS_NEPTUNIUM_ALLOY = forgeBlock("storage_blocks/neptunium_alloy"); public static final TagKey STORAGE_BLOCKS_AMALGAM = forgeBlock("storage_blocks/amalgam"); public static final TagKey STORAGE_BLOCKS_ENDER_AMALGAM = forgeBlock("storage_blocks/ender_amalgam"); public static final TagKey STORAGE_BLOCKS_ROSE_GOLD = forgeBlock("storage_blocks/rose_gold"); @@ -389,7 +390,8 @@ public static final class Items { public static final TagKey CRAFTING_METAL_BLOCKS = modItem("crafting_metal_blocks"); public static final TagKey ALKALI_HYDROXIDES = modItem("alkali_hydroxides"); public static final TagKey ELECTROMAGNETS = modItem("electromagnets"); - + public static final TagKey BATTERIES = modItem("batteries"); + public static final TagKey RTG = modItem("rtg"); public static final TagKey GEODES = modItem("geodes"); @@ -581,6 +583,7 @@ public static final class Items { public static final TagKey NUGGETS_GALINSTAN = forgeItem("nuggets/galinstan"); public static final TagKey NUGGETS_OSMIRIDIUM = forgeItem("nuggets/osmiridium"); public static final TagKey NUGGETS_SODIUM_POTASSIUM_ALLOY = forgeItem("nuggets/sodium_potassium_alloy"); + public static final TagKey NUGGETS_NEPTUNIUM_ALLOY = forgeItem("nuggets/neptunium_alloy"); public static final TagKey NUGGETS_AMALGAM = forgeItem("nuggets/amalgam"); public static final TagKey NUGGETS_ENDER_AMALGAM = forgeItem("nuggets/ender_amalgam"); public static final TagKey NUGGETS_ROSE_GOLD = forgeItem("nuggets/rose_gold"); @@ -736,6 +739,7 @@ public static final class Items { public static final TagKey INGOTS_GALINSTAN = forgeItem("ingots/galinstan"); public static final TagKey INGOTS_OSMIRIDIUM = forgeItem("ingots/osmiridium"); public static final TagKey INGOTS_SODIUM_POTASSIUM_ALLOY = forgeItem("ingots/sodium_potassium_alloy"); + public static final TagKey INGOTS_NEPTUNIUM_ALLOY = forgeItem("ingots/neptunium_alloy"); public static final TagKey INGOTS_AMALGAM = forgeItem("ingots/amalgam"); public static final TagKey INGOTS_ENDER_AMALGAM = forgeItem("ingots/ender_amalgam"); public static final TagKey INGOTS_ROSE_GOLD = forgeItem("ingots/rose_gold"); @@ -905,6 +909,7 @@ public static final class Items { public static final TagKey STORAGE_BLOCKS_GALINSTAN = forgeItem("storage_blocks/galinstan"); public static final TagKey STORAGE_BLOCKS_OSMIRIDIUM = forgeItem("storage_blocks/osmiridium"); public static final TagKey STORAGE_BLOCKS_SODIUM_POTASSIUM_ALLOY = forgeItem("storage_blocks/sodium_potassium_alloy"); + public static final TagKey STORAGE_BLOCKS_NEPTUNIUM_ALLOY = forgeItem("storage_blocks/neptunium_alloy"); public static final TagKey STORAGE_BLOCKS_AMALGAM = forgeItem("storage_blocks/amalgam"); public static final TagKey STORAGE_BLOCKS_ENDER_AMALGAM = forgeItem("storage_blocks/ender_amalgam"); public static final TagKey STORAGE_BLOCKS_ROSE_GOLD = forgeItem("storage_blocks/rose_gold"); diff --git a/src/main/java/com/cannolicatfish/rankine/items/BatteryItem.java b/src/main/java/com/cannolicatfish/rankine/items/BatteryItem.java index cb454f0ab0..2d9ebf302e 100644 --- a/src/main/java/com/cannolicatfish/rankine/items/BatteryItem.java +++ b/src/main/java/com/cannolicatfish/rankine/items/BatteryItem.java @@ -1,14 +1,16 @@ package com.cannolicatfish.rankine.items; -import net.minecraft.world.effect.MobEffects; -import net.minecraft.world.entity.Entity; -import net.minecraft.world.entity.LivingEntity; +import net.minecraft.ChatFormatting; +import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.TranslatableComponent; import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; - -import net.minecraft.world.item.Item.Properties; +import net.minecraft.world.item.TooltipFlag; import net.minecraft.world.level.Level; +import javax.annotation.Nullable; +import java.util.List; + public class BatteryItem extends Item { public BatteryItem(Properties properties) { super(properties); @@ -23,6 +25,12 @@ private int getTier() { return 0; } + @Override + public void appendHoverText(ItemStack stack, @Nullable Level worldIn, List tooltip, TooltipFlag flagIn) { + tooltip.add(new TranslatableComponent("rankine.battery.charge",stack.getMaxDamage()-stack.getDamageValue(),stack.getMaxDamage()).withStyle(ChatFormatting.AQUA)); + super.appendHoverText(stack, worldIn, tooltip, flagIn); + } + public static int getTier(ItemStack stack) { if (stack.getItem() instanceof BatteryItem) { return ((BatteryItem) stack.getItem()).getTier(); @@ -49,14 +57,4 @@ public boolean isRepairable(ItemStack stack) { return false; } - @Override - public void inventoryTick(ItemStack stack, Level worldIn, Entity entityIn, int itemSlot, boolean isSelected) { - if (stack.getDamageValue() > 0) { - if (entityIn instanceof LivingEntity living && living.hasEffect(MobEffects.CONDUIT_POWER)) { - stack.setDamageValue(stack.getDamageValue() - 1); - } - } - - super.inventoryTick(stack, worldIn, entityIn, itemSlot, isSelected); - } } diff --git a/src/main/java/com/cannolicatfish/rankine/items/PackagedToolItem.java b/src/main/java/com/cannolicatfish/rankine/items/PackagedToolItem.java index 5abdf7af31..92df13ef40 100644 --- a/src/main/java/com/cannolicatfish/rankine/items/PackagedToolItem.java +++ b/src/main/java/com/cannolicatfish/rankine/items/PackagedToolItem.java @@ -5,15 +5,15 @@ import com.cannolicatfish.rankine.items.alloys.IAlloyItem; import com.cannolicatfish.rankine.items.alloys.IAlloyTieredItem; import com.cannolicatfish.rankine.recipe.AlloyingRecipe; -import net.minecraft.world.item.TooltipFlag; +import net.minecraft.ChatFormatting; +import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.TranslatableComponent; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResultHolder; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; -import net.minecraft.world.InteractionResultHolder; -import net.minecraft.world.InteractionHand; -import net.minecraft.network.chat.Component; -import net.minecraft.ChatFormatting; -import net.minecraft.network.chat.TranslatableComponent; +import net.minecraft.world.item.TooltipFlag; import net.minecraft.world.level.Level; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; @@ -24,8 +24,6 @@ import java.util.Random; import java.util.stream.Collectors; -import net.minecraft.world.item.Item.Properties; - public class PackagedToolItem extends Item { public PackagedToolItem(Properties properties) { super(properties); @@ -85,14 +83,11 @@ public ItemStack genRandomTool(ItemStack stack, Level worldIn){ case "BLUNDERBUSS": ret = new ItemStack(RankineItems.ALLOY_BLUNDERBUSS.get()); break; - case "SURF_ROD": - ret = new ItemStack(RankineItems.ALLOY_SURF_ROD.get()); - break; } } else { Random random = worldIn.getRandom(); - switch(random.nextInt(11)) + switch(random.nextInt(10)) { case 0: ret = new ItemStack(RankineItems.ALLOY_AXE.get()); @@ -125,9 +120,6 @@ public ItemStack genRandomTool(ItemStack stack, Level worldIn){ case 9: ret = new ItemStack(RankineItems.ALLOY_BLUNDERBUSS.get()); break; - case 10: - ret = new ItemStack(RankineItems.ALLOY_SURF_ROD.get()); - break; } } diff --git a/src/main/java/com/cannolicatfish/rankine/items/RTGItem.java b/src/main/java/com/cannolicatfish/rankine/items/RTGItem.java new file mode 100644 index 0000000000..762b78d8ad --- /dev/null +++ b/src/main/java/com/cannolicatfish/rankine/items/RTGItem.java @@ -0,0 +1,7 @@ +package com.cannolicatfish.rankine.items; + +public class RTGItem extends BatteryItem { + public RTGItem(Properties properties) { + super(properties); + } +} diff --git a/src/main/java/com/cannolicatfish/rankine/items/alloys/IAlloyTool.java b/src/main/java/com/cannolicatfish/rankine/items/alloys/IAlloyTool.java index 17ffbd60f2..5922a47d5e 100644 --- a/src/main/java/com/cannolicatfish/rankine/items/alloys/IAlloyTool.java +++ b/src/main/java/com/cannolicatfish/rankine/items/alloys/IAlloyTool.java @@ -72,7 +72,7 @@ default void addAlloyInformation(ItemStack stack, @Nullable Level worldIn, List< if (!this.needsRefresh(stack)) { tooltip.add((new TextComponent("Durability: " + (getAlloyDurability(stack) - stack.getDamageValue()) + "/" + getAlloyDurability(stack))).withStyle(ChatFormatting.DARK_GREEN)); - tooltip.add((new TextComponent("Tier: " + (getAlloyHarvestLevel(stack)))).withStyle(ChatFormatting.GRAY)); + tooltip.add((new TextComponent("Tier: " + (getAlloyHarvestLevel(stack) + " (" + getAlloyTier(stack).toString() + ")"))).withStyle(ChatFormatting.GRAY)); tooltip.add((new TextComponent("Mining Speed: " + df.format(getAlloyMiningSpeed(stack)))).withStyle(ChatFormatting.GRAY)); tooltip.add((new TextComponent("Enchantability: " + getAlloyEnchantability(stack))).withStyle(ChatFormatting.GRAY)); if (Config.ALLOYS.ALLOY_CORROSION.get()) { diff --git a/src/main/java/com/cannolicatfish/rankine/items/tools/GasDetectorItem.java b/src/main/java/com/cannolicatfish/rankine/items/tools/GasDetectorItem.java index 6c3d35030a..eb02d50bca 100644 --- a/src/main/java/com/cannolicatfish/rankine/items/tools/GasDetectorItem.java +++ b/src/main/java/com/cannolicatfish/rankine/items/tools/GasDetectorItem.java @@ -1,11 +1,43 @@ package com.cannolicatfish.rankine.items.tools; +import com.cannolicatfish.rankine.blocks.gases.GasBlock; +import com.cannolicatfish.rankine.init.Config; +import net.minecraft.core.BlockPos; +import net.minecraft.network.chat.TranslatableComponent; +import net.minecraft.sounds.SoundEvents; +import net.minecraft.sounds.SoundSource; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.Item; +import net.minecraft.world.item.context.UseOnContext; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.item.Item.Properties; +import java.util.Optional; public class GasDetectorItem extends Item { public GasDetectorItem(Properties properties) { super(properties); } + + public InteractionResult useOn(UseOnContext context) { + Player player = context.getPlayer(); + Level worldIn = context.getLevel(); + BlockPos pos = context.getClickedPos(); + + Optional b = BlockPos.findClosestMatch(pos, Config.TOOLS.ORE_DETECTOR_RANGE.get(), Config.TOOLS.ORE_DETECTOR_RANGE.get(), (p) -> worldIn.getBlockState(p).getBlock() instanceof GasBlock); + if (player != null && b.isPresent()) { + worldIn.playSound(player,pos, SoundEvents.NOTE_BLOCK_BELL, SoundSource.PLAYERS,1.0F, worldIn.getRandom().nextFloat() * 0.4F + 0.8F); + + if (!worldIn.isClientSide()) { + BlockState GAS = worldIn.getBlockState(b.get()); + + player.displayClientMessage(new TranslatableComponent("item.rankine.gas_detector.message", new TranslatableComponent(GAS.getBlock().getDescriptionId()).getString(), b.get().getX(), b.get().getY(), b.get().getZ()), false); + context.getItemInHand().hurtAndBreak(1, player, (p) -> { + p.broadcastBreakEvent(context.getHand()); + }); + } + } + return InteractionResult.SUCCESS; + } } diff --git a/src/main/java/com/cannolicatfish/rankine/items/totems/PoweringTotemItem.java b/src/main/java/com/cannolicatfish/rankine/items/totems/PoweringTotemItem.java new file mode 100644 index 0000000000..7de0f0c814 --- /dev/null +++ b/src/main/java/com/cannolicatfish/rankine/items/totems/PoweringTotemItem.java @@ -0,0 +1,80 @@ +package com.cannolicatfish.rankine.items.totems; + +import com.cannolicatfish.rankine.ProjectRankine; +import com.cannolicatfish.rankine.init.Config; +import com.cannolicatfish.rankine.items.BatteryItem; +import net.minecraft.ChatFormatting; +import net.minecraft.core.NonNullList; +import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.TranslatableComponent; +import net.minecraft.world.effect.MobEffectInstance; +import net.minecraft.world.effect.MobEffects; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.CreativeModeTab; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.TooltipFlag; +import net.minecraft.world.item.enchantment.Enchantments; +import net.minecraft.world.level.Level; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; + +import javax.annotation.Nullable; +import java.util.List; + +public class PoweringTotemItem extends Item { + public PoweringTotemItem(Properties properties) { + super(properties); + } + + @OnlyIn(Dist.CLIENT) + public void appendHoverText(ItemStack stack, @Nullable Level worldIn, List tooltip, TooltipFlag flagIn) { + super.appendHoverText(stack, worldIn, tooltip, flagIn); + tooltip.add(new TranslatableComponent("item.rankine.totem_of_powering.tooltip").withStyle(ChatFormatting.GRAY, ChatFormatting.ITALIC)); + } + + @Override + public void onCraftedBy(ItemStack stack, Level worldIn, Player playerIn) { + if (Config.GENERAL.PENDANT_CURSE.get()) { + stack.enchant(Enchantments.VANISHING_CURSE,1); + } + super.onCraftedBy(stack, worldIn, playerIn); + } + + @Override + public void fillItemCategory(CreativeModeTab group, NonNullList items) { + if ((group == CreativeModeTab.TAB_SEARCH || group == ProjectRankine.setup.rankineTools) && Config.GENERAL.PENDANT_CURSE.get()) { + ItemStack stack = new ItemStack(this); + stack.enchant(Enchantments.VANISHING_CURSE,1); + items.add(stack); + } else { + super.fillItemCategory(group, items); + } + } + + @Override + public boolean isFoil(ItemStack stack) { + return false; + } + + @Override + public void inventoryTick(ItemStack stack, Level worldIn, Entity entityIn, int itemSlot, boolean isSelected) { + if (entityIn instanceof Player living) { + if (living.hasEffect(MobEffects.CONDUIT_POWER) && (living.getMainHandItem().equals(stack) || living.getOffhandItem().equals(stack))) { + if (!living.hasEffect(MobEffects.DOLPHINS_GRACE)) { + living.addEffect(new MobEffectInstance(MobEffects.DOLPHINS_GRACE,900)); + } + if (worldIn.getDayTime() % 400 == 0) { + for (ItemStack s : living.getInventory().items) { + if (s.getItem() instanceof BatteryItem && s.getDamageValue() > 0) { + s.setDamageValue(s.getDamageValue() - 1); + } + } + } + + } + } + super.inventoryTick(stack, worldIn, entityIn, itemSlot, isSelected); + } +} diff --git a/src/main/java/com/cannolicatfish/rankine/recipe/CrushingRecipe.java b/src/main/java/com/cannolicatfish/rankine/recipe/CrushingRecipe.java index 5791506cd2..4c0fd2b2b9 100644 --- a/src/main/java/com/cannolicatfish/rankine/recipe/CrushingRecipe.java +++ b/src/main/java/com/cannolicatfish/rankine/recipe/CrushingRecipe.java @@ -91,6 +91,10 @@ public Float getChance(int index) { return (in/getWeights().stream().reduce(0f, Float::sum)); } + public Float getChance(Tier tierIn, int index) { + float in = getWeightsByTier(tierIn).get(index); + return (in/getWeightsByTier(tierIn).stream().reduce(0f, Float::sum)); + } public ItemStack[] getIngredientAsStackList() { return this.recipeItems.get(0).getItems().clone(); @@ -161,6 +165,18 @@ public WeightedRemovableCollection getPossibleResults(Tier harvestLev return outputs; } + public List getWeightsByTier(Tier harvestLevel) { + List retWeights = new ArrayList<>(); + for (int i = 0; i < this.getRecipeOutputs().size(); i++) { + if (!TierSortingRegistry.getTiersLowerThan(this.tiers.get(i)).contains(harvestLevel)) { + retWeights.add(this.weights.get(i)); + } else { + retWeights.add(0f); + } + } + return retWeights; + } + @Override public boolean canCraftInDimensions(int width, int height) { return true; diff --git a/src/main/java/com/cannolicatfish/rankine/recipe/FusionFurnaceRecipe.java b/src/main/java/com/cannolicatfish/rankine/recipe/FusionFurnaceRecipe.java index 9f5ddbbe02..9ac8e2a187 100644 --- a/src/main/java/com/cannolicatfish/rankine/recipe/FusionFurnaceRecipe.java +++ b/src/main/java/com/cannolicatfish/rankine/recipe/FusionFurnaceRecipe.java @@ -3,31 +3,26 @@ import com.cannolicatfish.rankine.init.RankineItems; import com.cannolicatfish.rankine.init.RankineRecipeTypes; import com.cannolicatfish.rankine.recipe.helper.AlloyIngredientHelper; -import com.cannolicatfish.rankine.recipe.helper.BlockRecipeHelper; import com.cannolicatfish.rankine.recipe.helper.FluidHelper; -import com.google.gson.JsonArray; import com.google.gson.JsonObject; import com.google.gson.JsonParseException; import com.google.gson.JsonSyntaxException; +import net.minecraft.core.NonNullList; +import net.minecraft.core.Registry; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.util.GsonHelper; import net.minecraft.world.Container; import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.crafting.Ingredient; import net.minecraft.world.item.crafting.Recipe; import net.minecraft.world.item.crafting.RecipeSerializer; import net.minecraft.world.item.crafting.RecipeType; -import net.minecraft.world.item.crafting.Ingredient; -import net.minecraft.network.FriendlyByteBuf; -import net.minecraft.util.GsonHelper; -import net.minecraft.core.NonNullList; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.core.Registry; import net.minecraft.world.level.Level; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.capability.templates.FluidTank; -import net.minecraftforge.registries.ForgeRegistryEntry; -import javax.annotation.Nullable; -import java.util.ArrayList; import java.util.Arrays; import java.util.List; @@ -77,8 +72,8 @@ public boolean matches(Container inv, Level worldIn) { public boolean matchesRecipe(Container inv, FluidTank tankIn, FluidTank tankOut, Level worldIn) { boolean fluidInCheck = this.fluidIn.isEmpty() || tankIn.getFluid().containsFluid(this.fluidIn); boolean fluidOutCheck = this.fluidIn.isEmpty() || tankOut.isFluidValid(this.fluidOut); - return (this.ingredient1.test(inv.getItem(0)) || this.ingredient1.test(inv.getItem(1))) - && (this.ingredient2.test(inv.getItem(1)) || this.ingredient2.test(inv.getItem(0))) + return ((this.ingredient2.test(inv.getItem(0)) && this.ingredient1.test(inv.getItem(1))) + || (this.ingredient1.test(inv.getItem(0)) && this.ingredient2.test(inv.getItem(1)))) && (this.gasIn.isEmpty() || inv.getItem(3).sameItem(this.gasIn)) && fluidInCheck && fluidOutCheck; } @@ -143,6 +138,14 @@ public FluidStack getFluidOut() { return fluidOut; } + public ItemStack getResult1() { + return result1; + } + + public ItemStack getResult2() { + return result2; + } + @Override public ResourceLocation getId() { return this.id; diff --git a/src/main/java/com/cannolicatfish/rankine/recipe/MixingRecipe.java b/src/main/java/com/cannolicatfish/rankine/recipe/MixingRecipe.java index 2838390e99..c71a153ce0 100644 --- a/src/main/java/com/cannolicatfish/rankine/recipe/MixingRecipe.java +++ b/src/main/java/com/cannolicatfish/rankine/recipe/MixingRecipe.java @@ -107,6 +107,10 @@ public int getOutputMixTime(Container inv) { return Math.round(mixTime * (sum*getMatScale())); } + public int getOutputMixTime(int count) { + return Math.round(mixTime * (count*getMatScale())); + } + public FluidStack getOutputFluidReq(Container inv) { int sum = 0; for (int i = 0; i < inv.getContainerSize(); i++) { @@ -117,6 +121,11 @@ public FluidStack getOutputFluidReq(Container inv) { return new FluidStack(fluid.getFluid(),count); } + public FluidStack getOutputFluidReq(int sum) { + int count = Math.round(fluid.getAmount()*(sum)); + return new FluidStack(fluid.getFluid(),count); + } + public int getIngredientTotal() { return ingredientTotal; } diff --git a/src/main/resources/assets/rankine/textures/block/battery_charger_front.png b/src/main/resources/assets/rankine/textures/block/battery_charger_front.png new file mode 100644 index 0000000000..93af8ab082 Binary files /dev/null and b/src/main/resources/assets/rankine/textures/block/battery_charger_front.png differ diff --git a/src/main/resources/assets/rankine/textures/block/battery_charger_side.png b/src/main/resources/assets/rankine/textures/block/battery_charger_side.png new file mode 100644 index 0000000000..ecc965f179 Binary files /dev/null and b/src/main/resources/assets/rankine/textures/block/battery_charger_side.png differ diff --git a/src/main/resources/assets/rankine/textures/block/battery_charger_top.png b/src/main/resources/assets/rankine/textures/block/battery_charger_top.png new file mode 100644 index 0000000000..ec8c079b4c Binary files /dev/null and b/src/main/resources/assets/rankine/textures/block/battery_charger_top.png differ diff --git a/src/main/resources/assets/rankine/textures/block/neptunium_alloy_block.png b/src/main/resources/assets/rankine/textures/block/neptunium_alloy_block.png new file mode 100644 index 0000000000..1cb9e31357 Binary files /dev/null and b/src/main/resources/assets/rankine/textures/block/neptunium_alloy_block.png differ diff --git a/src/main/resources/assets/rankine/textures/block/sediment_fan.png.mcmeta b/src/main/resources/assets/rankine/textures/block/sediment_fan.png.mcmeta new file mode 100644 index 0000000000..5169aabdc2 --- /dev/null +++ b/src/main/resources/assets/rankine/textures/block/sediment_fan.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation": { + "frametime": 8 + } +} \ No newline at end of file diff --git a/src/main/resources/assets/rankine/textures/block/sediment_fan_front.png b/src/main/resources/assets/rankine/textures/block/sediment_fan_front.png new file mode 100644 index 0000000000..9a5712422c Binary files /dev/null and b/src/main/resources/assets/rankine/textures/block/sediment_fan_front.png differ diff --git a/src/main/resources/assets/rankine/textures/block/sediment_fan_side.png b/src/main/resources/assets/rankine/textures/block/sediment_fan_side.png new file mode 100644 index 0000000000..332616c59c Binary files /dev/null and b/src/main/resources/assets/rankine/textures/block/sediment_fan_side.png differ diff --git a/src/main/resources/assets/rankine/textures/gui/air_distillation_jei.png b/src/main/resources/assets/rankine/textures/gui/air_distillation_jei.png index 9dc480f6d2..1d9fd1bdbf 100644 Binary files a/src/main/resources/assets/rankine/textures/gui/air_distillation_jei.png and b/src/main/resources/assets/rankine/textures/gui/air_distillation_jei.png differ diff --git a/src/main/resources/assets/rankine/textures/gui/air_distillation_slot.png b/src/main/resources/assets/rankine/textures/gui/air_distillation_slot.png new file mode 100644 index 0000000000..4e518739a4 Binary files /dev/null and b/src/main/resources/assets/rankine/textures/gui/air_distillation_slot.png differ diff --git a/src/main/resources/assets/rankine/textures/gui/battery_charger.png b/src/main/resources/assets/rankine/textures/gui/battery_charger.png new file mode 100644 index 0000000000..952ba1010c Binary files /dev/null and b/src/main/resources/assets/rankine/textures/gui/battery_charger.png differ diff --git a/src/main/resources/assets/rankine/textures/gui/battery_jei.png b/src/main/resources/assets/rankine/textures/gui/battery_jei.png new file mode 100644 index 0000000000..310f68f2a9 Binary files /dev/null and b/src/main/resources/assets/rankine/textures/gui/battery_jei.png differ diff --git a/src/main/resources/assets/rankine/textures/gui/cauldron_drying_icon.png b/src/main/resources/assets/rankine/textures/gui/cauldron_drying_icon.png new file mode 100644 index 0000000000..a485a794bc Binary files /dev/null and b/src/main/resources/assets/rankine/textures/gui/cauldron_drying_icon.png differ diff --git a/src/main/resources/assets/rankine/textures/gui/cauldron_drying_jei.png b/src/main/resources/assets/rankine/textures/gui/cauldron_drying_jei.png index 32b904c9f9..36bccf2a95 100644 Binary files a/src/main/resources/assets/rankine/textures/gui/cauldron_drying_jei.png and b/src/main/resources/assets/rankine/textures/gui/cauldron_drying_jei.png differ diff --git a/src/main/resources/assets/rankine/textures/gui/charge_icon.png b/src/main/resources/assets/rankine/textures/gui/charge_icon.png new file mode 100644 index 0000000000..f5103fcb99 Binary files /dev/null and b/src/main/resources/assets/rankine/textures/gui/charge_icon.png differ diff --git a/src/main/resources/assets/rankine/textures/gui/crucible_jei.png b/src/main/resources/assets/rankine/textures/gui/crucible_jei.png index 6c2ccdd043..e23d27e11a 100644 Binary files a/src/main/resources/assets/rankine/textures/gui/crucible_jei.png and b/src/main/resources/assets/rankine/textures/gui/crucible_jei.png differ diff --git a/src/main/resources/assets/rankine/textures/gui/crushing_jei.png b/src/main/resources/assets/rankine/textures/gui/crushing_jei.png index 72a6a0afc5..d867e0166d 100644 Binary files a/src/main/resources/assets/rankine/textures/gui/crushing_jei.png and b/src/main/resources/assets/rankine/textures/gui/crushing_jei.png differ diff --git a/src/main/resources/assets/rankine/textures/gui/element_jei.png b/src/main/resources/assets/rankine/textures/gui/element_jei.png index df18b5ec13..f0ebb076fc 100644 Binary files a/src/main/resources/assets/rankine/textures/gui/element_jei.png and b/src/main/resources/assets/rankine/textures/gui/element_jei.png differ diff --git a/src/main/resources/assets/rankine/textures/gui/evaporation_jei.png b/src/main/resources/assets/rankine/textures/gui/evaporation_jei.png index 0759b28a1b..116c494c57 100644 Binary files a/src/main/resources/assets/rankine/textures/gui/evaporation_jei.png and b/src/main/resources/assets/rankine/textures/gui/evaporation_jei.png differ diff --git a/src/main/resources/assets/rankine/textures/gui/extrusive_igneous_jei.png b/src/main/resources/assets/rankine/textures/gui/extrusive_igneous_jei.png index a0d164bde3..6f3730db70 100644 Binary files a/src/main/resources/assets/rankine/textures/gui/extrusive_igneous_jei.png and b/src/main/resources/assets/rankine/textures/gui/extrusive_igneous_jei.png differ diff --git a/src/main/resources/assets/rankine/textures/gui/foraging_jei.png b/src/main/resources/assets/rankine/textures/gui/foraging_jei.png index 1851ce9502..631c503a44 100644 Binary files a/src/main/resources/assets/rankine/textures/gui/foraging_jei.png and b/src/main/resources/assets/rankine/textures/gui/foraging_jei.png differ diff --git a/src/main/resources/assets/rankine/textures/gui/fusion_furnace_jei.png b/src/main/resources/assets/rankine/textures/gui/fusion_furnace_jei.png index 0f6becee5a..64a098438f 100644 Binary files a/src/main/resources/assets/rankine/textures/gui/fusion_furnace_jei.png and b/src/main/resources/assets/rankine/textures/gui/fusion_furnace_jei.png differ diff --git a/src/main/resources/assets/rankine/textures/gui/intrusive_igneous_jei.png b/src/main/resources/assets/rankine/textures/gui/intrusive_igneous_jei.png index 646e86ad5a..8618f0d57d 100644 Binary files a/src/main/resources/assets/rankine/textures/gui/intrusive_igneous_jei.png and b/src/main/resources/assets/rankine/textures/gui/intrusive_igneous_jei.png differ diff --git a/src/main/resources/assets/rankine/textures/gui/metamorphic_jei.png b/src/main/resources/assets/rankine/textures/gui/metamorphic_jei.png index 93e5f2f029..a6b6966113 100644 Binary files a/src/main/resources/assets/rankine/textures/gui/metamorphic_jei.png and b/src/main/resources/assets/rankine/textures/gui/metamorphic_jei.png differ diff --git a/src/main/resources/assets/rankine/textures/gui/mixing_jei.png b/src/main/resources/assets/rankine/textures/gui/mixing_jei.png index 5ca15864c2..7476632c61 100644 Binary files a/src/main/resources/assets/rankine/textures/gui/mixing_jei.png and b/src/main/resources/assets/rankine/textures/gui/mixing_jei.png differ diff --git a/src/main/resources/assets/rankine/textures/gui/sedimentary_jei.png b/src/main/resources/assets/rankine/textures/gui/sedimentary_jei.png index c420ca0619..f418102cbb 100644 Binary files a/src/main/resources/assets/rankine/textures/gui/sedimentary_jei.png and b/src/main/resources/assets/rankine/textures/gui/sedimentary_jei.png differ diff --git a/src/main/resources/assets/rankine/textures/gui/sluicing_jei.png b/src/main/resources/assets/rankine/textures/gui/sluicing_jei.png index 6a42006168..d867e0166d 100644 Binary files a/src/main/resources/assets/rankine/textures/gui/sluicing_jei.png and b/src/main/resources/assets/rankine/textures/gui/sluicing_jei.png differ diff --git a/src/main/resources/assets/rankine/textures/gui/stripping_jei.png b/src/main/resources/assets/rankine/textures/gui/stripping_jei.png index a7ac218e22..5283f239f6 100644 Binary files a/src/main/resources/assets/rankine/textures/gui/stripping_jei.png and b/src/main/resources/assets/rankine/textures/gui/stripping_jei.png differ diff --git a/src/main/resources/assets/rankine/textures/gui/treetapping_jei.png b/src/main/resources/assets/rankine/textures/gui/treetapping_jei.png index df2a2ebc01..ce3681fd16 100644 Binary files a/src/main/resources/assets/rankine/textures/gui/treetapping_jei.png and b/src/main/resources/assets/rankine/textures/gui/treetapping_jei.png differ diff --git a/src/main/resources/assets/rankine/textures/gui/volcanic_jei.png b/src/main/resources/assets/rankine/textures/gui/volcanic_jei.png index 7e6acdc74a..a6b6966113 100644 Binary files a/src/main/resources/assets/rankine/textures/gui/volcanic_jei.png and b/src/main/resources/assets/rankine/textures/gui/volcanic_jei.png differ diff --git a/src/main/resources/assets/rankine/textures/item/gas_detector.png b/src/main/resources/assets/rankine/textures/item/gas_detector.png new file mode 100644 index 0000000000..c4baa15585 Binary files /dev/null and b/src/main/resources/assets/rankine/textures/item/gas_detector.png differ diff --git a/src/main/resources/assets/rankine/textures/item/neptunium_alloy_ingot.png b/src/main/resources/assets/rankine/textures/item/neptunium_alloy_ingot.png new file mode 100644 index 0000000000..deeff569d5 Binary files /dev/null and b/src/main/resources/assets/rankine/textures/item/neptunium_alloy_ingot.png differ diff --git a/src/main/resources/assets/rankine/textures/item/neptunium_alloy_nugget.png b/src/main/resources/assets/rankine/textures/item/neptunium_alloy_nugget.png new file mode 100644 index 0000000000..eab626c015 Binary files /dev/null and b/src/main/resources/assets/rankine/textures/item/neptunium_alloy_nugget.png differ diff --git a/src/main/resources/assets/rankine/textures/item/totem_of_powering.png b/src/main/resources/assets/rankine/textures/item/totem_of_powering.png new file mode 100644 index 0000000000..fdff9b2463 Binary files /dev/null and b/src/main/resources/assets/rankine/textures/item/totem_of_powering.png differ diff --git a/src/main/resources/data/rankine/recipes/alloying/neptunium_alloy_alloying.json.json b/src/main/resources/data/rankine/recipes/alloying/neptunium_alloy_alloying.json.json new file mode 100644 index 0000000000..0e64b377ae --- /dev/null +++ b/src/main/resources/data/rankine/recipes/alloying/neptunium_alloy_alloying.json.json @@ -0,0 +1,57 @@ +{ + "type": "rankine:alloying", + "total": 10, + "color": 5805717, + "input1": { + "element": "rankine:elements/neptunium", + "min": 0.10, + "max": 0.25, + "required": true + }, + "input2": { + "element": "rankine:elements/aluminum", + "min": 0.25, + "max": 0.75 + }, + "input3": { + "element": "rankine:elements/palladium", + "min": 0.25, + "max": 0.75 + }, + "input4": { + "element": "rankine:elements/tin", + "min": 0.25, + "max": 0.75 + }, + "input5": { + "element": "rankine:elements/uranium", + "min": 0.25, + "max": 0.75 + }, + "input6": { + "element": "rankine:elements/americium", + "min": 0.25, + "max": 0.75 + }, + "input7": { + "element": "rankine:elements/plutonium", + "min": 0.25, + "max": 0.75 + }, + "input8": { + "element": "rankine:elements/zirconium", + "min": 0.25, + "max": 0.75 + }, + "input9": { + "element": "rankine:elements/iron", + "min": 0.25, + "max": 0.75 + }, + "input10": { + "element": "rankine:elements/germanium", + "min": 0.25, + "max": 0.75 + }, + "result": "rankine:neptunium_alloy_ingot" +} \ No newline at end of file diff --git a/src/main/resources/data/rankine/recipes/crushing/uraninite_ore_crushing.json b/src/main/resources/data/rankine/recipes/crushing/uraninite_ore_crushing.json index d47d858242..d4912c1a41 100644 --- a/src/main/resources/data/rankine/recipes/crushing/uraninite_ore_crushing.json +++ b/src/main/resources/data/rankine/recipes/crushing/uraninite_ore_crushing.json @@ -55,6 +55,12 @@ "weight": 6, "tier": "minecraft:diamond" }, + { + "item": "rankine:plutonium_nugget", + "count": 3, + "weight": 0.5, + "tier": "minecraft:diamond" + }, { "item": "rankine:technetium_nugget", "count": 3, diff --git a/src/main/resources/data/rankine/recipes/gas_detector.json b/src/main/resources/data/rankine/recipes/gas_detector.json new file mode 100644 index 0000000000..dfab011275 --- /dev/null +++ b/src/main/resources/data/rankine/recipes/gas_detector.json @@ -0,0 +1,33 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": + [ + "vsv", + "scs", + "vbv" + ], + "key": + { + "b": + { + "item": "rankine:lead_acid_battery" + }, + "c": + { + "item": "rankine:indium_tin_oxide" + }, + "v": + { + "item": "rankine:vulcanized_rubber" + }, + "s": + { + "item": "rankine:stainless_steel_ingot" + } + }, + "result": + { + "item": "rankine:gas_detector", + "count": 1 + } +} \ No newline at end of file