Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 44 additions & 15 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ mixin {
}

// Workaround for SpongePowered/MixinGradle#38, copied from Create source code
afterEvaluate {
tasks.configureReobfTaskForReobfJar.mustRunAfter(tasks.compileJava)
tasks.configureReobfTaskForReobfJarJar.mustRunAfter(tasks.compileJava)
}
//afterEvaluate {
// tasks.configureReobfTaskForReobfJar.mustRunAfter(tasks.compileJava)
// tasks.configureReobfTaskForReobfJarJar.mustRunAfter(tasks.compileJava)
//}

// Mod Detailss
version = "${mod_version}"
Expand Down Expand Up @@ -96,21 +96,25 @@ minecraft {
}

repositories {
mavenCentral()
maven {
url = uri("file:/C:/Users/Samuel/Documents/GitHub/petrolpark_local_maven")
}
maven { // JEI and Embeddium
name = "Jared's maven"
url = "https://maven.blamejared.com/"
}
maven { // JEI mirror
name = "ModMaven"
url = "https://modmaven.dev"
}
// maven { // JEI mirror
// name = "ModMaven"
// url = "https://modmaven.dev"
// }
maven {
name = 'createmod maven'
url = "https://maven.createmod.net"
}
maven { // Create, Flywheel and Registrate
name = 'tterag maven'
url = 'https://www.cursemaven.com'
url = 'https://maven.tterrag.com'
}

exclusiveContent {
Expand All @@ -125,10 +129,10 @@ repositories {
includeGroup "maven.modrinth"
}
}

flatDir {
dirs "../petrolpark_local_maven/petrolpark/petrolpark-${minecraft_version}/${petrolpark_library_version}"
}
//
// flatDir {
// dirs "../petrolpark_local_maven/petrolpark/petrolpark-${minecraft_version}/${petrolpark_library_version}"
// }

maven {
// Curios
Expand All @@ -153,6 +157,21 @@ repositories {
maven { // MixinSquared
url = "https://maven.bawnorton.com/releases"
}
maven {
name = "Kotlin for Forge"
url = "https://thedarkcolour.github.io/KotlinForForge/"
content {
includeModule("thedarkcolour", "kotlinforforge")
}
}

maven {
name = "Valkyrien Skies Internal"
url = "https://maven.valkyrienskies.org"
content {
excludeGroup("org.spongepowered")
}
}
}

configurations {
Expand Down Expand Up @@ -194,7 +213,7 @@ dependencies {
implementation fg.deobf("com.tterrag.registrate:Registrate:${registrate_version}")

// Petrolpark Library (temporary)
implementation "com.petrolpark:petrolpark:${minecraft_version}-${petrolpark_library_version}"
implementation fg.deobf("petrolpark:petrolpark-${minecraft_version}:${petrolpark_library_version}")

// JGraphT
//jarJar(implementation("org.jgrapht:jgrapht-core:[${jgrapht_version}]"))
Expand All @@ -207,7 +226,7 @@ dependencies {
// JEI
compileOnly fg.deobf("mezz.jei:jei-${minecraft_version}-common-api:${jei_version}")
compileOnly fg.deobf("mezz.jei:jei-${minecraft_version}-forge-api:${jei_version}")
compileOnly fg.deobf("mezz.jei:jei-${minecraft_version}-forge:${jei_version}")
runtimeOnly fg.deobf("mezz.jei:jei-${minecraft_version}-forge:${jei_version}")

// Farmer's Delight
compileOnly fg.deobf("curse.maven:farmers-delight-398521:${farmersdelight_version}")
Expand All @@ -223,6 +242,16 @@ dependencies {
// Embeddium
compileOnly fg.deobf("maven.modrinth:embeddium:${embeddium_version}+mc${minecraft_version}")

// Valkyrien Skies
compileOnly ("org.valkyrienskies.core:api:${vs_core_version}")
compileOnly ("org.valkyrienskies.core:impl:${vs_core_version}")
compileOnly ("org.valkyrienskies.core:api-game:${vs_core_version}")
compileOnly ("org.valkyrienskies.core:util:${vs_core_version}")

implementation fg.deobf("org.valkyrienskies:valkyrienskies-120-forge:${vs2_version}")


runtimeOnly "thedarkcolour:kotlinforforge:4.10.0"
// ANNOTATION PROCESSORS

// MixinSquared's annotationProcessor MUST be registered BEFORE Mixin's one.
Expand Down
8 changes: 5 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ org.gradle.jvmargs = -Xmx3G
org.gradle.daemon = false

# Destroy info
mod_version = 0.1.3
mod_version = 0.1.4
minecraft_version = 1.20.1
forge_version = 47.4.3

Expand All @@ -17,8 +17,8 @@ librarian_version = 1.+
parchment_version = 2023.09.03

# Mandatory mod dependency info
create_version = 6.0.6-150
petrolpark_library_version = 1.4.9
create_version = 6.0.7-281
petrolpark_library_version = 1.4.24
flywheel_version = 1.0.4
registrate_version = MC1.20-1.3.3
ponder_version = 1.0.80
Expand All @@ -33,3 +33,5 @@ cbc_version = 5.9.1+mc.1.20.1-forge
rpl_version = 2.1.0+mc.1.20.1-forge
curios_version = 5.12.1
embeddium_version = 0.3.30
vs2_version=2.3.0-beta.12
vs_core_version=1.1.0+b19b27c4a4
34 changes: 17 additions & 17 deletions src/main/java/com/petrolpark/destroy/DestroyBlocks.java
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ public class DestroyBlocks {
).transform(TagGen.pickaxeOnly())
.tag(BlockTags.NEEDS_IRON_TOOL)
.tag(DestroyTags.Blocks.ARC_FURNACE_TRANSFORMABLE.tag)
.transform(TagGen.tagBlockAndItem("storage_blocks/carbon_fiber"))
.transform(TagGen.tagBlockAndItem(DestroyTagGen.forgeBlockAndItem("storage_blocks/carbon_fiber")))
.tag(Tags.Items.STORAGE_BLOCKS)
.build()
.register(),
Expand All @@ -483,7 +483,7 @@ public class DestroyBlocks {
.tag(BlockTags.NEEDS_IRON_TOOL)
.tag(Tags.Blocks.STORAGE_BLOCKS)
.tag(BlockTags.BEACON_BASE_BLOCKS)
.transform(TagGen.tagBlockAndItem("storage_blocks/fluorite"))
.transform(TagGen.tagBlockAndItem(DestroyTagGen.forgeBlockAndItem("storage_blocks/fluorite")))
.tag(Tags.Items.STORAGE_BLOCKS)
.build()
.register(),
Expand All @@ -498,7 +498,7 @@ public class DestroyBlocks {
.tag(BlockTags.NEEDS_STONE_TOOL)
.tag(Tags.Blocks.STORAGE_BLOCKS)
.tag(BlockTags.BEACON_BASE_BLOCKS)
.transform(TagGen.tagBlockAndItem("storage_blocks/raw_nickel"))
.transform(TagGen.tagBlockAndItem(DestroyTagGen.forgeBlockAndItem("storage_blocks/raw_nickel")))
.tag(Tags.Items.STORAGE_BLOCKS)
.build()
.register(),
Expand All @@ -512,7 +512,7 @@ public class DestroyBlocks {
.tag(BlockTags.NEEDS_STONE_TOOL)
.tag(Tags.Blocks.STORAGE_BLOCKS)
.tag(BlockTags.BEACON_BASE_BLOCKS)
.transform(TagGen.tagBlockAndItem("storage_blocks/chromium"))
.transform(TagGen.tagBlockAndItem(DestroyTagGen.forgeBlockAndItem("storage_blocks/chromium")))
.tag(Tags.Items.STORAGE_BLOCKS)
.build()
.register(),
Expand All @@ -524,7 +524,7 @@ public class DestroyBlocks {
.strength(2f, 2f)
).transform(TagGen.pickaxeOnly())
.tag(BlockTags.NEEDS_STONE_TOOL, Tags.Blocks.STORAGE_BLOCKS)
.transform(TagGen.tagBlockAndItem("storage_blocks/iodine"))
.transform(TagGen.tagBlockAndItem(DestroyTagGen.forgeBlockAndItem("storage_blocks/iodine")))
.tag(Tags.Items.STORAGE_BLOCKS)
.build()
.register(),
Expand All @@ -551,7 +551,7 @@ public class DestroyBlocks {
.tag(BlockTags.NEEDS_STONE_TOOL)
.tag(Tags.Blocks.STORAGE_BLOCKS)
.tag(BlockTags.BEACON_BASE_BLOCKS)
.transform(TagGen.tagBlockAndItem("storage_blocks/nickel"))
.transform(TagGen.tagBlockAndItem(DestroyTagGen.forgeBlockAndItem("storage_blocks/nickel")))
.tag(Tags.Items.STORAGE_BLOCKS)
.build()
.register(),
Expand All @@ -567,7 +567,7 @@ public class DestroyBlocks {
.tag(BlockTags.NEEDS_DIAMOND_TOOL)
.tag(Tags.Blocks.STORAGE_BLOCKS)
.tag(BlockTags.BEACON_BASE_BLOCKS)
.transform(TagGen.tagBlockAndItem("storage_blocks/palladium"))
.transform(TagGen.tagBlockAndItem(DestroyTagGen.forgeBlockAndItem("storage_blocks/palladium")))
.tag(Tags.Items.STORAGE_BLOCKS)
.build()
.register(),
Expand All @@ -582,7 +582,7 @@ public class DestroyBlocks {
.tag(BlockTags.NEEDS_IRON_TOOL)
.tag(Tags.Blocks.STORAGE_BLOCKS)
.tag(BlockTags.BEACON_BASE_BLOCKS)
.transform(TagGen.tagBlockAndItem("storage_blocks/platinum"))
.transform(TagGen.tagBlockAndItem(DestroyTagGen.forgeBlockAndItem("storage_blocks/platinum")))
.tag(Tags.Items.STORAGE_BLOCKS)
.build()
.register(),
Expand All @@ -598,7 +598,7 @@ public class DestroyBlocks {
.tag(BlockTags.NEEDS_DIAMOND_TOOL)
.tag(Tags.Blocks.STORAGE_BLOCKS)
.tag(BlockTags.BEACON_BASE_BLOCKS)
.transform(TagGen.tagBlockAndItem("storage_blocks/rhodium"))
.transform(TagGen.tagBlockAndItem(DestroyTagGen.forgeBlockAndItem("storage_blocks/rhodium")))
.tag(Tags.Items.STORAGE_BLOCKS)
.build()
.register(),
Expand All @@ -613,7 +613,7 @@ public class DestroyBlocks {
.tag(BlockTags.NEEDS_STONE_TOOL)
.tag(Tags.Blocks.STORAGE_BLOCKS)
.tag(BlockTags.BEACON_BASE_BLOCKS)
.transform(TagGen.tagBlockAndItem("storage_blocks/lead"))
.transform(TagGen.tagBlockAndItem(DestroyTagGen.forgeBlockAndItem("storage_blocks/lead")))
.tag(Tags.Items.STORAGE_BLOCKS)
.build()
.register();
Expand All @@ -632,7 +632,7 @@ public class DestroyBlocks {
.tag(BlockTags.NEEDS_STONE_TOOL)
.tag(Tags.Blocks.STORAGE_BLOCKS)
.tag(BlockTags.BEACON_BASE_BLOCKS)
.transform(TagGen.tagBlockAndItem("storage_blocks/stainless_steel"))
.transform(TagGen.tagBlockAndItem(DestroyTagGen.forgeBlockAndItem("storage_blocks/stainless_steel")))
.tag(Tags.Items.STORAGE_BLOCKS)
.build()
.register();
Expand All @@ -643,7 +643,7 @@ public class DestroyBlocks {
.tag(BlockTags.NEEDS_DIAMOND_TOOL)
.tag(Tags.Blocks.STORAGE_BLOCKS)
.tag(BlockTags.BEACON_BASE_BLOCKS)
.transform(TagGen.tagBlockAndItem("storage_blocks/rhodium"))
.transform(TagGen.tagBlockAndItem(DestroyTagGen.forgeBlockAndItem("storage_blocks/rhodium")))
.tag(Tags.Items.STORAGE_BLOCKS)
.build()
.register();
Expand All @@ -661,7 +661,7 @@ public class DestroyBlocks {
.loot((lt, b) -> lt.add(b, RegistrateBlockLootTables.createSilkTouchDispatchTable(b, lt.applyExplosionDecay(b, LootItem.lootTableItem(DestroyItems.FLUORITE.get()).apply(ApplyBonusCount.addOreBonusCount(Enchantments.BLOCK_FORTUNE))))))
.tag(BlockTags.NEEDS_IRON_TOOL)
.tag(Tags.Blocks.ORES)
.transform(TagGen.tagBlockAndItem("ores/fluorite", "ores_in_ground/stone"))
.transform(TagGen.tagBlockAndItem(DestroyTagGen.forgeBlockAndItem("ores/fluorite", "ores_in_ground/stone")))
.tag(Tags.Items.ORES)
.build()
.register();
Expand All @@ -678,7 +678,7 @@ public class DestroyBlocks {
.loot((lt, b) -> lt.add(b, RegistrateBlockLootTables.createSilkTouchDispatchTable(b, lt.applyExplosionDecay(b, LootItem.lootTableItem(DestroyItems.FLUORITE.get()).apply(ApplyBonusCount.addOreBonusCount(Enchantments.BLOCK_FORTUNE))))))
.tag(BlockTags.NEEDS_IRON_TOOL)
.tag(Tags.Blocks.ORES)
.transform(TagGen.tagBlockAndItem("ores/fluorite", "ores_in_ground/deepslate"))
.transform(TagGen.tagBlockAndItem(DestroyTagGen.forgeBlockAndItem("ores/fluorite", "ores_in_ground/deepslate")))
.tag(Tags.Items.ORES)
.build()
.register();
Expand All @@ -694,7 +694,7 @@ public class DestroyBlocks {
.loot((lt, b) -> lt.add(b, RegistrateBlockLootTables.createSilkTouchDispatchTable(b, lt.applyExplosionDecay(b, LootItem.lootTableItem(DestroyItems.FLUORITE.get()).apply(ApplyBonusCount.addOreBonusCount(Enchantments.BLOCK_FORTUNE))))))
.tag(BlockTags.NEEDS_IRON_TOOL)
.tag(Tags.Blocks.ORES)
.transform(TagGen.tagBlockAndItem("ores/fluorite", "ores_in_ground/end_stone"))
.transform(TagGen.tagBlockAndItem(DestroyTagGen.forgeBlockAndItem("ores/fluorite", "ores_in_ground/end_stone")))
.tag(Tags.Items.ORES)
.build()
.register();
Expand All @@ -710,7 +710,7 @@ public class DestroyBlocks {
.loot((lt, b) -> lt.add(b, RegistrateBlockLootTables.createSilkTouchDispatchTable(b, lt.applyExplosionDecay(b, LootItem.lootTableItem(DestroyItems.RAW_NICKEL.get()).apply(ApplyBonusCount.addOreBonusCount(Enchantments.BLOCK_FORTUNE))))))
.tag(BlockTags.NEEDS_IRON_TOOL)
.tag(Tags.Blocks.ORES)
.transform(TagGen.tagBlockAndItem("ores/nickel", "ores_in_ground/stone"))
.transform(TagGen.tagBlockAndItem(DestroyTagGen.forgeBlockAndItem("ores/nickel", "ores_in_ground/stone")))
.tag(Tags.Items.ORES)
.build()
.register();
Expand All @@ -727,7 +727,7 @@ public class DestroyBlocks {
.loot((lt, b) -> lt.add(b, RegistrateBlockLootTables.createSilkTouchDispatchTable(b, lt.applyExplosionDecay(b, LootItem.lootTableItem(DestroyItems.RAW_NICKEL.get()).apply(ApplyBonusCount.addOreBonusCount(Enchantments.BLOCK_FORTUNE))))))
.tag(BlockTags.NEEDS_IRON_TOOL)
.tag(Tags.Blocks.ORES)
.transform(TagGen.tagBlockAndItem("ores/nickel", "ores_in_ground/deepslate"))
.transform(TagGen.tagBlockAndItem(DestroyTagGen.forgeBlockAndItem("ores/nickel", "ores_in_ground/deepslate")))
.tag(Tags.Items.ORES)
.build()
.register();
Expand Down
27 changes: 27 additions & 0 deletions src/main/java/com/petrolpark/destroy/DestroyTagGen.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package com.petrolpark.destroy;

import net.minecraft.core.registries.Registries;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.tags.TagKey;
import net.minecraft.world.item.Item;
import net.minecraft.world.level.block.Block;

import java.util.LinkedHashMap;
import java.util.Map;

public class DestroyTagGen {
public static Map<TagKey<Block>, TagKey<Item>> forgeBlockAndItem(String... forgePaths) {
Map<TagKey<Block>, TagKey<Item>> map = new LinkedHashMap<>();

for (String path : forgePaths) {
ResourceLocation id = new ResourceLocation("forge", path);

TagKey<Block> blockTag = TagKey.create(Registries.BLOCK, id);
TagKey<Item> itemTag = TagKey.create(Registries.ITEM, id);

map.put(blockTag, itemTag);
}

return map;
}
}
Loading