Skip to content

Commit

Permalink
revert #1206 because it made diamond ore not smeltable (#1235)
Browse files Browse the repository at this point in the history
* revert #1206 because it made diamond ore not smeltable

* add a NO_ORE_SMELTING for no ore smelting

* amend changelog

* add missing recipe config things for bamboo, slabs, netherite block compression

* fix rotor material not serializing addon materials correctly

* fix slab tags

* oops

* chore: cherrypick
  • Loading branch information
screret authored May 11, 2024
1 parent 157b666 commit c8ab407
Show file tree
Hide file tree
Showing 9 changed files with 101 additions and 40 deletions.
30 changes: 7 additions & 23 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,15 @@
# ChangeLog

Version: 1.2.2
Version: 1.2.2.a

### ADDITIONS:
- Ported Powder Barrels, Industrial TNT and Dynamite from 1.12
- Ported Armor from 1.12
- added NO_ORE_SMELTING material flag for stopping ore/raw ore -> dust/ingot/gem smelting

### CHANGES:
- Updated Russian translation
- Moved coils, filters, PSS battery maps out of GTBlocks, to make it easier for addons to add to them

### FIXES:
- Made natural decor blocks obtainable
- Fixed compression recipes being generated for ignored materials
- Fixed fluid locking
- Fixed items being voided when Multiblock auto-building fails
- Fixed missing drops for Laser Pipes and Optical Pipes
- Fixed missing harder chest recipes
- Fixed setting the dimension for Bedrock Ore Veins and Fluid Veins in KJS
- Fixed energy transfer display in the Portable Scanner
- Fixed parallel issues, multi smelter not overclocking
- Fixed Overclocking display for ULV in recipe viewers
- Fixed parallel processing for steam machines
- Fixed machine controllers not working for indirectly powered blocks
- Fixed raw ores being smeltable into ingots even with the NO_SMELTING flag
- Fixed language entries for treated/rubber wood signs
- Fixed sign rendering
- Fixed wire throughput counting
- Fixed chainsaw durability usage
- Fixed recipe conflict between mud and fertilizer recipes
- Fixed raw diamonds not being smeltable into diamonds, raw coal not being smeltable into coal
- fixed rubber & treated wood slab tags
- fixed addon turbine rotors using the wrong material
- fixed hardWoodRecipes not applying to bamboo
- fixed transformers not having enough input storage
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ org.gradle.jvmargs = -Xmx6G
# Mod Info
mod_id = gtceu
mod_name = GregTech
mod_version = 1.2.2
mod_version = 1.2.2.a
mod_description = GregTech CE Unofficial, ported from 1.12.2
mod_license = LGPL-3.0 license
mod_url = https://github.com/GregTechCEu/GregTech-Modern/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,13 @@ public String toString() {
.requireProps(PropertyKey.DUST)
.build();

/**
* Add to material if it's impossible to smelt it from an ore.
*/
public static final MaterialFlag NO_ORE_SMELTING = new MaterialFlag.Builder("no_ore_smelting")
.requireProps(PropertyKey.DUST)
.build();

/**
* Add this to your Material if you want to have its Ore Calcite heated in a Blast Furnace for more output. Already listed are:
* Iron, Pyrite, PigIron, WroughtIron.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ default void setPartMaterial(ItemStack itemStack, @NotNull Material material) {
if (!material.hasProperty(PropertyKey.INGOT))
throw new IllegalArgumentException("Part material must have an Ingot!");
var compound = getOrCreatePartStatsTag(itemStack);
compound.putString("Material", material.getName());
compound.putString("Material", material.getResourceLocation().toString());
}

default int getPartDamage(ItemStack itemStack) {
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/com/gregtechceu/gtceu/common/data/GTBlocks.java
Original file line number Diff line number Diff line change
Expand Up @@ -1031,9 +1031,9 @@ public static ItemColor leavesItemColor() {
.initialProperties(() -> Blocks.SPRUCE_SLAB)
.lang("Rubber Slab")
.blockstate((ctx, prov) -> prov.slabBlock(ctx.getEntry(), prov.blockTexture(GTBlocks.RUBBER_PLANK.get()), prov.blockTexture(GTBlocks.RUBBER_PLANK.get())))
.tag(BlockTags.SLABS)
.tag(BlockTags.WOODEN_SLABS)
.item()
.tag(ItemTags.SLABS)
.tag(ItemTags.WOODEN_SLABS)
.onRegister(compassNode(GTCompassSections.GENERATIONS))
.build()
.register();
Expand Down Expand Up @@ -1187,9 +1187,9 @@ public static ItemColor leavesItemColor() {
.initialProperties(() -> Blocks.SPRUCE_SLAB)
.lang("Treated Wood Slab")
.blockstate((ctx, prov) -> prov.slabBlock(ctx.getEntry(), prov.blockTexture(GTBlocks.TREATED_WOOD_PLANK.get()), prov.blockTexture(GTBlocks.TREATED_WOOD_PLANK.get())))
.tag(BlockTags.SLABS)
.tag(BlockTags.WOODEN_SLABS)
.item()
.tag(ItemTags.SLABS)
.tag(ItemTags.WOODEN_SLABS)
.onRegister(compassNode(GTCompassSections.GENERATIONS))
.build()
.register();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1031,16 +1031,42 @@ private static void flintAndSteelRequireSteel(Consumer<FinishedRecipe> provider)
}

private static void removeVanillaBlockRecipes(Consumer<FinishedRecipe> provider) {
VanillaRecipeHelper.addShapedRecipe(provider, "stone_slab_saw", new ItemStack(Blocks.STONE_SLAB), "sS", 'S', new ItemStack(Blocks.STONE));
VanillaRecipeHelper.addShapedRecipe(provider, "smooth_stone_slab_saw", new ItemStack(Blocks.SMOOTH_STONE_SLAB), "sS", 'S', new ItemStack(Blocks.SMOOTH_STONE));
VanillaRecipeHelper.addShapedRecipe(provider, "andesite_slab_saw", new ItemStack(Blocks.ANDESITE_SLAB), "sS", 'S', new ItemStack(Blocks.ANDESITE));
VanillaRecipeHelper.addShapedRecipe(provider, "granite_slab_saw", new ItemStack(Blocks.GRANITE_SLAB), "sS", 'S', new ItemStack(Blocks.GRANITE));
VanillaRecipeHelper.addShapedRecipe(provider, "diorite_slab_saw", new ItemStack(Blocks.DIORITE_SLAB), "sS", 'S', new ItemStack(Blocks.DIORITE));
VanillaRecipeHelper.addShapedRecipe(provider, "polished_andesite_slab_saw", new ItemStack(Blocks.POLISHED_ANDESITE_SLAB), "sS", 'S', new ItemStack(Blocks.POLISHED_ANDESITE));
VanillaRecipeHelper.addShapedRecipe(provider, "polished_granite_slab_saw", new ItemStack(Blocks.POLISHED_GRANITE_SLAB), "sS", 'S', new ItemStack(Blocks.POLISHED_GRANITE));
VanillaRecipeHelper.addShapedRecipe(provider, "polished_diorite_slab_saw", new ItemStack(Blocks.POLISHED_DIORITE_SLAB), "sS", 'S', new ItemStack(Blocks.POLISHED_DIORITE));
VanillaRecipeHelper.addShapedRecipe(provider, "sandstone_slab_saw", new ItemStack(Blocks.SANDSTONE_SLAB), "sS", 'S', new ItemStack(Blocks.SANDSTONE));
VanillaRecipeHelper.addShapedRecipe(provider, "smooth_sandstone_slab_saw", new ItemStack(Blocks.SMOOTH_SANDSTONE_SLAB), "sS", 'S', new ItemStack(Blocks.SMOOTH_SANDSTONE));
VanillaRecipeHelper.addShapedRecipe(provider, "red_sandstone_slab_saw", new ItemStack(Blocks.RED_SANDSTONE_SLAB), "sS", 'S', new ItemStack(Blocks.RED_SANDSTONE));
VanillaRecipeHelper.addShapedRecipe(provider, "smooth_red_sandstone_slab_saw", new ItemStack(Blocks.SMOOTH_RED_SANDSTONE_SLAB), "sS", 'S', new ItemStack(Blocks.SMOOTH_RED_SANDSTONE));
VanillaRecipeHelper.addShapedRecipe(provider, "cobblestone_slab_saw", new ItemStack(Blocks.COBBLESTONE_SLAB), "sS", 'S', new ItemStack(Blocks.COBBLESTONE));
VanillaRecipeHelper.addShapedRecipe(provider, "blackstone_slab_saw", new ItemStack(Blocks.BLACKSTONE_SLAB), "sS", 'S', new ItemStack(Blocks.BLACKSTONE));
VanillaRecipeHelper.addShapedRecipe(provider, "polished_blackstone_slab_saw", new ItemStack(Blocks.POLISHED_BLACKSTONE_SLAB), "sS", 'S', new ItemStack(Blocks.POLISHED_BLACKSTONE));
VanillaRecipeHelper.addShapedRecipe(provider, "polished_blackstone_brick_slab_saw", new ItemStack(Blocks.POLISHED_BLACKSTONE_BRICK_SLAB), "sS", 'S', new ItemStack(Blocks.POLISHED_BLACKSTONE_BRICKS));
VanillaRecipeHelper.addShapedRecipe(provider, "brick_slab_saw", new ItemStack(Blocks.BRICK_SLAB), "sS", 'S', new ItemStack(Blocks.BRICKS));
VanillaRecipeHelper.addShapedRecipe(provider, "mud_brick_slab_saw", new ItemStack(Blocks.MUD_BRICK_SLAB), "sS", 'S', new ItemStack(Blocks.MUD_BRICKS));
VanillaRecipeHelper.addShapedRecipe(provider, "stone_brick_slab_saw", new ItemStack(Blocks.STONE_BRICK_SLAB), "sS", 'S', ItemTags.STONE_BRICKS);
VanillaRecipeHelper.addShapedRecipe(provider, "nether_brick_slab_saw", new ItemStack(Blocks.NETHER_BRICK_SLAB), "sS", 'S', new ItemStack(Blocks.NETHER_BRICKS));
VanillaRecipeHelper.addShapedRecipe(provider, "red_nether_brick_slab_saw", new ItemStack(Blocks.RED_NETHER_BRICK_SLAB), "sS", 'S', new ItemStack(Blocks.RED_NETHER_BRICKS));
VanillaRecipeHelper.addShapedRecipe(provider, "quartz_slab_saw", new ItemStack(Blocks.QUARTZ_SLAB), "sS", 'S', new ItemStack(Blocks.QUARTZ_BLOCK));
VanillaRecipeHelper.addShapedRecipe(provider, "smooth_quartz_slab_saw", new ItemStack(Blocks.SMOOTH_QUARTZ_SLAB), "sS", 'S', new ItemStack(Blocks.SMOOTH_QUARTZ));
VanillaRecipeHelper.addShapedRecipe(provider, "red_sandstone_slab_saw", new ItemStack(Blocks.RED_SANDSTONE_SLAB), "sS", 'S', new ItemStack(Blocks.RED_SANDSTONE));
VanillaRecipeHelper.addShapedRecipe(provider, "cut_copper_slab_saw", new ItemStack(Blocks.CUT_COPPER_SLAB), "sS", 'S', new ItemStack(Blocks.CUT_COPPER));
VanillaRecipeHelper.addShapedRecipe(provider, "exposed_cut_copper_slab_saw", new ItemStack(Blocks.EXPOSED_CUT_COPPER_SLAB), "sS", 'S', new ItemStack(Blocks.EXPOSED_CUT_COPPER));
VanillaRecipeHelper.addShapedRecipe(provider, "oxidized_cut_copper_slab_saw", new ItemStack(Blocks.OXIDIZED_CUT_COPPER_SLAB), "sS", 'S', new ItemStack(Blocks.OXIDIZED_CUT_COPPER));
VanillaRecipeHelper.addShapedRecipe(provider, "weathered_cut_copper_slab_saw", new ItemStack(Blocks.WEATHERED_CUT_COPPER_SLAB), "sS", 'S', new ItemStack(Blocks.OXIDIZED_CUT_COPPER));
VanillaRecipeHelper.addShapedRecipe(provider, "waxed_cut_copper_slab_saw", new ItemStack(Blocks.WAXED_CUT_COPPER_SLAB), "sS", 'S', new ItemStack(Blocks.WAXED_CUT_COPPER));
VanillaRecipeHelper.addShapedRecipe(provider, "waxed_exposed_cut_copper_slab_saw", new ItemStack(Blocks.WAXED_EXPOSED_CUT_COPPER_SLAB), "sS", 'S', new ItemStack(Blocks.WAXED_EXPOSED_CUT_COPPER));
VanillaRecipeHelper.addShapedRecipe(provider, "waxed_oxidized_cut_copper_slab_saw", new ItemStack(Blocks.WAXED_OXIDIZED_CUT_COPPER_SLAB), "sS", 'S', new ItemStack(Blocks.WAXED_OXIDIZED_CUT_COPPER));
VanillaRecipeHelper.addShapedRecipe(provider, "waxed_weathered_cut_copper_slab_saw", new ItemStack(Blocks.WAXED_WEATHERED_CUT_COPPER_SLAB), "sS", 'S', new ItemStack(Blocks.WAXED_OXIDIZED_CUT_COPPER));
VanillaRecipeHelper.addShapedRecipe(provider, "purpur_slab_saw", new ItemStack(Blocks.PURPUR_SLAB), "sS", 'S', new ItemStack(Blocks.PURPUR_BLOCK));
VanillaRecipeHelper.addShapedRecipe(provider, "end_stone_brick_slab_saw", new ItemStack(Blocks.END_STONE_BRICK_SLAB), "sS", 'S', new ItemStack(Blocks.END_STONE_BRICKS));
VanillaRecipeHelper.addShapedRecipe(provider, "prismarine_slab_saw", new ItemStack(Blocks.PRISMARINE_SLAB), "sS", 'S', new ItemStack(Blocks.PRISMARINE));
VanillaRecipeHelper.addShapedRecipe(provider, "prismarine_brick_slab_saw", new ItemStack(Blocks.PRISMARINE_BRICK_SLAB), "sS", 'S', new ItemStack(Blocks.PRISMARINE_BRICKS));
VanillaRecipeHelper.addShapedRecipe(provider, "dark_prismarine_slab_saw", new ItemStack(Blocks.DARK_PRISMARINE_SLAB), "sS", 'S', new ItemStack(Blocks.DARK_PRISMARINE));
}

private static void createShovelRecipe(Consumer<FinishedRecipe> provider, String regName, ItemStack output, Material material) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ private static void disableManualCompression(Consumer<ResourceLocation> registry
registry.accept(new ResourceLocation("minecraft:clay"));
registry.accept(new ResourceLocation("minecraft:nether_brick"));
registry.accept(new ResourceLocation("minecraft:glowstone"));
// TODO netherite material
//registry.accept(new ResourceLocation("minecraft:netherite_block"));
//registry.accept(new ResourceLocation("minecraft:netherite_ingot_from_netherite_block"));
}

private static void harderBrickRecipes(Consumer<ResourceLocation> registry) {
Expand Down Expand Up @@ -297,14 +300,42 @@ private static void removeVanillaBlockRecipes(Consumer<ResourceLocation> registr
registry.accept(new ResourceLocation("minecraft:sea_lantern"));

// Slab replacement
registry.accept(new ResourceLocation("minecraft:stone_slab"));;
registry.accept(new ResourceLocation("minecraft:sandstone_slab"));;
registry.accept(new ResourceLocation("minecraft:cobblestone_slab"));;
registry.accept(new ResourceLocation("minecraft:brick_slab"));;
registry.accept(new ResourceLocation("minecraft:stone_brick_slab"));;
registry.accept(new ResourceLocation("minecraft:nether_brick_slab"));;
registry.accept(new ResourceLocation("minecraft:quartz_slab"));;
registry.accept(new ResourceLocation("minecraft:red_sandstone_slab"));;
registry.accept(new ResourceLocation("minecraft:purpur_slab"));;
registry.accept(new ResourceLocation("minecraft:stone_slab"));
registry.accept(new ResourceLocation("minecraft:smooth_stone_slab"));
registry.accept(new ResourceLocation("minecraft:andesite_slab"));
registry.accept(new ResourceLocation("minecraft:granite_slab"));
registry.accept(new ResourceLocation("minecraft:diorite_slab"));
registry.accept(new ResourceLocation("minecraft:polished_andesite_slab"));
registry.accept(new ResourceLocation("minecraft:polished_granite_slab"));
registry.accept(new ResourceLocation("minecraft:polished_diorite_slab"));
registry.accept(new ResourceLocation("minecraft:sandstone_slab"));
registry.accept(new ResourceLocation("minecraft:smooth_sandstone_slab"));
registry.accept(new ResourceLocation("minecraft:red_sandstone_slab"));
registry.accept(new ResourceLocation("minecraft:smooth_red_sandstone_slab"));
registry.accept(new ResourceLocation("minecraft:cobblestone_slab"));
registry.accept(new ResourceLocation("minecraft:blackstone_slab"));
registry.accept(new ResourceLocation("minecraft:polished_blackstone_slab"));
registry.accept(new ResourceLocation("minecraft:polished_blackstone_brick_slab"));
registry.accept(new ResourceLocation("minecraft:brick_slab"));
registry.accept(new ResourceLocation("minecraft:stone_brick_slab"));
registry.accept(new ResourceLocation("minecraft:mud_brick_slab"));
registry.accept(new ResourceLocation("minecraft:nether_brick_slab"));
registry.accept(new ResourceLocation("minecraft:red_nether_brick_slab"));
registry.accept(new ResourceLocation("minecraft:quartz_slab"));
registry.accept(new ResourceLocation("minecraft:smooth_quartz_slab"));
registry.accept(new ResourceLocation("minecraft:cut_copper_slab"));
registry.accept(new ResourceLocation("minecraft:exposed_cut_copper_slab"));
registry.accept(new ResourceLocation("minecraft:oxidized_cut_copper_slab"));
registry.accept(new ResourceLocation("minecraft:weathered_cut_copper_slab"));
registry.accept(new ResourceLocation("minecraft:waxed_cut_copper_slab"));
registry.accept(new ResourceLocation("minecraft:waxed_exposed_cut_copper_slab"));
registry.accept(new ResourceLocation("minecraft:waxed_oxidized_cut_copper_slab"));
registry.accept(new ResourceLocation("minecraft:waxed_weathered_cut_copper_slab"));
registry.accept(new ResourceLocation("minecraft:red_sandstone_slab"));
registry.accept(new ResourceLocation("minecraft:purpur_slab"));
registry.accept(new ResourceLocation("minecraft:end_stone_brick_slab"));
registry.accept(new ResourceLocation("minecraft:prismarine_slab"));
registry.accept(new ResourceLocation("minecraft:prismarine_brick_slab"));
registry.accept(new ResourceLocation("minecraft:dark_prismarine_slab"));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ public static void processPureDust(TagPrefix purePrefix, Material material, OreP
}

private static boolean doesMaterialUseNormalFurnace(Material material) {
return !material.hasProperty(PropertyKey.BLAST) && !material.hasFlag(MaterialFlags.NO_SMELTING);
return !material.hasProperty(PropertyKey.BLAST) && !material.hasFlag(MaterialFlags.NO_ORE_SMELTING);
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,19 @@ private static List<WoodTypeEntry> getDefaultEntries() {
.boat(Items.DARK_OAK_BOAT, "dark_oak_boat")
.registerAllUnificationInfo()
.build(),
new WoodTypeEntry.Builder(mcModId, "bamboo")
.planks(Items.BAMBOO_PLANKS, "bamboo_planks")
.log(Items.BAMBOO_BLOCK).removeCharcoalRecipe()
.strippedLog(Items.STRIPPED_BAMBOO_BLOCK)
.door(Items.BAMBOO_DOOR, "bamboo_door")
.trapdoor(Items.BAMBOO_TRAPDOOR, "bamboo_trapdoor")
.slab(Items.BAMBOO_SLAB, "bamboo_slab")
.fence(Items.BAMBOO_FENCE, "bamboo_fence")
.fenceGate(Items.BAMBOO_FENCE_GATE, "bamboo_fence_gate")
.stairs(Items.BAMBOO_STAIRS, "bamboo_stairs")
.boat(Items.BAMBOO_RAFT, "bamboo_raft")
.registerAllUnificationInfo()
.build(),
new WoodTypeEntry.Builder(mcModId, "cherry")
.planks(Items.CHERRY_PLANKS, "cherry_planks")
.log(Items.CHERRY_LOG).removeCharcoalRecipe()
Expand Down

0 comments on commit c8ab407

Please sign in to comment.