diff --git a/fabric/build.gradle b/fabric/build.gradle new file mode 100644 index 00000000..5590e497 --- /dev/null +++ b/fabric/build.gradle @@ -0,0 +1,5 @@ +loom { + mixin { + useLegacyMixinAp = false + } +} \ No newline at end of file diff --git a/src/fabric/java/dev/lukebemish/excavatedvariants/impl/fabriquilt/CreativeTabLoaderImpl.java b/src/fabric/java/dev/lukebemish/excavatedvariants/impl/fabriquilt/CreativeTabLoaderImpl.java new file mode 100644 index 00000000..e1311df8 --- /dev/null +++ b/src/fabric/java/dev/lukebemish/excavatedvariants/impl/fabriquilt/CreativeTabLoaderImpl.java @@ -0,0 +1,40 @@ +package dev.lukebemish.excavatedvariants.impl.fabriquilt; + +import com.google.auto.service.AutoService; +import dev.lukebemish.excavatedvariants.impl.ExcavatedVariants; +import dev.lukebemish.excavatedvariants.impl.platform.services.CreativeTabLoader; +import net.fabricmc.fabric.api.itemgroup.v1.FabricItemGroup; +import net.minecraft.core.Registry; +import net.minecraft.core.registries.BuiltInRegistries; +import net.minecraft.network.chat.Component; +import net.minecraft.world.item.CreativeModeTab; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Items; +import org.jspecify.annotations.Nullable; + +import java.util.Objects; + +@SuppressWarnings("unused") +@AutoService(CreativeTabLoader.class) +public class CreativeTabLoaderImpl implements CreativeTabLoader { + private static final int MAX_INT_VAL = (int) Math.sqrt(Integer.MAX_VALUE); + public static @Nullable CreativeModeTab EXCAVATED_VARIANTS_TAB; + + @Override + public void registerCreativeTab() { + EXCAVATED_VARIANTS_TAB = FabricItemGroup.builder() + .icon(() -> new ItemStack(Items.DEEPSLATE_COPPER_ORE)) + .displayItems((displayParameters, output) -> { + for (var supplier : ExcavatedVariants.ITEMS) { + output.accept(supplier.get()); + } + }) + .title(Component.translatable("itemGroup.excavated_variants.excavated_variants")) + .build(); + Registry.register(BuiltInRegistries.CREATIVE_MODE_TAB, CREATIVE_TAB_ID, EXCAVATED_VARIANTS_TAB); + } + + public CreativeModeTab getCreativeTab() { + return Objects.requireNonNull(EXCAVATED_VARIANTS_TAB); + } +} diff --git a/src/fabric/java/dev/lukebemish/excavatedvariants/impl/fabriquilt/ExcavatedVariantsClientFabriQuilt.java b/src/fabric/java/dev/lukebemish/excavatedvariants/impl/fabriquilt/ExcavatedVariantsClientFabriQuilt.java new file mode 100644 index 00000000..bd6f1bcd --- /dev/null +++ b/src/fabric/java/dev/lukebemish/excavatedvariants/impl/fabriquilt/ExcavatedVariantsClientFabriQuilt.java @@ -0,0 +1,15 @@ +package dev.lukebemish.excavatedvariants.impl.fabriquilt; + +import dev.lukebemish.excavatedvariants.impl.network.SyncOresPayload; +import net.fabricmc.api.ClientModInitializer; +import net.fabricmc.fabric.api.client.networking.v1.ClientConfigurationNetworking; +import net.minecraft.network.chat.Component; + +public class ExcavatedVariantsClientFabriQuilt implements ClientModInitializer { + @Override + public void onInitializeClient() { + ClientConfigurationNetworking.registerGlobalReceiver(SyncOresPayload.TYPE, (msg, context) -> + msg.consumeMessage(string -> context.responseSender().disconnect(Component.literal(string))) + ); + } +} diff --git a/src/fabric/java/dev/lukebemish/excavatedvariants/impl/fabriquilt/ExcavatedVariantsFabriQuilt.java b/src/fabric/java/dev/lukebemish/excavatedvariants/impl/fabriquilt/ExcavatedVariantsFabriQuilt.java new file mode 100644 index 00000000..36be45b2 --- /dev/null +++ b/src/fabric/java/dev/lukebemish/excavatedvariants/impl/fabriquilt/ExcavatedVariantsFabriQuilt.java @@ -0,0 +1,68 @@ +package dev.lukebemish.excavatedvariants.impl.fabriquilt; + +import dev.lukebemish.excavatedvariants.impl.BlockAddedCallback; +import dev.lukebemish.excavatedvariants.impl.ExcavatedVariants; +import dev.lukebemish.excavatedvariants.impl.ExcavatedVariantsClient; +import dev.lukebemish.excavatedvariants.impl.RegistriesImpl; +import dev.lukebemish.excavatedvariants.impl.network.AckOresPayload; +import dev.lukebemish.excavatedvariants.impl.network.SyncOresPayload; +import dev.lukebemish.excavatedvariants.impl.worldgen.OreFinderUtil; +import dev.lukebemish.excavatedvariants.impl.worldgen.OreReplacer; +import net.fabricmc.api.EnvType; +import net.fabricmc.fabric.api.biome.v1.BiomeModifications; +import net.fabricmc.fabric.api.biome.v1.ModificationPhase; +import net.fabricmc.fabric.api.event.lifecycle.v1.ServerLifecycleEvents; +import net.fabricmc.fabric.api.networking.v1.PayloadTypeRegistry; +import net.fabricmc.fabric.api.networking.v1.ServerConfigurationConnectionEvents; +import net.fabricmc.fabric.api.networking.v1.ServerConfigurationNetworking; +import net.fabricmc.loader.api.FabricLoader; +import net.minecraft.core.Registry; +import net.minecraft.core.registries.BuiltInRegistries; +import net.minecraft.core.registries.Registries; +import net.minecraft.resources.ResourceKey; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.level.levelgen.GenerationStep; +import net.minecraft.world.level.levelgen.placement.PlacedFeature; + +import java.util.stream.Collectors; + +public class ExcavatedVariantsFabriQuilt { + public static void onInitialize() { + ExcavatedVariants.init(); + if (FabricLoader.getInstance().getEnvironmentType() == EnvType.CLIENT) { + ExcavatedVariantsClient.init(); + } + + BuiltInRegistries.BLOCK.holders().forEach(reference -> + BlockAddedCallback.onRegister(reference.value(), reference.key())); + BlockAddedCallback.setReady(); + BlockAddedCallback.register(); + + ServerLifecycleEvents.SERVER_STARTING.register(server -> + OreFinderUtil.setupBlocks()); + + ResourceKey confKey = ResourceKey.create(Registries.PLACED_FEATURE, new ResourceLocation(ExcavatedVariants.MOD_ID, "ore_replacer")); + BiomeModifications.create(confKey.location()).add(ModificationPhase.POST_PROCESSING, (x) -> true, context -> + context.getGenerationSettings().addFeature(GenerationStep.Decoration.TOP_LAYER_MODIFICATION, confKey)); + + /*if (QuiltLoader.isModLoaded("unearthed") && ExcavatedVariants.setupMap()) { + HyleCompat.init(); + }*/ + + PayloadTypeRegistry.configurationS2C().register(SyncOresPayload.TYPE, SyncOresPayload.CODEC); + PayloadTypeRegistry.configurationC2S().register(AckOresPayload.TYPE, AckOresPayload.CODEC); + + ServerConfigurationConnectionEvents.CONFIGURE.register((handler, server) -> { + var packet = new SyncOresPayload(ExcavatedVariants.COMPLETE_VARIANTS.stream().map(v -> v.fullId).collect(Collectors.toSet())); + ServerConfigurationNetworking.send(handler, packet); + }); + + Registry.register(BuiltInRegistries.FEATURE, new ResourceLocation(ExcavatedVariants.MOD_ID, "ore_replacer"), new OreReplacer()); + } + + public static void cleanup() { + StateCapturer.checkState(); + RegistriesImpl.registerRegistries(); + ExcavatedVariants.initPostRegister(); + } +} diff --git a/src/fabric/java/dev/lukebemish/excavatedvariants/impl/fabriquilt/FabriQuiltPlatform.java b/src/fabric/java/dev/lukebemish/excavatedvariants/impl/fabriquilt/FabriQuiltPlatform.java new file mode 100644 index 00000000..a5f3f80f --- /dev/null +++ b/src/fabric/java/dev/lukebemish/excavatedvariants/impl/fabriquilt/FabriQuiltPlatform.java @@ -0,0 +1,24 @@ +package dev.lukebemish.excavatedvariants.impl.fabriquilt; + +import dev.lukebemish.excavatedvariants.impl.fabriquilt.fabric.FabricPlatform; +import dev.lukebemish.excavatedvariants.impl.fabriquilt.quilt.MinimalQuiltPlatform; +import net.fabricmc.loader.api.FabricLoader; + +import java.nio.file.Path; +import java.util.Set; + +public interface FabriQuiltPlatform { + + @SuppressWarnings("deprecation") + static FabriQuiltPlatform getInstance() { + if (FabricLoader.getInstance().isModLoaded("quilt_loader")) { + return MinimalQuiltPlatform.INSTANCE; + } else { + return FabricPlatform.INSTANCE; + } + } + + Path getCacheFolder(); + String getModVersion(); + Set getModIds(); +} diff --git a/src/fabric/java/dev/lukebemish/excavatedvariants/impl/fabriquilt/PlatformImpl.java b/src/fabric/java/dev/lukebemish/excavatedvariants/impl/fabriquilt/PlatformImpl.java new file mode 100644 index 00000000..5a7f565a --- /dev/null +++ b/src/fabric/java/dev/lukebemish/excavatedvariants/impl/fabriquilt/PlatformImpl.java @@ -0,0 +1,52 @@ +package dev.lukebemish.excavatedvariants.impl.fabriquilt; + +import com.google.auto.service.AutoService; +import dev.lukebemish.excavatedvariants.impl.ExcavatedVariants; +import dev.lukebemish.excavatedvariants.impl.platform.services.Platform; +import net.fabricmc.api.EnvType; +import net.fabricmc.loader.api.FabricLoader; +import net.minecraft.core.Registry; +import net.minecraft.core.registries.BuiltInRegistries; +import net.minecraft.world.item.Item; + +import java.nio.file.Path; +import java.util.Set; + +@AutoService(Platform.class) +public class PlatformImpl implements Platform { + + @Override + public Set getModIds() { + return FabriQuiltPlatform.getInstance().getModIds(); + } + + public Path getConfigFolder() { + return FabricLoader.getInstance().getConfigDir(); + } + + @Override + public Path getModDataFolder() { + return FabriQuiltPlatform.getInstance().getCacheFolder().resolve(ExcavatedVariants.MOD_ID); + } + + @Override + public String getModVersion() { + return FabriQuiltPlatform.getInstance().getModVersion(); + } + + @Override + public boolean isClient() { + return FabricLoader.getInstance().getEnvironmentType() == EnvType.CLIENT; + } + + @Override + public void register(ExcavatedVariants.VariantFuture future) { + ExcavatedVariants.registerBlockAndItem( + (rlr, bl) -> Registry.register(BuiltInRegistries.BLOCK, rlr, bl), + (rlr, it) -> { + Item out = Registry.register(BuiltInRegistries.ITEM, rlr, it.get()); + return () -> out; + }, future); + } + +} diff --git a/src/fabric/java/dev/lukebemish/excavatedvariants/impl/fabriquilt/StateCapturer.java b/src/fabric/java/dev/lukebemish/excavatedvariants/impl/fabriquilt/StateCapturer.java new file mode 100644 index 00000000..4f5bd0f6 --- /dev/null +++ b/src/fabric/java/dev/lukebemish/excavatedvariants/impl/fabriquilt/StateCapturer.java @@ -0,0 +1,22 @@ +package dev.lukebemish.excavatedvariants.impl.fabriquilt; + +import dev.lukebemish.excavatedvariants.impl.ExcavatedVariants; +import dev.lukebemish.excavatedvariants.impl.ModLifecycle; +import net.fabricmc.api.ModInitializer; + +public class StateCapturer implements ModInitializer { + private static boolean INITIALIZED = false; + + @Override + public void onInitialize() { + INITIALIZED = true; + } + + public static void checkState() { + if (ModLifecycle.getLifecyclePhase().above(ModLifecycle.REGISTRATION) || !INITIALIZED) { + var e = new RuntimeException("Something has gone very wrong with load ordering, and we have no clue what is going on. Please report this to Excavated Variants and be sure to provide a log!"); + ExcavatedVariants.LOGGER.error("...what the heck? Where are we? Lifecycle state: {}, initialized: {}", ModLifecycle.getLifecyclePhase(), INITIALIZED, e); + throw e; + } + } +} diff --git a/src/fabric/java/dev/lukebemish/excavatedvariants/impl/fabriquilt/client/RenderTypeClientExecutor.java b/src/fabric/java/dev/lukebemish/excavatedvariants/impl/fabriquilt/client/RenderTypeClientExecutor.java new file mode 100644 index 00000000..e2626bdd --- /dev/null +++ b/src/fabric/java/dev/lukebemish/excavatedvariants/impl/fabriquilt/client/RenderTypeClientExecutor.java @@ -0,0 +1,11 @@ +package dev.lukebemish.excavatedvariants.impl.fabriquilt.client; + +import net.fabricmc.fabric.api.blockrenderlayer.v1.BlockRenderLayerMap; +import net.minecraft.client.renderer.RenderType; +import net.minecraft.world.level.block.Block; + +public class RenderTypeClientExecutor { + public static void setMipped(Block block) { + BlockRenderLayerMap.INSTANCE.putBlock(block, RenderType.cutoutMipped()); + } +} diff --git a/src/fabric/java/dev/lukebemish/excavatedvariants/impl/fabriquilt/client/RenderTypeHandlerImpl.java b/src/fabric/java/dev/lukebemish/excavatedvariants/impl/fabriquilt/client/RenderTypeHandlerImpl.java new file mode 100644 index 00000000..f176d346 --- /dev/null +++ b/src/fabric/java/dev/lukebemish/excavatedvariants/impl/fabriquilt/client/RenderTypeHandlerImpl.java @@ -0,0 +1,16 @@ +package dev.lukebemish.excavatedvariants.impl.fabriquilt.client; + +import com.google.auto.service.AutoService; +import dev.lukebemish.excavatedvariants.impl.client.RenderTypeHandler; +import net.fabricmc.api.EnvType; +import net.fabricmc.loader.api.FabricLoader; +import net.minecraft.world.level.block.Block; + +@AutoService(RenderTypeHandler.class) +public class RenderTypeHandlerImpl implements RenderTypeHandler { + public void setRenderTypeMipped(Block block) { + if (FabricLoader.getInstance().getEnvironmentType() == EnvType.CLIENT) { + RenderTypeClientExecutor.setMipped(block); + } + } +} \ No newline at end of file diff --git a/src/fabric/java/dev/lukebemish/excavatedvariants/impl/fabriquilt/client/package-info.java b/src/fabric/java/dev/lukebemish/excavatedvariants/impl/fabriquilt/client/package-info.java new file mode 100644 index 00000000..65634720 --- /dev/null +++ b/src/fabric/java/dev/lukebemish/excavatedvariants/impl/fabriquilt/client/package-info.java @@ -0,0 +1,6 @@ +@NullMarked +@ApiStatus.Internal +package dev.lukebemish.excavatedvariants.impl.fabriquilt.client; + +import org.jetbrains.annotations.ApiStatus; +import org.jspecify.annotations.NullMarked; \ No newline at end of file diff --git a/src/fabric/java/dev/lukebemish/excavatedvariants/impl/fabriquilt/compat/HyleCompat.java.disabled b/src/fabric/java/dev/lukebemish/excavatedvariants/impl/fabriquilt/compat/HyleCompat.java.disabled new file mode 100644 index 00000000..a36a2bc7 --- /dev/null +++ b/src/fabric/java/dev/lukebemish/excavatedvariants/impl/fabriquilt/compat/HyleCompat.java.disabled @@ -0,0 +1,30 @@ +package dev.lukebemish.excavatedvariants.impl.fabriquilt.compat; + +public class HyleCompat { + private static Map>> excavatedVariantsOres; + + public static void init() { + StoneTypeCallback.EVENT.register(stoneType -> { + if (excavatedVariantsOres == null) { + excavatedVariantsOres = new IdentityHashMap<>(); + for (Pair> p : ExcavatedVariants.oreStoneList) { + for (ResourceLocation block_id : p.getFirst().block_id) { + Block baseOreBlock = Services.REGISTRY_UTIL.getBlockById(block_id); + excavatedVariantsOres.put(baseOreBlock, p); + } + } + } + + Block baseBlock = stoneType.getBaseBlock().getBlock(); + excavatedVariantsOres.forEach((baseOreBlock, pair) -> { + HashSet stones = pair.getSecond(); + stones.stream().variantFilter(stone -> Services.REGISTRY_UTIL.getBlockById(stone.block_id) == baseBlock).findAny().ifPresent(stone -> { + Block oreBlock = Services.REGISTRY_UTIL.getBlockById(new ResourceLocation(ExcavatedVariants.MOD_ID, stone.id + "_" + pair.getFirst().id)); + if (!stoneType.getOreMap().containsKey(baseOreBlock) && oreBlock != null) + stoneType.getOreMap().put(baseOreBlock, oreBlock.defaultBlockState()); + }); + }); + return true; + }); + } +} diff --git a/src/fabric/java/dev/lukebemish/excavatedvariants/impl/fabriquilt/compat/package-info.java b/src/fabric/java/dev/lukebemish/excavatedvariants/impl/fabriquilt/compat/package-info.java new file mode 100644 index 00000000..4ef1915b --- /dev/null +++ b/src/fabric/java/dev/lukebemish/excavatedvariants/impl/fabriquilt/compat/package-info.java @@ -0,0 +1,6 @@ +@NullMarked +@ApiStatus.Internal +package dev.lukebemish.excavatedvariants.impl.fabriquilt.compat; + +import org.jetbrains.annotations.ApiStatus; +import org.jspecify.annotations.NullMarked; \ No newline at end of file diff --git a/src/fabric/java/dev/lukebemish/excavatedvariants/impl/fabriquilt/fabric/ExcavatedVariantsFabric.java b/src/fabric/java/dev/lukebemish/excavatedvariants/impl/fabriquilt/fabric/ExcavatedVariantsFabric.java new file mode 100644 index 00000000..7466481d --- /dev/null +++ b/src/fabric/java/dev/lukebemish/excavatedvariants/impl/fabriquilt/fabric/ExcavatedVariantsFabric.java @@ -0,0 +1,11 @@ +package dev.lukebemish.excavatedvariants.impl.fabriquilt.fabric; + +import dev.lukebemish.excavatedvariants.impl.fabriquilt.ExcavatedVariantsFabriQuilt; +import net.fabricmc.api.ModInitializer; + +public class ExcavatedVariantsFabric implements ModInitializer { + @Override + public void onInitialize() { + ExcavatedVariantsFabriQuilt.onInitialize(); + } +} diff --git a/src/fabric/java/dev/lukebemish/excavatedvariants/impl/fabriquilt/fabric/FabricPlatform.java b/src/fabric/java/dev/lukebemish/excavatedvariants/impl/fabriquilt/fabric/FabricPlatform.java new file mode 100644 index 00000000..f87f3dbd --- /dev/null +++ b/src/fabric/java/dev/lukebemish/excavatedvariants/impl/fabriquilt/fabric/FabricPlatform.java @@ -0,0 +1,33 @@ +package dev.lukebemish.excavatedvariants.impl.fabriquilt.fabric; + +import com.google.common.base.Suppliers; +import dev.lukebemish.excavatedvariants.impl.ExcavatedVariants; +import dev.lukebemish.excavatedvariants.impl.fabriquilt.FabriQuiltPlatform; +import net.fabricmc.loader.api.FabricLoader; +import net.fabricmc.loader.api.ModContainer; +import net.fabricmc.loader.api.metadata.ModMetadata; + +import java.nio.file.Path; +import java.util.Set; +import java.util.function.Supplier; +import java.util.stream.Collectors; + +public class FabricPlatform implements FabriQuiltPlatform { + public static final FabricPlatform INSTANCE = new FabricPlatform(); + private static final Supplier> MOD_IDS = Suppliers.memoize(() -> FabricLoader.getInstance().getAllMods().stream().map(ModContainer::getMetadata).map(ModMetadata::getId).collect(Collectors.toSet())); + + @Override + public Path getCacheFolder() { + return FabricLoader.getInstance().getGameDir().resolve(".cache"); + } + + @Override + public String getModVersion() { + return FabricLoader.getInstance().getModContainer(ExcavatedVariants.MOD_ID).orElseThrow().getMetadata().getVersion().getFriendlyString(); + } + + @Override + public Set getModIds() { + return MOD_IDS.get(); + } +} diff --git a/src/fabric/java/dev/lukebemish/excavatedvariants/impl/fabriquilt/fabric/package-info.java b/src/fabric/java/dev/lukebemish/excavatedvariants/impl/fabriquilt/fabric/package-info.java new file mode 100644 index 00000000..7797b850 --- /dev/null +++ b/src/fabric/java/dev/lukebemish/excavatedvariants/impl/fabriquilt/fabric/package-info.java @@ -0,0 +1,6 @@ +@NullMarked +@ApiStatus.Internal +package dev.lukebemish.excavatedvariants.impl.fabriquilt.fabric; + +import org.jetbrains.annotations.ApiStatus; +import org.jspecify.annotations.NullMarked; \ No newline at end of file diff --git a/src/fabric/java/dev/lukebemish/excavatedvariants/impl/fabriquilt/mixin/ClientInitializerMixin.java b/src/fabric/java/dev/lukebemish/excavatedvariants/impl/fabriquilt/mixin/ClientInitializerMixin.java new file mode 100644 index 00000000..860390f9 --- /dev/null +++ b/src/fabric/java/dev/lukebemish/excavatedvariants/impl/fabriquilt/mixin/ClientInitializerMixin.java @@ -0,0 +1,18 @@ +package dev.lukebemish.excavatedvariants.impl.fabriquilt.mixin; + +import dev.lukebemish.excavatedvariants.impl.fabriquilt.ExcavatedVariantsFabriQuilt; +import net.minecraft.client.Minecraft; +import net.minecraft.client.main.GameConfig; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; + +@Mixin(Minecraft.class) +public class ClientInitializerMixin { + // See where fabric's EntrypointPatch decides to shove fabric entrypoints... + @Inject(method = "(Lnet/minecraft/client/main/GameConfig;)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/Options;(Lnet/minecraft/client/Minecraft;Ljava/io/File;)V")) + private void postFabricInitialized(GameConfig gameConfig, CallbackInfo ci) { + ExcavatedVariantsFabriQuilt.cleanup(); + } +} diff --git a/src/fabric/java/dev/lukebemish/excavatedvariants/impl/fabriquilt/mixin/DedicatedServerInitializerMixin.java b/src/fabric/java/dev/lukebemish/excavatedvariants/impl/fabriquilt/mixin/DedicatedServerInitializerMixin.java new file mode 100644 index 00000000..ca35d982 --- /dev/null +++ b/src/fabric/java/dev/lukebemish/excavatedvariants/impl/fabriquilt/mixin/DedicatedServerInitializerMixin.java @@ -0,0 +1,17 @@ +package dev.lukebemish.excavatedvariants.impl.fabriquilt.mixin; + +import dev.lukebemish.excavatedvariants.impl.fabriquilt.ExcavatedVariantsFabriQuilt; +import net.minecraft.server.Main; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; + +@Mixin(Main.class) +public class DedicatedServerInitializerMixin { + // See where fabric's EntrypointPatch decides to shove fabric entrypoints... + @Inject(method = "main([Ljava/lang/String;)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/server/dedicated/DedicatedServerSettings;(Ljava/nio/file/Path;)V")) + private static void postFabricInitialized(String[] args, CallbackInfo ci) { + ExcavatedVariantsFabriQuilt.cleanup(); + } +} diff --git a/src/fabric/java/dev/lukebemish/excavatedvariants/impl/fabriquilt/mixin/DimensionDataStorageMixin.java b/src/fabric/java/dev/lukebemish/excavatedvariants/impl/fabriquilt/mixin/DimensionDataStorageMixin.java new file mode 100644 index 00000000..1e8d7fb2 --- /dev/null +++ b/src/fabric/java/dev/lukebemish/excavatedvariants/impl/fabriquilt/mixin/DimensionDataStorageMixin.java @@ -0,0 +1,29 @@ +package dev.lukebemish.excavatedvariants.impl.fabriquilt.mixin; + +import com.llamalad7.mixinextras.injector.wrapoperation.Operation; +import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; +import com.mojang.datafixers.DataFixer; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.util.datafix.DataFixTypes; +import net.minecraft.world.level.storage.DimensionDataStorage; +import org.jspecify.annotations.Nullable; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; + +@Mixin(DimensionDataStorage.class) +public class DimensionDataStorageMixin { + @WrapOperation( + method = "readTagFromDisk", + at = @At( + value = "INVOKE", + target = "Lnet/minecraft/util/datafix/DataFixTypes;update(Lcom/mojang/datafixers/DataFixer;Lnet/minecraft/nbt/CompoundTag;II)Lnet/minecraft/nbt/CompoundTag;" + ) + ) + private CompoundTag excavated_variants$readTagFromDisk(@Nullable DataFixTypes dataFixTypes, DataFixer fixer, CompoundTag tag, int version, int newVersion, Operation operation) { + if (dataFixTypes == null) { + return tag; + } else { + return operation.call(dataFixTypes, fixer, tag, version, newVersion); + } + } +} diff --git a/src/fabric/java/dev/lukebemish/excavatedvariants/impl/fabriquilt/mixin/package-info.java b/src/fabric/java/dev/lukebemish/excavatedvariants/impl/fabriquilt/mixin/package-info.java new file mode 100644 index 00000000..f332780e --- /dev/null +++ b/src/fabric/java/dev/lukebemish/excavatedvariants/impl/fabriquilt/mixin/package-info.java @@ -0,0 +1,6 @@ +@NullMarked +@ApiStatus.Internal +package dev.lukebemish.excavatedvariants.impl.fabriquilt.mixin; + +import org.jetbrains.annotations.ApiStatus; +import org.jspecify.annotations.NullMarked; \ No newline at end of file diff --git a/src/fabric/java/dev/lukebemish/excavatedvariants/impl/fabriquilt/package-info.java b/src/fabric/java/dev/lukebemish/excavatedvariants/impl/fabriquilt/package-info.java new file mode 100644 index 00000000..eb42b9dd --- /dev/null +++ b/src/fabric/java/dev/lukebemish/excavatedvariants/impl/fabriquilt/package-info.java @@ -0,0 +1,6 @@ +@NullMarked +@ApiStatus.Internal +package dev.lukebemish.excavatedvariants.impl.fabriquilt; + +import org.jetbrains.annotations.ApiStatus; +import org.jspecify.annotations.NullMarked; \ No newline at end of file diff --git a/src/fabric/java/dev/lukebemish/excavatedvariants/impl/fabriquilt/quilt/MinimalQuiltPlatform.java b/src/fabric/java/dev/lukebemish/excavatedvariants/impl/fabriquilt/quilt/MinimalQuiltPlatform.java new file mode 100644 index 00000000..73db4b73 --- /dev/null +++ b/src/fabric/java/dev/lukebemish/excavatedvariants/impl/fabriquilt/quilt/MinimalQuiltPlatform.java @@ -0,0 +1,17 @@ +package dev.lukebemish.excavatedvariants.impl.fabriquilt.quilt; + +import dev.lukebemish.excavatedvariants.impl.fabriquilt.fabric.FabricPlatform; +import org.quiltmc.loader.api.QuiltLoader; + +import java.nio.file.Path; + +public class MinimalQuiltPlatform extends FabricPlatform { + private MinimalQuiltPlatform() {} + + public static final MinimalQuiltPlatform INSTANCE = new MinimalQuiltPlatform(); + + @Override + public Path getCacheFolder() { + return QuiltLoader.getCacheDir(); + } +} diff --git a/src/fabric/java/dev/lukebemish/excavatedvariants/impl/fabriquilt/quilt/package-info.java b/src/fabric/java/dev/lukebemish/excavatedvariants/impl/fabriquilt/quilt/package-info.java new file mode 100644 index 00000000..f7182e69 --- /dev/null +++ b/src/fabric/java/dev/lukebemish/excavatedvariants/impl/fabriquilt/quilt/package-info.java @@ -0,0 +1,6 @@ +@NullMarked +@ApiStatus.Internal +package dev.lukebemish.excavatedvariants.impl.fabriquilt.quilt; + +import org.jetbrains.annotations.ApiStatus; +import org.jspecify.annotations.NullMarked; \ No newline at end of file diff --git a/src/fabric/resources/mixin.excavated_variants_fabriquilt.json b/src/fabric/resources/mixin.excavated_variants_fabriquilt.json new file mode 100644 index 00000000..d0750c69 --- /dev/null +++ b/src/fabric/resources/mixin.excavated_variants_fabriquilt.json @@ -0,0 +1,18 @@ +{ + "required": true, + "minVersion": "0.8", + "package": "dev.lukebemish.excavatedvariants.impl.fabriquilt.mixin", + "compatibilityLevel": "JAVA_17", + "mixins": [ + "DimensionDataStorageMixin" + ], + "client": [ + "ClientInitializerMixin" + ], + "server": [ + "DedicatedServerInitializerMixin" + ], + "injectors": { + "defaultRequire": 1 + } +} \ No newline at end of file diff --git a/src/main/java/dev/lukebemish/excavatedvariants/api/Listener.java b/src/main/java/dev/lukebemish/excavatedvariants/api/Listener.java new file mode 100644 index 00000000..b0f75490 --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/api/Listener.java @@ -0,0 +1,19 @@ +package dev.lukebemish.excavatedvariants.api; + +import org.jspecify.annotations.NonNull; + +/** + * An implementation of any number of different events that can be fired by Excavated Variants, which mods can provide + * their own implementations of to listen to. Different subclasses of this interface are used for different types of + * events, and are discovered as services by Excavated Variants. + */ +public interface Listener extends Comparable { + default int priority() { + return 0; + } + + @Override + default int compareTo(@NonNull Listener o) { + return o.priority() - this.priority(); + } +} diff --git a/src/main/java/dev/lukebemish/excavatedvariants/api/PostRegistrationListener.java b/src/main/java/dev/lukebemish/excavatedvariants/api/PostRegistrationListener.java new file mode 100644 index 00000000..2122920b --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/api/PostRegistrationListener.java @@ -0,0 +1,37 @@ +package dev.lukebemish.excavatedvariants.api; + +import dev.lukebemish.excavatedvariants.api.data.GroundType; +import dev.lukebemish.excavatedvariants.api.data.Ore; +import dev.lukebemish.excavatedvariants.api.data.Stone; +import dev.lukebemish.excavatedvariants.api.data.modifier.Modifier; +import net.minecraft.core.Registry; +import org.jetbrains.annotations.ApiStatus; + +/** + * A listener used to observe the results of ore/stone/etc. registration. + */ +public interface PostRegistrationListener extends Listener { + + /** + * Called when all variants have been registered. + * @param Registries holds filled, frozen registries + */ + void registriesComplete( + Registries Registries + ); + + final class Registries { + public final Registry groundTypes; + public final Registry stones; + public final Registry ores; + public final Registry modifiers; + + @ApiStatus.Internal + public Registries(Registry groundTypes, Registry stones, Registry ores, Registry modifiers) { + this.groundTypes = groundTypes; + this.stones = stones; + this.ores = ores; + this.modifiers = modifiers; + } + } +} diff --git a/src/main/java/dev/lukebemish/excavatedvariants/api/RegistrationListener.java b/src/main/java/dev/lukebemish/excavatedvariants/api/RegistrationListener.java new file mode 100644 index 00000000..5c2fda99 --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/api/RegistrationListener.java @@ -0,0 +1,37 @@ +package dev.lukebemish.excavatedvariants.api; + +import dev.lukebemish.excavatedvariants.api.data.GroundType; +import dev.lukebemish.excavatedvariants.api.data.Ore; +import dev.lukebemish.excavatedvariants.api.data.Stone; +import dev.lukebemish.excavatedvariants.api.data.modifier.Modifier; +import net.minecraft.resources.ResourceLocation; +import org.jetbrains.annotations.ApiStatus; + +import java.util.function.BiConsumer; + +/** + * A listener used to register new ores and stones. + */ +public interface RegistrationListener extends Listener { + /** + * Register new variants. Ores, stones, and other variants can be registered through the consumers in the registrar. + */ + void provideEntries( + Registrar registrar + ); + + final class Registrar { + public final BiConsumer groundTypes; + public final BiConsumer stones; + public final BiConsumer ores; + public final BiConsumer modifiers; + + @ApiStatus.Internal + public Registrar(BiConsumer groundTypes, BiConsumer stones, BiConsumer ores, BiConsumer modifiers) { + this.groundTypes = groundTypes; + this.stones = stones; + this.ores = ores; + this.modifiers = modifiers; + } + } +} diff --git a/src/main/java/dev/lukebemish/excavatedvariants/api/RegistryKeys.java b/src/main/java/dev/lukebemish/excavatedvariants/api/RegistryKeys.java new file mode 100644 index 00000000..0387ba31 --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/api/RegistryKeys.java @@ -0,0 +1,33 @@ +package dev.lukebemish.excavatedvariants.api; + +import dev.lukebemish.excavatedvariants.impl.RegistriesImpl; +import dev.lukebemish.excavatedvariants.api.data.GroundType; +import dev.lukebemish.excavatedvariants.api.data.Ore; +import dev.lukebemish.excavatedvariants.api.data.Stone; +import dev.lukebemish.excavatedvariants.api.data.modifier.Modifier; +import net.minecraft.core.Registry; +import net.minecraft.resources.ResourceKey; + +public final class RegistryKeys { + private RegistryKeys() {} + + /** + * Ground types represent classes of ores and stones. They are used to determine which new ore/stone combinations + * (variants) should be created. + */ + public static final ResourceKey> GROUND_TYPE = RegistriesImpl.GROUND_TYPE_KEY; + /** + * Ores are types of blocks which can exist in any number of different stones. During worldgen, they are replaced + * with variants matching neighboring stones. + */ + public static final ResourceKey> ORE = RegistriesImpl.ORE_KEY; + /** + * Stones are blocks which ores generate within. + */ + public static final ResourceKey> STONE = RegistriesImpl.STONE_KEY; + /** + * Modifiers pre- or post-process ore/stone combinations to either prevent or modify variant creation, or change the + * properties of the resulting variants. + */ + public static final ResourceKey> MODIFIER = RegistriesImpl.MODIFIER_KEY; +} diff --git a/src/main/java/dev/lukebemish/excavatedvariants/api/client/Face.java b/src/main/java/dev/lukebemish/excavatedvariants/api/client/Face.java new file mode 100644 index 00000000..1bb2a2a1 --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/api/client/Face.java @@ -0,0 +1,16 @@ +package dev.lukebemish.excavatedvariants.api.client; + +public enum Face { + NORTH("north"), + SOUTH("south"), + EAST("east"), + WEST("west"), + UP("up"), + DOWN("down"); + + public final String faceName; + + Face(String faceName) { + this.faceName = faceName; + } +} diff --git a/src/main/java/dev/lukebemish/excavatedvariants/api/client/ModelData.java b/src/main/java/dev/lukebemish/excavatedvariants/api/client/ModelData.java new file mode 100644 index 00000000..9a180502 --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/api/client/ModelData.java @@ -0,0 +1,25 @@ +package dev.lukebemish.excavatedvariants.api.client; + +import java.util.Collection; +import java.util.Map; + +import com.google.gson.JsonElement; + +import net.minecraft.resources.ResourceLocation; + +/** + * A structure which provides data about a stone model; it should be able to produce textures, during which it should + * emit a series of string keys, each corresponding to a single texture, as well as a {@link NamedTextureProvider} which + * can produce that texture, and a collection of {@link Face}s which that texture appears on. It will later be asked to + * assemble a full model given a map of the same texture string keys provided earlier to the actual texture locations. + */ +public interface ModelData { + JsonElement assembleModel(Map textures); + + void produceTextures(TextureConsumer textureProducerConsumer); + + @FunctionalInterface + interface TextureConsumer { + void accept(String textureName, NamedTextureProvider texture, Collection providedFaces); + } +} diff --git a/src/main/java/dev/lukebemish/excavatedvariants/api/client/NamedTextureProvider.java b/src/main/java/dev/lukebemish/excavatedvariants/api/client/NamedTextureProvider.java new file mode 100644 index 00000000..0a1c397e --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/api/client/NamedTextureProvider.java @@ -0,0 +1,12 @@ +package dev.lukebemish.excavatedvariants.api.client; + +import dev.lukebemish.dynamicassetgenerator.api.client.generators.TexSource; + +import java.util.function.Function; + +/** + * Can provide a texture given a method for wrapping texture sources. This should be used to wrap any direct texture + * reader, in order to support animations. + */ +public interface NamedTextureProvider extends Function { +} diff --git a/src/main/java/dev/lukebemish/excavatedvariants/api/client/ResourceProvider.java b/src/main/java/dev/lukebemish/excavatedvariants/api/client/ResourceProvider.java new file mode 100644 index 00000000..6baa40a2 --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/api/client/ResourceProvider.java @@ -0,0 +1,28 @@ +package dev.lukebemish.excavatedvariants.api.client; + +import dev.lukebemish.dynamicassetgenerator.api.ResourceGenerationContext; +import dev.lukebemish.excavatedvariants.api.Listener; +import dev.lukebemish.excavatedvariants.api.data.Ore; +import dev.lukebemish.excavatedvariants.api.data.Stone; +import net.minecraft.resources.ResourceKey; +import net.minecraft.world.level.block.Block; +import org.jspecify.annotations.Nullable; + +import java.util.List; + +public interface ResourceProvider extends Listener { + /** + * Provides stone textures to the resource collector. + */ + default @Nullable List provideStoneTextures(Stone stone, ResourceGenerationContext context) { + return null; + } + + /** + * Provides ore textures to the resource collector. + */ + default @Nullable List provideOreTextures(Ore ore, ResourceKey selectedBlock, ResourceGenerationContext context) { + return null; + } + +} diff --git a/src/main/java/dev/lukebemish/excavatedvariants/api/client/TexFaceProvider.java b/src/main/java/dev/lukebemish/excavatedvariants/api/client/TexFaceProvider.java new file mode 100644 index 00000000..88f42e7c --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/api/client/TexFaceProvider.java @@ -0,0 +1,11 @@ +package dev.lukebemish.excavatedvariants.api.client; + +import org.jspecify.annotations.NonNull; + +/** + * Represents the model of an ore block; used to provide a {@link TextureProducer} for any face of the block. + */ +@FunctionalInterface +public interface TexFaceProvider { + @NonNull TextureProducer get(Face face); +} diff --git a/src/main/java/dev/lukebemish/excavatedvariants/api/client/TextureProducer.java b/src/main/java/dev/lukebemish/excavatedvariants/api/client/TextureProducer.java new file mode 100644 index 00000000..0737ae70 --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/api/client/TextureProducer.java @@ -0,0 +1,23 @@ +package dev.lukebemish.excavatedvariants.api.client; + +import dev.lukebemish.dynamicassetgenerator.api.client.generators.TexSource; + +import java.util.function.Function; + +/** + * A function which produces a new ore texture source from the given texture sources. + */ +@FunctionalInterface +public interface TextureProducer { + /** + * Produces a new ore texture source from the given texture sources. + * @param newStoneSource the texture source of the stone to be transferred to + * @param oldStoneSource the texture source of the stone to be transferred from + * @return the new texture source + */ + TexSource produce(Function newStoneSource, Function oldStoneSource); + + interface SourceWrapper { + TexSource wrap(TexSource source); + } +} diff --git a/src/main/java/dev/lukebemish/excavatedvariants/api/client/package-info.java b/src/main/java/dev/lukebemish/excavatedvariants/api/client/package-info.java new file mode 100644 index 00000000..3cd03a34 --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/api/client/package-info.java @@ -0,0 +1,4 @@ +@NullMarked +package dev.lukebemish.excavatedvariants.api.client; + +import org.jspecify.annotations.NullMarked; \ No newline at end of file diff --git a/src/main/java/dev/lukebemish/excavatedvariants/api/data/DetailedStone.java b/src/main/java/dev/lukebemish/excavatedvariants/api/data/DetailedStone.java new file mode 100644 index 00000000..230ec968 --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/api/data/DetailedStone.java @@ -0,0 +1,131 @@ +package dev.lukebemish.excavatedvariants.api.data; + +import com.mojang.datafixers.util.Either; +import com.mojang.datafixers.util.Pair; +import com.mojang.serialization.Codec; +import com.mojang.serialization.DataResult; +import com.mojang.serialization.codecs.RecordCodecBuilder; +import dev.lukebemish.excavatedvariants.api.RegistryKeys; +import dev.lukebemish.excavatedvariants.impl.platform.Services; +import net.minecraft.resources.ResourceKey; +import net.minecraft.resources.ResourceLocation; + +import java.util.*; +import java.util.stream.Collectors; + +public final class DetailedStone { + private static final Codec CODEC = RecordCodecBuilder.create(instance -> instance.group( + ResourceKey.codec(RegistryKeys.STONE).fieldOf("stone").forGetter(PartialDetailedStone::stone), + Codec.STRING.listOf().optionalFieldOf("required_mods").forGetter(PartialDetailedStone::requiredMods), + Codec.BOOL.optionalFieldOf("generating", false).forGetter(PartialDetailedStone::generating) + ).apply(instance, PartialDetailedStone::new)); + private record PartialDetailedStone(ResourceKey stone, Optional> requiredMods, boolean generating) { + public DetailedStone toDetailedStone(ResourceLocation key) { + return new DetailedStone(stone, requiredMods.orElse(List.of(key.getNamespace())), generating); + } + } + private static final Codec, PartialDetailedStone>> EITHER_CODEC = Codec.either(ResourceKey.codec(RegistryKeys.STONE), CODEC); + public static final Codec> MAP_CODEC = Codec.unboundedMap(ResourceLocation.CODEC, EITHER_CODEC) + .xmap( + map -> + map.entrySet().stream() + .map(e -> new Pair<>(e.getKey(), e.getValue().map(k -> new DetailedStone(k, List.of(e.getKey().getNamespace()), false), partial -> partial.toDetailedStone(e.getKey())))) + .collect(Collectors.toMap(Pair::getFirst, Pair::getSecond)), + map -> + map.entrySet().stream() + .collect(Collectors.toMap(Map.Entry::getKey, m -> { + if (m.getValue().modIds.size() == 1 && m.getValue().modIds.get(0).equals(m.getKey().getNamespace()) && !m.getValue().isGenerating()) { + return Either.left(m.getValue().getStone()); + } else { + return Either.right(new PartialDetailedStone( + m.getValue().getStone(), + Optional.of(m.getValue().modIds), + m.getValue().isGenerating() + )); + } + })) + ).flatXmap(map -> { + if (map.values().stream().map(s -> Set.copyOf(s.requiredMods())).collect(Collectors.toSet()).size() == 1 && map.values().stream().noneMatch(DetailedStone::isGenerating)) { + HashMap newMap = new HashMap<>(); + for (Map.Entry entry : map.entrySet()) { + DetailedStone detailedStone = entry.getValue(); + DetailedStone newStone = new DetailedStone.Builder().setModIds(detailedStone.requiredMods()).setStone(detailedStone.getStone()).setGenerating(true).build(); + newMap.put(entry.getKey(), newStone); + } + return DataResult.success(newMap); + } else if (map.values().stream().filter(DetailedStone::isGenerating).map(s -> Set.copyOf(s.requiredMods())).collect(Collectors.toSet()).size() == 1) { + return DataResult.success(map); + } else { + return DataResult.error(() -> "A generating ore block must be present, and all generating ore blocks (or candidates for implicit detection) must require the same mods"); + } + }, DataResult::success); + private final ResourceKey stone; + private final List modIds; + private final boolean generating; + + private DetailedStone(ResourceKey stone, List modIds, boolean generating) { + this.stone = stone; + this.modIds = modIds; + this.generating = generating; + } + + public List requiredMods() { + return this.modIds; + } + + public boolean hasRequiredMods() { + return Services.PLATFORM.getModIds().containsAll(this.modIds); + } + + public ResourceKey getStone() { + return stone; + } + + public boolean isGenerating() { + return generating; + } + + public static class Builder { + private ResourceKey stone; + private List modIds; + private boolean generating = false; + + /** + * @param stone the represented stone of this variant/stone pairing + */ + + public Builder setStone(ResourceKey stone) { + this.stone = stone; + return this; + } + + /** + * @param generating whether this variant/stone pairing can be used to parent new, generated variants + */ + public Builder setGenerating(boolean generating) { + this.generating = generating; + return this; + } + + /** + * @param modIds mods that must be present for the represented variant/stone pairing to be recognized + */ + public Builder setModIds(List modIds) { + this.modIds = modIds; + return this; + } + + public DetailedStone build() { + Objects.requireNonNull(stone); + Objects.requireNonNull(modIds); + return new DetailedStone(stone, modIds, generating); + } + + public static Builder of(DetailedStone key) { + return new Builder() + .setStone(key.getStone()) + .setGenerating(key.isGenerating()) + .setModIds(key.modIds); + } + } +} diff --git a/src/main/java/dev/lukebemish/excavatedvariants/api/data/GroundType.java b/src/main/java/dev/lukebemish/excavatedvariants/api/data/GroundType.java new file mode 100644 index 00000000..fc5cbcb3 --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/api/data/GroundType.java @@ -0,0 +1,39 @@ +package dev.lukebemish.excavatedvariants.api.data; + +import com.mojang.serialization.Codec; +import dev.lukebemish.excavatedvariants.impl.RegistriesImpl; +import net.minecraft.core.Holder; +import net.minecraft.core.registries.Registries; +import net.minecraft.resources.ResourceKey; +import net.minecraft.tags.TagKey; +import net.minecraft.world.level.block.Block; + +public final class GroundType { + public static final Codec CODEC = Codec.unit(GroundType::new); + + private GroundType() {} + + public Holder getHolder() { + return RegistriesImpl.GROUND_TYPE_REGISTRY.wrapAsHolder(this); + } + + public ResourceKey getKeyOrThrow() { + return getHolder().unwrapKey().orElseThrow(() -> new IllegalStateException("Unregistered ground type")); + } + + public static class Builder { + // More data may be stored here in the future + + public GroundType build() { + return new GroundType(); + } + } + + public TagKey getOreTagKey() { + return TagKey.create(Registries.BLOCK, getKeyOrThrow().location().withPrefix("ores_in_ground_type/")); + } + + public TagKey getStoneTagKey() { + return TagKey.create(Registries.BLOCK, getKeyOrThrow().location().withPrefix("stones_in_ground_type/")); + } +} diff --git a/src/main/java/dev/lukebemish/excavatedvariants/api/data/Ore.java b/src/main/java/dev/lukebemish/excavatedvariants/api/data/Ore.java new file mode 100644 index 00000000..b3237a56 --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/api/data/Ore.java @@ -0,0 +1,253 @@ +package dev.lukebemish.excavatedvariants.api.data; + +import com.mojang.serialization.Codec; +import com.mojang.serialization.codecs.RecordCodecBuilder; +import dev.lukebemish.excavatedvariants.api.RegistryKeys; +import dev.lukebemish.excavatedvariants.api.data.modifier.Flag; +import dev.lukebemish.excavatedvariants.api.data.modifier.Modifier; +import dev.lukebemish.excavatedvariants.impl.ExcavatedVariants; +import dev.lukebemish.excavatedvariants.impl.ModLifecycle; +import dev.lukebemish.excavatedvariants.impl.RegistriesImpl; +import net.minecraft.core.Holder; +import net.minecraft.core.registries.BuiltInRegistries; +import net.minecraft.core.registries.Registries; +import net.minecraft.resources.ResourceKey; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.tags.TagKey; +import net.minecraft.world.level.block.Block; +import org.jetbrains.annotations.ApiStatus; +import org.jetbrains.annotations.Contract; +import org.jspecify.annotations.Nullable; + +import java.util.*; +import java.util.stream.Collectors; + +public final class Ore { + public static final Codec CODEC = RecordCodecBuilder.create(i -> i.group( + ResourceLocation.CODEC.listOf().fieldOf("tags").forGetter(o -> o.tags), + DetailedStone.MAP_CODEC.fieldOf("blocks").forGetter(o -> o.blocks), + Codec.unboundedMap(Codec.STRING, Codec.STRING).fieldOf("translations").forGetter(o -> o.translations), + ResourceKey.codec(RegistryKeys.GROUND_TYPE).listOf().xmap(Set::copyOf, List::copyOf).fieldOf("types").forGetter(o -> o.types) + ).apply(i, Ore::new)); + + public final List tags; + private final Map blocks; + private @Nullable Map, ResourceKey> blocksBaked; + public final Set> originalStones; + public final Set> originalBlocks; + private final Set> originalStonesPrivate; + private final Set> originalBlocksPrivate; + private @Nullable Map, ResourceKey> blocksBakedInverse; + private @Nullable Map, ResourceKey> generatingBlocks; + public final Map translations; + public final Set> types; + private boolean baked = false; + + private Ore(List tags, Map blocks, Map translations, Set> types) { + this.tags = tags; + Set> modLists = new HashSet<>(); + // sanity check on the required mods for generating variants + Map blocksCopy = new HashMap<>(blocks); + for (var entry : blocks.entrySet()) { + if (entry.getValue().isGenerating()) { + modLists.add(Set.copyOf(entry.getValue().requiredMods())); + if (modLists.size() > 1) { + ExcavatedVariants.LOGGER.error( + "Ore " + getKeyOrThrow().location() + " has multiple generating blocks with different required mods, and will be disabled: " + + modLists.stream().map(s -> "["+String.join(", ", s)+"]").collect(Collectors.joining("; ")) + ); + blocksCopy = Collections.emptyMap(); + break; + } + } + } + this.blocks = blocksCopy; + this.translations = translations; + this.types = types; + + this.originalStonesPrivate = new HashSet<>(); + this.originalBlocksPrivate = new HashSet<>(); + this.originalStones = Collections.unmodifiableSet(this.originalStonesPrivate); + this.originalBlocks = Collections.unmodifiableSet(this.originalBlocksPrivate); + bakeOriginal(); + } + + private void bakeOriginal() { + Map, ResourceKey> baked = new IdentityHashMap<>(); + Map, ResourceKey> bakedInverse = new IdentityHashMap<>(); + Map, ResourceKey> generatingBlocks = new IdentityHashMap<>(); + this.originalBlocksPrivate.clear(); + this.originalStonesPrivate.clear(); + var iterator = blocks.entrySet().iterator(); + while (iterator.hasNext()) { + var entry = iterator.next(); + if (entry.getValue().hasRequiredMods()) { + ResourceKey block = ResourceKey.create(Registries.BLOCK, entry.getKey()); + baked.put(block, entry.getValue().getStone()); + bakedInverse.put(entry.getValue().getStone(), block); + this.originalBlocksPrivate.add(block); + this.originalStonesPrivate.add(entry.getValue().getStone()); + if (entry.getValue().isGenerating()) { + generatingBlocks.put(block, entry.getValue().getStone()); + } + } else { + iterator.remove(); + } + } + this.blocksBaked = Collections.unmodifiableMap(baked); + this.blocksBakedInverse = Collections.unmodifiableMap(bakedInverse); + this.generatingBlocks = Collections.unmodifiableMap(generatingBlocks); + } + + public Map, ResourceKey> getBlocks() { + return blocksBaked; + } + + public Map, ResourceKey> getGeneratingBlocks() { + return generatingBlocks; + } + + public Map, ResourceKey> getStones() { + return blocksBakedInverse; + } + + @ApiStatus.Internal + public void addPossibleVariant(Stone stone, ResourceLocation output) { + if (ModLifecycle.getLifecyclePhase() != ModLifecycle.PRE_REGISTRATION) { + throw new IllegalStateException("Cannot add possible variant except during pre-registration"); + } + blocks.put(output, new DetailedStone.Builder().setModIds(List.of(ExcavatedVariants.MOD_ID)).setStone(stone.getKeyOrThrow()).setGenerating(false).build()); + } + + @ApiStatus.Internal + public void modifyOriginal(Modifier modifier) { + for (var entry : this.blocksBaked.entrySet()) { + Stone stone = RegistriesImpl.STONE_REGISTRY.get(entry.getValue()); + if (stone == null) throw new IllegalStateException("Stone " + entry.getValue().location() + " is not registered but is referenced by ore " + getKeyOrThrow().location()); + if (modifier.variantFilter.matches(this, stone, entry.getKey().location())) { + if (modifier.flags.contains(Flag.DISABLE)) { + blocks.remove(entry.getKey().location()); + } else if (modifier.flags.contains(Flag.NON_GENERATING)) { + blocks.put(entry.getKey().location(), DetailedStone.Builder.of(blocks.get(entry.getKey().location())).setGenerating(false).build()); + } + } + } + } + + private void bakeVariants() { + if (baked) return; + baked = true; + Map, ResourceKey> baked = new HashMap<>(); + Map, ResourceKey> bakedInverse = new IdentityHashMap<>(); + for (var entry : blocks.entrySet()) { + if (BuiltInRegistries.BLOCK.containsKey(entry.getKey())) { + ResourceKey block = ResourceKey.create(Registries.BLOCK, entry.getKey()); + baked.put(block, entry.getValue().getStone()); + bakedInverse.put(entry.getValue().getStone(), block); + } + } + blocksBaked = Collections.unmodifiableMap(baked); + blocksBakedInverse = Collections.unmodifiableMap(bakedInverse); + this.blocks.clear(); + } + + @ApiStatus.Internal + public synchronized void bake() { + if (ModLifecycle.getLifecyclePhase() == ModLifecycle.PRE_INITIALIZATION) { + bakeOriginal(); + } else { + bakeVariants(); + } + } + + @Contract(value = "_ -> new", pure = true) + public static Ore merge(List ores) { + List tags = new ArrayList<>(); + Set tagsSet = new HashSet<>(); + Map blocks = new HashMap<>(); + Map translation = new HashMap<>(); + Set> types = new HashSet<>(); + for (Ore ore : ores) { + for (ResourceLocation alternativeName : ore.tags) { + if (!tagsSet.contains(alternativeName)) { + tagsSet.add(alternativeName); + tags.add(alternativeName); + } + } + blocks.putAll(ore.blocks); + translation.putAll(ore.translations); + types.addAll(ore.types); + } + return new Ore(tags, blocks, translation, types); + } + + public Holder getHolder() { + return RegistriesImpl.ORE_REGISTRY.wrapAsHolder(this); + } + + public ResourceKey getKeyOrThrow() { + return getHolder().unwrapKey().orElseThrow(() -> new IllegalStateException("Unregistered ore")); + } + + public boolean isNotOriginal(ResourceKey stone) { + return !originalStones.contains(stone); + } + + public static class Builder { + private @Nullable List tags; + private @Nullable Map blocks; + private @Nullable Map translations; + private @Nullable Set> types; + + /** + * @param tags tags which should be added to variants of this ore + */ + public Builder setTags(List tags) { + this.tags = tags; + return this; + } + + /** + * @param blocks a map from block IDs to {@link DetailedStone}s which represents potential variant/stone + * pairings for this ore + */ + public Builder setBlocks(Map blocks) { + this.blocks = blocks; + return this; + } + + /** + * @param translations a map from language codes (e.g. {@code "en_us"}) to translated names for this stone. + * Translations will be prepended by the stone name, unless the translation contains + * {@code "%s"}, in which case the stone name will be inserted at that location. + */ + public Builder setTranslations(Map translations) { + this.translations = translations; + return this; + } + + /** + * @param types the types of ground which this ore can generate in + */ + public Builder setTypes(Set> types) { + this.types = types; + return this; + } + + public Ore build() { + Objects.requireNonNull(tags); + Objects.requireNonNull(blocks); + Objects.requireNonNull(translations); + Objects.requireNonNull(types); + return new Ore(tags, blocks, translations, types); + } + } + + public TagKey getTagKey() { + return TagKey.create(Registries.BLOCK, getKeyOrThrow().location().withPrefix("ores/")); + } + + public TagKey getConvertibleTagKey() { + return TagKey.create(Registries.BLOCK, getKeyOrThrow().location().withPrefix("ores_convertible/")); + } +} diff --git a/src/main/java/dev/lukebemish/excavatedvariants/api/data/Stone.java b/src/main/java/dev/lukebemish/excavatedvariants/api/data/Stone.java new file mode 100644 index 00000000..3c0ade02 --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/api/data/Stone.java @@ -0,0 +1,100 @@ +package dev.lukebemish.excavatedvariants.api.data; + +import com.mojang.serialization.Codec; +import com.mojang.serialization.codecs.RecordCodecBuilder; +import dev.lukebemish.excavatedvariants.api.RegistryKeys; +import dev.lukebemish.excavatedvariants.impl.RegistriesImpl; +import net.minecraft.core.Holder; +import net.minecraft.core.registries.Registries; +import net.minecraft.resources.ResourceKey; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.tags.TagKey; +import net.minecraft.world.level.block.Block; + +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; + +/** + * A stone is a block which ores generate in. + */ +public final class Stone { + public static final Codec CODEC = RecordCodecBuilder.create(i -> i.group( + Codec.unboundedMap(Codec.STRING, Codec.STRING).fieldOf("translations").forGetter(s -> s.translations), + ResourceKey.codec(Registries.BLOCK).fieldOf("block").forGetter(s -> s.block), + ResourceKey.codec(RegistryKeys.GROUND_TYPE).listOf().xmap(Set::copyOf, List::copyOf).fieldOf("types").forGetter(o -> o.types), + ResourceLocation.CODEC.listOf().fieldOf("ore_tags").forGetter(o -> o.oreTags) + ).apply(i, Stone::new)); + + public final Map translations; + public final ResourceKey block; + public final Set> types; + public final List oreTags; + + private Stone(Map translations, ResourceKey block, Set> types, List oreTags) { + this.translations = translations; + this.block = block; + this.types = types; + this.oreTags = oreTags; + } + + public Holder getHolder() { + return RegistriesImpl.STONE_REGISTRY.wrapAsHolder(this); + } + + public ResourceKey getKeyOrThrow() { + return getHolder().unwrapKey().orElseThrow(() -> new IllegalStateException("Unregistered stone")); + } + + public static class Builder { + private Map translations; + private ResourceKey block; + private Set> types; + private List oreTags; + + /** + * @param translations a map from language codes (e.g. {@code "en_us"}) to translated names for this stone + */ + public Builder setTranslations(Map translations) { + this.translations = translations; + return this; + } + + /** + * @param block the block which this stone represents + */ + public Builder setBlock(ResourceKey block) { + this.block = block; + return this; + } + + /** + * @param types the types of ground which this stone can generate ores in + */ + public Builder setTypes(Set> types) { + this.types = types; + return this; + } + + /** + * @param oreTags tags which should be added to ores which generate in this stone + */ + public Builder setOreTags(List oreTags) { + this.oreTags = oreTags; + return this; + } + + public Stone build() { + Objects.requireNonNull(block); + Objects.requireNonNull(translations); + Objects.requireNonNull(types); + Objects.requireNonNull(oreTags); + return new Stone(translations, block, types, oreTags); + } + } + + public TagKey getOreTagKey() { + return TagKey.create(Registries.BLOCK, getKeyOrThrow().location().withPrefix("ores_in_stone/")); + } +} diff --git a/src/main/java/dev/lukebemish/excavatedvariants/api/data/filter/VariantFilter.java b/src/main/java/dev/lukebemish/excavatedvariants/api/data/filter/VariantFilter.java new file mode 100644 index 00000000..84853962 --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/api/data/filter/VariantFilter.java @@ -0,0 +1,23 @@ +package dev.lukebemish.excavatedvariants.api.data.filter; + +import com.mojang.datafixers.util.Either; +import com.mojang.serialization.Codec; +import com.mojang.serialization.DataResult; +import dev.lukebemish.excavatedvariants.api.data.Ore; +import dev.lukebemish.excavatedvariants.api.data.Stone; +import dev.lukebemish.excavatedvariants.impl.data.filter.ObjectVariantFilter; +import dev.lukebemish.excavatedvariants.impl.data.filter.StringHeldVariantFilter; +import net.minecraft.resources.ResourceLocation; + +public interface VariantFilter { + Codec CODEC = Codec.lazyInitialized(() -> Codec.either(StringHeldVariantFilter.CODEC, ObjectVariantFilter.CODEC) + .flatXmap(e -> e.map(DataResult::success, DataResult::success), (VariantFilter f) -> { + if (f instanceof StringHeldVariantFilter single) + return DataResult.success(Either.left(single)); + if (f instanceof ObjectVariantFilter objectFilter) + return DataResult.success(Either.right(objectFilter)); + return DataResult.error(() -> "Not a serializable filter: " + f); + })); + + boolean matches(Ore ore, Stone stone, ResourceLocation block); +} diff --git a/src/main/java/dev/lukebemish/excavatedvariants/api/data/filter/package-info.java b/src/main/java/dev/lukebemish/excavatedvariants/api/data/filter/package-info.java new file mode 100644 index 00000000..bf6dee7a --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/api/data/filter/package-info.java @@ -0,0 +1,4 @@ +@NullMarked +package dev.lukebemish.excavatedvariants.api.data.filter; + +import org.jspecify.annotations.NullMarked; \ No newline at end of file diff --git a/src/main/java/dev/lukebemish/excavatedvariants/api/data/modifier/BlockPropsModifier.java b/src/main/java/dev/lukebemish/excavatedvariants/api/data/modifier/BlockPropsModifier.java new file mode 100644 index 00000000..be24aa5f --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/api/data/modifier/BlockPropsModifier.java @@ -0,0 +1,28 @@ +package dev.lukebemish.excavatedvariants.api.data.modifier; + +import net.minecraft.util.valueproviders.IntProvider; + +import java.util.function.Consumer; + +/** + * A modifier which can be applied to a block's properties. + */ +public interface BlockPropsModifier { + /** + * Optionally, change the block's destroy time. + * @param consumer accepts a new destroy time + */ + default void setDestroyTime(Consumer consumer) {} + + /** + * Optionally, change the block's explosion resistance. + * @param consumer accepts a new explosion resistance + */ + default void setExplosionResistance(Consumer consumer) {} + + /** + * Optionally, change how the block drops experience + * @param consumer accepts a new experience provider + */ + default void setXpDropped(Consumer consumer) {} +} diff --git a/src/main/java/dev/lukebemish/excavatedvariants/api/data/modifier/Flag.java b/src/main/java/dev/lukebemish/excavatedvariants/api/data/modifier/Flag.java new file mode 100644 index 00000000..edb43350 --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/api/data/modifier/Flag.java @@ -0,0 +1,40 @@ +package dev.lukebemish.excavatedvariants.api.data.modifier; + +import com.mojang.serialization.Codec; +import net.minecraft.util.StringRepresentable; +import org.jspecify.annotations.NonNull; + +import java.util.Locale; + +/** + * Flags that can be applied to variants. + *

Note that the values of this enum are not considered to be an API surface; more flags may be added at any time. + */ +public enum Flag implements StringRepresentable { + /** + * The variant should drop whatever its original block would drop, unless silk touch is used. Note that this flag + * is irrelevant for any ore blocks that have the behaviour of dropping "raw ore chunks" or the like, and is only + * relevant for when the original block drops itself. + */ + ORIGINAL_WITHOUT_SILK, + /** + * The variant should always drop whatever its original block would drop, even if silk touch is used. + */ + ORIGINAL_ALWAYS, + /** + * The variant should not be created or recognized by the mod at all. + */ + DISABLE, + /** + * The mod is still aware of this variant, but it is not to be used as a parent to generate new variants. + */ + NON_GENERATING; + + public static final Codec CODEC = StringRepresentable.fromEnum(Flag::values); + + @Override + @NonNull + public String getSerializedName() { + return name().toLowerCase(Locale.ROOT); + } +} diff --git a/src/main/java/dev/lukebemish/excavatedvariants/api/data/modifier/Modifier.java b/src/main/java/dev/lukebemish/excavatedvariants/api/data/modifier/Modifier.java new file mode 100644 index 00000000..fd5a5bbc --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/api/data/modifier/Modifier.java @@ -0,0 +1,109 @@ +package dev.lukebemish.excavatedvariants.api.data.modifier; + +import com.mojang.serialization.Codec; +import com.mojang.serialization.DataResult; +import com.mojang.serialization.codecs.RecordCodecBuilder; +import dev.lukebemish.excavatedvariants.api.data.filter.VariantFilter; +import dev.lukebemish.excavatedvariants.impl.RegistriesImpl; +import dev.lukebemish.excavatedvariants.impl.data.modifier.BlockPropsModifierImpl; +import net.minecraft.core.Holder; +import net.minecraft.resources.ResourceKey; +import net.minecraft.resources.ResourceLocation; +import org.jspecify.annotations.Nullable; + +import java.util.*; + +public class Modifier { + public static final Codec CODEC = RecordCodecBuilder.create(instance -> instance.group( + VariantFilter.CODEC.fieldOf("filter").forGetter(m -> m.variantFilter), + BlockPropsModifierImpl.CODEC.flatXmap(DataResult::success, p -> { + if (p instanceof BlockPropsModifierImpl impl) + return DataResult.success(impl); + return DataResult.error(() -> "Not a serializable modifier: " + p); + }).optionalFieldOf("properties").forGetter(m -> Optional.ofNullable(m.properties)), + Flag.CODEC.listOf().xmap(Set::copyOf, List::copyOf).optionalFieldOf("flags", Set.of()).forGetter(m -> m.flags), + ResourceLocation.CODEC.listOf().optionalFieldOf("tags", List.of()).forGetter(m -> m.tags) + ).apply(instance, (filter, properties, flags, tags) -> new Modifier(filter, properties.orElse(null), tags, flags))); + + public final VariantFilter variantFilter; + public final @Nullable BlockPropsModifier properties; + public final List tags; + public final Set flags; + + public Modifier(VariantFilter variantFilter, @Nullable BlockPropsModifier properties, List tags, Set flags) { + this.variantFilter = variantFilter; + this.properties = properties; + this.tags = tags; + this.flags = flags; + } + + public Holder getHolder() { + return RegistriesImpl.MODIFIER_REGISTRY.wrapAsHolder(this); + } + + public final ResourceKey getKeyOrThrow() { + return getHolder().unwrapKey().orElseThrow(() -> new IllegalStateException("Unregistered modifier")); + } + + public static class Builder { + private @Nullable VariantFilter variantFilter; + private @Nullable BlockPropsModifier properties; + private final List tags = new ArrayList<>(); + private final Set flags = new HashSet<>(); + + /** + * @param variantFilter a filter that determines which variants this modifier applies to + */ + public Builder setVariantFilter(VariantFilter variantFilter) { + this.variantFilter = variantFilter; + return this; + } + + /** + * @param properties an optional modifier for block properties of generated variants + */ + public Builder setProperties(BlockPropsModifier properties) { + this.properties = properties; + return this; + } + + /** + * @param tags tags that should be applied to generated variants + */ + public Builder setTags(List tags) { + this.tags.clear(); + this.tags.addAll(tags); + return this; + } + + /** + * @param tag a tag that should be applied to generated variants + */ + public Builder addTag(ResourceLocation tag) { + this.tags.add(tag); + return this; + } + + /** + * @param flags flags that should be applied to generated variants + */ + public Builder setFlags(Collection flags) { + this.flags.clear(); + this.flags.addAll(flags); + return this; + } + + /** + * @param flag a flag that should be applied to generated variants + */ + public Builder addFlag(Flag flag) { + this.flags.add(flag); + return this; + } + + public Modifier build() { + Objects.requireNonNull(this.variantFilter); + return new Modifier(variantFilter, properties, tags, flags); + } + } +} diff --git a/src/main/java/dev/lukebemish/excavatedvariants/api/data/modifier/package-info.java b/src/main/java/dev/lukebemish/excavatedvariants/api/data/modifier/package-info.java new file mode 100644 index 00000000..2bf12960 --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/api/data/modifier/package-info.java @@ -0,0 +1,4 @@ +@NullMarked +package dev.lukebemish.excavatedvariants.api.data.modifier; + +import org.jspecify.annotations.NullMarked; \ No newline at end of file diff --git a/src/main/java/dev/lukebemish/excavatedvariants/api/data/package-info.java b/src/main/java/dev/lukebemish/excavatedvariants/api/data/package-info.java new file mode 100644 index 00000000..547244f1 --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/api/data/package-info.java @@ -0,0 +1,4 @@ +@NullMarked +package dev.lukebemish.excavatedvariants.api.data; + +import org.jspecify.annotations.NullMarked; \ No newline at end of file diff --git a/src/main/java/dev/lukebemish/excavatedvariants/api/package-info.java b/src/main/java/dev/lukebemish/excavatedvariants/api/package-info.java new file mode 100644 index 00000000..5ee3c652 --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/api/package-info.java @@ -0,0 +1,4 @@ +@NullMarked +package dev.lukebemish.excavatedvariants.api; + +import org.jspecify.annotations.NullMarked; \ No newline at end of file diff --git a/src/main/java/dev/lukebemish/excavatedvariants/impl/BlockAddedCallback.java b/src/main/java/dev/lukebemish/excavatedvariants/impl/BlockAddedCallback.java new file mode 100644 index 00000000..6c21732b --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/impl/BlockAddedCallback.java @@ -0,0 +1,73 @@ +package dev.lukebemish.excavatedvariants.impl; + +import dev.lukebemish.excavatedvariants.api.data.Stone; +import dev.lukebemish.excavatedvariants.impl.platform.Services; +import net.minecraft.resources.ResourceKey; +import net.minecraft.world.level.block.Block; + +import java.util.*; + +public class BlockAddedCallback { + + private static boolean registering = false; + private static boolean ready = false; + + public static void setReady() { + ready = true; + } + + public static void register() { + if (ready && ModLifecycle.getLifecyclePhase() == ModLifecycle.REGISTRATION && !registering) { + registering = true; + ExcavatedVariants.VariantFuture future; + while ((future = ExcavatedVariants.READY_QUEUE.poll()) != null) { + Services.PLATFORM.register(future); + } + registering = false; + } + } + + public static void onRegister(Block value, ResourceKey blockKey) { + if (ModLifecycle.getLifecyclePhase() != ModLifecycle.REGISTRATION) { + return; + } + List futures = ExcavatedVariants.NEEDED_KEYS.get(blockKey); + if (futures != null) { + Map>> toRemove = new IdentityHashMap<>(); + for (ExcavatedVariants.VariantFuture future : futures) { + if (blockKey == future.stone.block && future.foundStone == null) { + future.foundStone = value; + } else if (future.foundOre == null) { + future.foundOre = value; + future.foundOreKey = blockKey; + ResourceKey sourceStoneKey = future.ore.getBlocks().get(blockKey); + future.foundSourceStone = Objects.requireNonNull(RegistriesImpl.STONE_REGISTRY.get(sourceStoneKey), "No such stone: "+sourceStoneKey.location()); + } + if (future.foundOre != null && future.foundStone != null) { + ExcavatedVariants.READY_QUEUE.add(future); + toRemove.put(future, ExcavatedVariants.REVERSE_NEEDED_KEYS.get(future)); + } + } + if (!toRemove.isEmpty()) { + List> toRemoveKeys = new ArrayList<>(); + for (var entry : toRemove.entrySet()) { + for (var key : entry.getValue()) { + var list = ExcavatedVariants.NEEDED_KEYS.get(key); + if (list == null) continue; + list.remove(entry.getKey()); + if (list.isEmpty()) { + toRemoveKeys.add(key); + } + } + } + if (!toRemoveKeys.isEmpty()) { + for (var key : toRemoveKeys) { + ExcavatedVariants.NEEDED_KEYS.remove(key); + } + } + } + BlockAddedCallback.register(); + ExcavatedVariants.NEEDED_KEYS.remove(blockKey); + } + } +} diff --git a/src/main/java/dev/lukebemish/excavatedvariants/impl/DefaultRegistrationListener.java b/src/main/java/dev/lukebemish/excavatedvariants/impl/DefaultRegistrationListener.java new file mode 100644 index 00000000..a69a31d1 --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/impl/DefaultRegistrationListener.java @@ -0,0 +1,80 @@ +package dev.lukebemish.excavatedvariants.impl; + +import com.google.auto.service.AutoService; +import com.google.gson.JsonElement; +import com.mojang.serialization.Codec; +import com.mojang.serialization.JsonOps; +import dev.lukebemish.defaultresources.api.GlobalResourceManager; +import dev.lukebemish.excavatedvariants.api.RegistrationListener; +import dev.lukebemish.excavatedvariants.api.data.GroundType; +import dev.lukebemish.excavatedvariants.api.data.Ore; +import dev.lukebemish.excavatedvariants.api.data.Stone; +import dev.lukebemish.excavatedvariants.api.data.modifier.Modifier; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.server.packs.resources.Resource; + +import java.io.IOException; +import java.io.Reader; +import java.util.List; +import java.util.function.BiConsumer; + +@AutoService(RegistrationListener.class) +public class DefaultRegistrationListener implements RegistrationListener { + @Override + public void provideEntries(Registrar registrar) { + loadType( + RegistriesImpl.GROUND_TYPE_KEY.location().getPath(), + GroundType.CODEC, + registrar.groundTypes, + true + ); + loadType( + RegistriesImpl.STONE_KEY.location().getPath(), + Stone.CODEC, + registrar.stones, + true + ); + loadType( + RegistriesImpl.ORE_KEY.location().getPath(), + Ore.CODEC, + registrar.ores, + false + ); + loadType( + RegistriesImpl.MODIFIER_KEY.location().getPath(), + Modifier.CODEC, + registrar.modifiers, + true + ); + } + + private static final GlobalResourceManager DATA = GlobalResourceManager.getGlobalData().prefix(ExcavatedVariants.MOD_ID); + + public static void loadType(String prefix, Codec codec, BiConsumer consumer, boolean firstOnly) { + BiConsumer> foundConsumer = (rl, resources) -> resources.forEach(resource -> { + ResourceLocation processed = new ResourceLocation(rl.getNamespace(), rl.getPath().substring(prefix.length()+1, rl.getPath().length() - 5)); + try (Reader reader = resource.openAsReader()) { + JsonElement json = ExcavatedVariants.GSON.fromJson(reader, JsonElement.class); + var t = codec.parse(JsonOps.INSTANCE, json); + if (t.result().isPresent()) { + consumer.accept(processed, t.result().get()); + } else { + //noinspection OptionalGetWithoutIsPresent + ExcavatedVariants.LOGGER.error("Could not parse {} as {}: {}", rl, prefix, t.error().get().message()); + } + } catch (IOException e) { + ExcavatedVariants.LOGGER.error("Could not read {}", rl, e); + } + }); + if (firstOnly) { + DATA.listResources(prefix, rl -> rl.getPath().endsWith(".json")).forEach((rl, r) -> foundConsumer.accept(rl, List.of(r))); + } else { + DATA.listResourceStacks(prefix, rl -> rl.getPath().endsWith(".json")).forEach(foundConsumer); + } + } + + @Override + public int priority() { + return ExcavatedVariants.DEFAULT_COMPAT_PRIORITY; + } +} diff --git a/src/main/java/dev/lukebemish/excavatedvariants/impl/ExcavatedVariants.java b/src/main/java/dev/lukebemish/excavatedvariants/impl/ExcavatedVariants.java new file mode 100644 index 00000000..6bce683c --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/impl/ExcavatedVariants.java @@ -0,0 +1,374 @@ +package dev.lukebemish.excavatedvariants.impl; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import dev.lukebemish.dynamicassetgenerator.api.DataResourceCache; +import dev.lukebemish.dynamicassetgenerator.api.ResourceCache; +import dev.lukebemish.dynamicassetgenerator.api.ResourceGenerationContext; +import dev.lukebemish.dynamicassetgenerator.api.sources.TagSupplier; +import dev.lukebemish.excavatedvariants.api.data.GroundType; +import dev.lukebemish.excavatedvariants.api.data.Ore; +import dev.lukebemish.excavatedvariants.api.data.Stone; +import dev.lukebemish.excavatedvariants.api.data.modifier.BlockPropsModifier; +import dev.lukebemish.excavatedvariants.api.data.modifier.Flag; +import dev.lukebemish.excavatedvariants.api.data.modifier.Modifier; +import dev.lukebemish.excavatedvariants.impl.client.ClientServices; +import dev.lukebemish.excavatedvariants.impl.data.ModConfig; +import dev.lukebemish.excavatedvariants.impl.platform.Services; +import net.minecraft.core.registries.BuiltInRegistries; +import net.minecraft.resources.ResourceKey; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.item.BlockItem; +import net.minecraft.world.item.Item; +import net.minecraft.world.level.block.Block; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.jspecify.annotations.Nullable; + +import java.util.*; +import java.util.function.BiConsumer; +import java.util.function.BiFunction; +import java.util.function.Supplier; + +public final class ExcavatedVariants { + public static final int DEFAULT_COMPAT_PRIORITY = -10; + + private ExcavatedVariants() {} + public static final Gson GSON_PRETTY = new GsonBuilder().setPrettyPrinting().setLenient().create(); + public static final Gson GSON = new GsonBuilder().setLenient().create(); + + public static final String MOD_ID = "excavated_variants"; + + public static final Logger LOGGER = LogManager.getLogger(MOD_ID); + public static final List> ITEMS = new ArrayList<>(); + private static @Nullable ModConfig CONFIG; + public static final DataResourceCache DATA_CACHE = ResourceCache.register(new DataResourceCache(new ResourceLocation(MOD_ID, "data"))); + private static @Nullable Map> NEW_VARIANTS_MAP; + private static final List NEW_VARIANTS = new ArrayList<>(); + public static final Map, List> NEEDED_KEYS = new IdentityHashMap<>(); + public static final Map>> REVERSE_NEEDED_KEYS = new IdentityHashMap<>(); + public static final Deque READY_QUEUE = new ArrayDeque<>(); + public static final Map BLOCKS = new IdentityHashMap<>(); + public static final List COMPLETE_VARIANTS = new ArrayList<>(); + public static final RecipePlanner RECIPE_PLANNER = new RecipePlanner(); + public static @Nullable MappingsCache MAPPINGS_CACHE; + + public synchronized static void setupMap() { + if (ModLifecycle.getLifecyclePhase() != ModLifecycle.PRE_INITIALIZATION) { + return; + } + if (NEW_VARIANTS_MAP == null) { + Map> newVariants = new HashMap<>(); + Map> newVariantsSet = new HashMap<>(); + Map> groundTypeOreMap = new HashMap<>(); + + for (Ore ore : RegistriesImpl.ORE_REGISTRY) { + for (Modifier modifier : RegistriesImpl.MODIFIER_REGISTRY) { + ore.modifyOriginal(modifier); + } + ore.bake(); + if (ore.getBlocks().isEmpty()) continue; + for (ResourceKey groundTypeKey : ore.types) { + var groundType = RegistriesImpl.GROUND_TYPE_REGISTRY.get(groundTypeKey); + if (groundType == null) { + throw new RuntimeException("Ground type " + groundTypeKey.location() + " does not exist, but is referenced by ore " + ore.getHolder().unwrapKey().orElseThrow().location()); + } + groundTypeOreMap.computeIfAbsent(groundType, k -> new ArrayList<>()).add(ore); + } + } + + for (Stone stone : RegistriesImpl.STONE_REGISTRY) { + for (ResourceKey groundTypeKey : stone.types) { + var groundType = RegistriesImpl.GROUND_TYPE_REGISTRY.get(groundTypeKey); + if (groundType == null) { + throw new RuntimeException("Ground type " + groundTypeKey.location() + " does not exist, but is referenced by stone " + stone.getHolder().unwrapKey().orElseThrow().location()); + } + var ores = groundTypeOreMap.getOrDefault(groundType, List.of()); + ore_loop: + for (Ore ore : ores) { + if (ore.getBlocks().isEmpty()) continue; + for (Modifier modifier : RegistriesImpl.MODIFIER_REGISTRY) { + if (modifier.variantFilter.matches(ore, stone, id(computeFullId(ore, stone))) && modifier.flags.contains(Flag.DISABLE)) { + continue ore_loop; + } + } + if (ore.isNotOriginal(stone.getKeyOrThrow())) { + var set = newVariantsSet.computeIfAbsent(ore, k -> new HashSet<>()); + if (set.add(stone)) { + newVariants.computeIfAbsent(ore, k -> new ArrayList<>()).add(stone); + } + } + } + } + } + + NEW_VARIANTS_MAP = newVariants; + } + + ModLifecycle.setLifecyclePhase(ModLifecycle.PRE_REGISTRATION); + } + + public static void init() { + if (ModLifecycle.getLifecyclePhase() != ModLifecycle.PRE_INITIALIZATION) { + return; + } + + RegistriesImpl.bootstrap(); + + setupMap(); + + for (Map.Entry> entry : Objects.requireNonNull(NEW_VARIANTS_MAP, "New variants map was not set up").entrySet()) { + Ore ore = entry.getKey(); + List stones = entry.getValue(); + for (Stone stone : stones) { + String fullId = computeFullId(ore, stone); + VariantFuture future = new VariantFuture(fullId, ore, stone); + ore.addPossibleVariant(stone, new ResourceLocation(ExcavatedVariants.MOD_ID, fullId)); + List> keys = new ArrayList<>(); + for (Map.Entry, ResourceKey> blockEntry : ore.getGeneratingBlocks().entrySet()) { + ResourceKey key = blockEntry.getKey(); + Stone originalStone = RegistriesImpl.STONE_REGISTRY.get(blockEntry.getValue()); + if (originalStone == null) { + throw new IllegalStateException("Nonexistent stone "+blockEntry.getValue().location()+" referenced by ore "+ore.getKeyOrThrow().location()); + } + keys.add(key); + NEEDED_KEYS.computeIfAbsent(key, k -> new ArrayList<>()).add(future); + } + keys.add(stone.block); + NEEDED_KEYS.computeIfAbsent(stone.block, k -> new ArrayList<>()).add(future); + REVERSE_NEEDED_KEYS.put(future, keys); + NEW_VARIANTS.add(future); + } + } + + for (Modifier modifier : RegistriesImpl.MODIFIER_REGISTRY) { + List futures = NEW_VARIANTS.stream().filter(f -> modifier.variantFilter.matches(f.ore, f.stone, id(f.fullId))).toList(); + for (VariantFuture future : futures) { + future.flags.addAll(modifier.flags); + if (modifier.properties != null) { + future.propsModifiers.add(modifier.properties); + } + } + } + + ExcavatedVariants.DATA_CACHE.planSource(RECIPE_PLANNER); + + ExcavatedVariants.DATA_CACHE.tags().queue(new TagSupplier() { + @Override + public Map> apply(ResourceGenerationContext context) { + Map> map = TAG_QUEUE.apply(context); + Map> output = new HashMap<>(); + for (var entry : map.entrySet()) { + for (var rl : entry.getValue()) { + if (entry.getKey().getPath().startsWith("blocks/")) { + if (!BuiltInRegistries.BLOCK.containsKey(rl)) { + continue; + } + } else if (entry.getKey().getPath().startsWith("items/")) { + if (!BuiltInRegistries.ITEM.containsKey(rl)) { + continue; + } + } + output.computeIfAbsent(entry.getKey(), k -> new HashSet<>()).add(rl); + } + } + return output; + } + + // Not worth caching - may change this later depending? + + @Override + public void reset(ResourceGenerationContext context) { + TAG_QUEUE.reset(context); + } + }); + + Services.CREATIVE_TAB_LOADER.get().registerCreativeTab(); + + MAPPINGS_CACHE = MappingsCache.load(); + + ModLifecycle.setLifecyclePhase(ModLifecycle.REGISTRATION); + } + + public static synchronized void initPostRegister() { + if (ModLifecycle.getLifecyclePhase() != ModLifecycle.REGISTRATION) { + return; + } + + for (Ore ore : RegistriesImpl.ORE_REGISTRY) { + ore.bake(); + } + + // No reason to keep any of this around; this way some of it can be GCed... + NEW_VARIANTS.clear(); + Objects.requireNonNull(NEW_VARIANTS_MAP, "New variants map was not set up").clear(); + NEEDED_KEYS.clear(); + REVERSE_NEEDED_KEYS.clear(); + READY_QUEUE.clear(); + + for (Modifier modifier : RegistriesImpl.MODIFIER_REGISTRY) { + if (!modifier.tags.isEmpty()) { + for (Ore ore : RegistriesImpl.ORE_REGISTRY) { + for (var entry : ore.getBlocks().entrySet()) { + var stone = Objects.requireNonNull(RegistriesImpl.STONE_REGISTRY.get(entry.getValue())); + if (modifier.variantFilter.matches(ore, stone, entry.getKey().location())) { + for (ResourceLocation tag : modifier.tags) { + if (tag.getPath().startsWith("blocks/")) + planBlockTag(tag.withPath(tag.getPath().substring(7)), entry.getKey().location()); + else if (tag.getPath().startsWith("items/")) + planItemTag(tag.withPath(tag.getPath().substring(6)), entry.getKey().location()); + } + } + } + } + } + } + + for (Stone stone : RegistriesImpl.STONE_REGISTRY) { + if (BuiltInRegistries.BLOCK.containsKey(stone.block)) { + for (ResourceKey type : stone.types) { + planCombinedTag(Objects.requireNonNull(RegistriesImpl.GROUND_TYPE_REGISTRY.get(type), "Nonexistent ground type " + type.location()).getStoneTagKey().location(), stone.block.location()); + } + } + } + + for (Ore ore : RegistriesImpl.ORE_REGISTRY) { + for (var entry : ore.getBlocks().entrySet()) { + var block = entry.getKey(); + if (BuiltInRegistries.BLOCK.containsKey(block)) { + Stone stone = Objects.requireNonNull(RegistriesImpl.STONE_REGISTRY.get(entry.getValue()), "Nonexistent stone " + ore.getBlocks().get(block).location()); + for (ResourceKey type : ore.types) { + if (!stone.types.contains(type)) continue; + planCombinedTag(Objects.requireNonNull(RegistriesImpl.GROUND_TYPE_REGISTRY.get(type), "Nonexistent ground type " + type.location()).getOreTagKey().location(), block.location()); + } + planCombinedTag(ore.getTagKey().location(), block.location()); + planCombinedTag( + stone.getOreTagKey().location(), + block.location() + ); + } + } + } + + if (getConfig().addConversionRecipes) { + for (VariantFuture future : COMPLETE_VARIANTS) { + planItemTag(future.ore.getConvertibleTagKey().location(), new ResourceLocation(ExcavatedVariants.MOD_ID, future.fullId)); + RECIPE_PLANNER.oreToBaseOreMap.put(future.ore.getConvertibleTagKey(), Objects.requireNonNull(future.foundOreKey)); + } + } + + MiningLevelTagHolder tierHolder = new MiningLevelTagHolder(); + + for (VariantFuture future : COMPLETE_VARIANTS) { + tierHolder.add(future.fullId, future.ore, future.stone); + var id = new ResourceLocation(ExcavatedVariants.MOD_ID, future.fullId); + + for (ResourceLocation tag : future.ore.tags) { + planCombinedTag(tag, id); + } + + for (ResourceLocation tag : future.stone.oreTags) { + planCombinedTag(tag, id); + } + } + + TAG_QUEUE.queue(tierHolder); + + Objects.requireNonNull(MAPPINGS_CACHE, "Mappings cache was not set up").update(); + MAPPINGS_CACHE.save(); + + ModLifecycle.setLifecyclePhase(ModLifecycle.POST); + } + + public static ResourceLocation id(String path) { + return new ResourceLocation(MOD_ID, path); + } + + public static String computeFullId(ResourceLocation ore, ResourceLocation stone) { + return ore.getNamespace() + "__" + + String.join("_", ore.getPath().split("/")) + "__" + stone.getNamespace() + "__" + + String.join("_",stone.getPath().split("/")); + } + + public static String computeFullId(ResourceKey ore, ResourceKey stone) { + return computeFullId(ore.location(), stone.location()); + } + + public static String computeFullId(Ore ore, Stone stone) { + return computeFullId( + ore.getHolder().unwrapKey().orElseThrow(() -> new IllegalStateException("Unregistered ore")), + stone.getHolder().unwrapKey().orElseThrow(() -> new IllegalStateException("Unregistered stone")) + ); + } + + public static final TagSupplier.TagBakery TAG_QUEUE = new TagSupplier.TagBakery(); + + private static void planBlockTag(ResourceLocation tag, ResourceLocation block) { + TAG_QUEUE.queue(rlToBlock(tag), block); + } + + private static void planCombinedTag(ResourceLocation tag, ResourceLocation entry) { + planBlockTag(tag, entry); + planItemTag(tag, entry); + } + + private static void planItemTag(ResourceLocation tag, ResourceLocation item) { + TAG_QUEUE.queue(rlToItem(tag), item); + } + + private static ResourceLocation rlToBlock(ResourceLocation rl) { + return rl.withPrefix("blocks/"); + } + + private static ResourceLocation rlToItem(ResourceLocation rl) { + return rl.withPrefix("items/"); + } + + public static ModConfig getConfig() { + if (CONFIG == null) { + CONFIG = ModConfig.load(); + } + return CONFIG; + } + + public static void registerBlockAndItem(BiConsumer blockRegistrar, BiFunction, Supplier> itemRegistrar, VariantFuture future) { + if (!future.done) { + future.done = true; + ResourceLocation rlToReg = new ResourceLocation(ExcavatedVariants.MOD_ID, future.fullId); + ModifiedOreBlock.setupStaticWrapper(future); + ModifiedOreBlock b = new ModifiedOreBlock(future); + blockRegistrar.accept(rlToReg, b); + Supplier i = itemRegistrar.apply(rlToReg, () -> new BlockItem(b, new Item.Properties())); + ITEMS.add(i); + BLOCKS.put(future, b); + + if (Services.PLATFORM.isClient()) { + ClientServices.RENDER_TYPE_HANDLER.setRenderTypeMipped(b); + } + + COMPLETE_VARIANTS.add(future); + if (Services.PLATFORM.isClient()) { + ExcavatedVariantsClient.setUp(future); + } + } + } + + public static class VariantFuture { + public final Ore ore; + public final Stone stone; + public final String fullId; + public boolean done = false; + public @Nullable Block foundStone = null; + public @Nullable Block foundOre = null; + public @Nullable ResourceKey foundOreKey = null; + public @Nullable Stone foundSourceStone = null; + public final Set flags = new HashSet<>(); + public final List propsModifiers = new ArrayList<>(); + + public VariantFuture(String s, Ore ore, Stone stone) { + this.fullId = s; + this.ore = ore; + this.stone = stone; + } + } +} diff --git a/src/main/java/dev/lukebemish/excavatedvariants/impl/ExcavatedVariantsClient.java b/src/main/java/dev/lukebemish/excavatedvariants/impl/ExcavatedVariantsClient.java new file mode 100644 index 00000000..99dd0fc3 --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/impl/ExcavatedVariantsClient.java @@ -0,0 +1,82 @@ +package dev.lukebemish.excavatedvariants.impl; + +import dev.lukebemish.dynamicassetgenerator.api.PathAwareInputStreamSource; +import dev.lukebemish.dynamicassetgenerator.api.Resettable; +import dev.lukebemish.dynamicassetgenerator.api.ResourceCache; +import dev.lukebemish.dynamicassetgenerator.api.ResourceGenerationContext; +import dev.lukebemish.dynamicassetgenerator.api.client.AssetResourceCache; +import dev.lukebemish.excavatedvariants.impl.client.ItemModelPlanner; +import dev.lukebemish.excavatedvariants.impl.client.ResourceAssembler; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.server.packs.resources.IoSupplier; +import org.jspecify.annotations.NonNull; +import org.jspecify.annotations.Nullable; + +import java.io.InputStream; +import java.util.Set; +import java.util.stream.Collectors; + +public class ExcavatedVariantsClient { + public static final LangBuilder LANG_BUILDER = new LangBuilder(); + + public static final AssetResourceCache ASSET_CACHE = ResourceCache.register(new AssetResourceCache(new ResourceLocation(ExcavatedVariants.MOD_ID, "assets"))); + + public static final ItemModelPlanner ITEM_MODEL_PLANNER = new ItemModelPlanner(); + + public static void init() { + // lang - don't bother caching + ASSET_CACHE.planSource(new PathAwareInputStreamSource() { + @Override + public Set getLocations(ResourceGenerationContext context) { + return LANG_BUILDER.languages().stream().map(s -> new ResourceLocation(ExcavatedVariants.MOD_ID+"_generated", "lang/" + s + ".json")).collect(Collectors.toSet()); + } + + @Override + public IoSupplier get(ResourceLocation outRl, ResourceGenerationContext context) { + return LANG_BUILDER.build(outRl.getPath().substring(5, outRl.getPath().length() - 5)); + } + }); + class ResourceAssemblerSource implements PathAwareInputStreamSource, Resettable { + @Nullable ResourceAssembler assembler = null; + + private synchronized void setup(ResourceGenerationContext context) { + if (assembler == null) { + assembler = new ResourceAssembler(); + for (var future : ExcavatedVariants.COMPLETE_VARIANTS) { + assembler.addFuture(future, context); + } + } + } + + @Override + public @NonNull Set getLocations(ResourceGenerationContext context) { + setup(context); + return assembler.getLocations(context); + } + + @Override + public @Nullable IoSupplier get(ResourceLocation outRl, ResourceGenerationContext context) { + setup(context); + return assembler.get(outRl, context); + } + + @Override + public @Nullable String createCacheKey(ResourceLocation outRl, ResourceGenerationContext context) { + setup(context); + return assembler.createCacheKey(outRl, context); + } + + @Override + public void reset(ResourceGenerationContext context) { + assembler = null; + } + } + ASSET_CACHE.planSource(new ResourceAssemblerSource()); + ASSET_CACHE.planSource(ITEM_MODEL_PLANNER); + } + + public static void setUp(ExcavatedVariants.VariantFuture future) { + ITEM_MODEL_PLANNER.add(future.fullId); + LANG_BUILDER.add(future.fullId, future.stone, future.ore); + } +} diff --git a/src/main/java/dev/lukebemish/excavatedvariants/impl/KnownTiers.java b/src/main/java/dev/lukebemish/excavatedvariants/impl/KnownTiers.java new file mode 100644 index 00000000..7339bff5 --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/impl/KnownTiers.java @@ -0,0 +1,14 @@ +package dev.lukebemish.excavatedvariants.impl; + +import net.minecraft.tags.TagKey; +import net.minecraft.world.item.Tier; +import net.minecraft.world.level.block.Block; + +import java.util.HashMap; +import java.util.Map; + +public final class KnownTiers { + private KnownTiers() {} + + public static final Map, Tier> KNOWN_TIERS = new HashMap<>(); +} diff --git a/src/main/java/dev/lukebemish/excavatedvariants/impl/LangBuilder.java b/src/main/java/dev/lukebemish/excavatedvariants/impl/LangBuilder.java new file mode 100644 index 00000000..53bbec8a --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/impl/LangBuilder.java @@ -0,0 +1,43 @@ +package dev.lukebemish.excavatedvariants.impl; + +import com.mojang.serialization.Codec; +import com.mojang.serialization.JsonOps; +import dev.lukebemish.excavatedvariants.api.data.Ore; +import dev.lukebemish.excavatedvariants.api.data.Stone; +import net.minecraft.server.packs.resources.IoSupplier; + +import java.io.ByteArrayInputStream; +import java.io.InputStream; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; + +public class LangBuilder { + private static final Codec> CODEC = Codec.unboundedMap(Codec.STRING, Codec.STRING); + private final Map> internal = new HashMap<>(); + + public void add(String fullId, Stone stone, Ore ore) { + Set langs = new HashSet<>(stone.translations.keySet()); + langs.addAll(ore.translations.keySet()); + for (String langName : langs) { + String stoneLang = stone.translations.getOrDefault(langName,stone.getKeyOrThrow().location().toLanguageKey("excavated_variants.stone")); + String oreLang = ore.translations.getOrDefault(langName,ore.getKeyOrThrow().location().toLanguageKey("excavated_variants.ore")); + String name = oreLang.contains("%s") ? oreLang.replaceFirst("%s", stoneLang) : stoneLang + " " + oreLang; + add("block."+ExcavatedVariants.MOD_ID+"."+fullId, name); + } + } + + public void add(String key, String name) { + internal.computeIfAbsent("en_us", k -> new HashMap<>()).put(key,name); + } + + public Set languages() { + return internal.keySet(); + } + + public IoSupplier build(String langName) { + String json = ExcavatedVariants.GSON.toJson(CODEC.encodeStart(JsonOps.INSTANCE,internal.getOrDefault(langName, Map.of())).getOrThrow()); + return () -> new ByteArrayInputStream(json.getBytes()); + } +} diff --git a/src/main/java/dev/lukebemish/excavatedvariants/impl/MappingsCache.java b/src/main/java/dev/lukebemish/excavatedvariants/impl/MappingsCache.java new file mode 100644 index 00000000..5bbae207 --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/impl/MappingsCache.java @@ -0,0 +1,77 @@ +package dev.lukebemish.excavatedvariants.impl; + +import com.google.gson.JsonElement; +import com.mojang.serialization.Codec; +import com.mojang.serialization.JsonOps; +import dev.lukebemish.excavatedvariants.impl.platform.Services; +import net.minecraft.resources.ResourceKey; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.level.block.Block; +import org.jspecify.annotations.NonNull; + +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Path; +import java.util.*; + +public class MappingsCache { + public static final Codec CODEC = Codec.unboundedMap(Codec.STRING, ResourceLocation.CODEC.listOf()).xmap(MappingsCache::new, (data) -> data.mappings); + + private final Map> mappings; + + public MappingsCache(Map> mappings) { + this.mappings = new HashMap<>(mappings); + } + + public @NonNull List get(String id) { + return Collections.unmodifiableList(mappings.getOrDefault(id, List.of())); + } + + private static final Path CACHE_PATH = Services.PLATFORM.getModDataFolder().resolve("mappings_cache.json"); + + public static MappingsCache load() { + if (!Files.exists(CACHE_PATH)) { + return new MappingsCache(Map.of()); + } + try (var reader = Files.newBufferedReader(CACHE_PATH, StandardCharsets.UTF_8)) { + JsonElement element = ExcavatedVariants.GSON.fromJson(reader, JsonElement.class); + return CODEC.parse(JsonOps.INSTANCE, element) + .mapError(s -> { + ExcavatedVariants.LOGGER.error("Failed to parse mappings cache: {}", s); + return s; + }).result().orElseThrow(() -> new IOException("Failed to parse mappings cache")); + } catch (IOException e) { + ExcavatedVariants.LOGGER.error("Failed to load mappings cache (loading default)", e); + return new MappingsCache(Map.of()); + } + } + + public void update() { + for (ExcavatedVariants.VariantFuture future : ExcavatedVariants.COMPLETE_VARIANTS) { + List outBlocks = new ArrayList<>(); + outBlocks.add(future.foundOreKey.location()); + for (ResourceKey ore : future.ore.originalBlocks) { + if (ore == future.foundOreKey) continue; + outBlocks.add(ore.location()); + } + outBlocks.add(future.stone.block.location()); + mappings.put(future.fullId, outBlocks); + } + } + + public void save() { + try { + Files.createDirectories(CACHE_PATH.getParent()); + try (var writer = Files.newBufferedWriter(CACHE_PATH, StandardCharsets.UTF_8)) { + JsonElement json = CODEC.encodeStart(JsonOps.INSTANCE, this).mapError(s -> { + ExcavatedVariants.LOGGER.error("Failed to encode mappings cache: {}", s); + return s; + }).result().orElseThrow(() -> new IOException("Failed to encode mappings cache")); + ExcavatedVariants.GSON_PRETTY.toJson(json, writer); + } + } catch (IOException e) { + ExcavatedVariants.LOGGER.error("Failed to save mappings cache", e); + } + } +} diff --git a/src/main/java/dev/lukebemish/excavatedvariants/impl/MiningLevelTagHolder.java b/src/main/java/dev/lukebemish/excavatedvariants/impl/MiningLevelTagHolder.java new file mode 100644 index 00000000..fae1dece --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/impl/MiningLevelTagHolder.java @@ -0,0 +1,98 @@ +package dev.lukebemish.excavatedvariants.impl; + +import com.google.gson.JsonParser; +import com.mojang.serialization.JsonOps; +import dev.lukebemish.dynamicassetgenerator.api.ResourceGenerationContext; +import dev.lukebemish.dynamicassetgenerator.api.sources.TagSupplier; +import dev.lukebemish.dynamicassetgenerator.api.templates.TagFile; +import dev.lukebemish.excavatedvariants.api.data.Ore; +import dev.lukebemish.excavatedvariants.api.data.Stone; +import net.minecraft.resources.ResourceKey; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.tags.TagEntry; +import net.minecraft.tags.TagKey; + +import java.io.IOException; +import java.io.InputStreamReader; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; +import java.util.function.Function; +import java.util.stream.Collectors; + +public class MiningLevelTagHolder implements TagSupplier { + private final ArrayList toCheck = new ArrayList<>(); + public void add(String fullId, Ore ore, Stone stone) { + toCheck.add(new CheckPair(fullId, ore, stone)); + } + + private Set getMiningLevels(ResourceGenerationContext context) { + return KnownTiers.KNOWN_TIERS.keySet().stream().map(TagKey::location).collect(Collectors.toSet()); + } + + @Override + public Map> apply(ResourceGenerationContext context) { + Map> tags = new HashMap<>(); + + Set tagNames = getMiningLevels(context); + Map> tagToMemberMap = tagNames.stream().collect(Collectors.toMap(Function.identity(), name -> getTagMembers(name, context), (l1, l2) -> { + Set out = new HashSet<>(l1); + out.addAll(l2); + return out; + })); + + for (ResourceLocation tierTag : tagNames) { + var members = tagToMemberMap.get(tierTag); + for (var pair : toCheck) { + if (members.contains(pair.stone.block.location()) || pair.ore.getBlocks().keySet().stream().map(ResourceKey::location).allMatch(members::contains)) { + tags.computeIfAbsent(tierTag, k->new HashSet<>()).add(new ResourceLocation(ExcavatedVariants.MOD_ID, pair.fullId)); + } + } + } + + return tags; + } + + private record CheckPair(String fullId, Ore ore, Stone stone) { + } + + private Set getTagMembers(ResourceLocation location, ResourceGenerationContext context) { + String type = location.getPath().split("/")[0]; + Set members = new HashSet<>(); + var toRead = new ResourceLocation(location.getNamespace(), "tags/"+location.getPath()+".json"); + var foundResources = context.getResourceSource().getResourceStack(toRead); + for (var ioSupplier : foundResources) { + try (var is = ioSupplier.get(); + var reader = new InputStreamReader(is, StandardCharsets.UTF_8)) { + var parser = JsonParser.parseReader(reader); + try { + TagFile file = TagFile.CODEC.parse(JsonOps.INSTANCE, parser).getOrThrow(); + if (file.replace()) + members.clear(); + file.values().forEach(value -> + value.build(new TagEntry.Lookup() { + @Override + public ResourceLocation element(ResourceLocation elementLocation) { + return elementLocation; + } + + @Override + public Collection tag(ResourceLocation tagLocation) { + return getTagMembers(new ResourceLocation(tagLocation.getNamespace(), type+"/"+tagLocation.getPath()), context); + } + }, members::add) + ); + } catch (RuntimeException e) { + ExcavatedVariants.LOGGER.error("Issue parsing tag at '{}':",toRead,e); + } + } catch (IOException e) { + ExcavatedVariants.LOGGER.error("Issue reading tag at '{}':",toRead,e); + } + } + return members; + } +} diff --git a/src/main/java/dev/lukebemish/excavatedvariants/impl/ModLifecycle.java b/src/main/java/dev/lukebemish/excavatedvariants/impl/ModLifecycle.java new file mode 100644 index 00000000..f17cb194 --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/impl/ModLifecycle.java @@ -0,0 +1,22 @@ +package dev.lukebemish.excavatedvariants.impl; + +public enum ModLifecycle { + PRE_INITIALIZATION, + PRE_REGISTRATION, + REGISTRATION, + POST; + + private static ModLifecycle LOAD_STATE = PRE_INITIALIZATION; + + static synchronized void setLifecyclePhase(ModLifecycle state) { + LOAD_STATE = state; + } + + public static ModLifecycle getLifecyclePhase() { + return LOAD_STATE; + } + + public boolean above(ModLifecycle state) { + return this.ordinal() > state.ordinal(); + } +} diff --git a/src/main/java/dev/lukebemish/excavatedvariants/impl/ModifiedOreBlock.java b/src/main/java/dev/lukebemish/excavatedvariants/impl/ModifiedOreBlock.java new file mode 100644 index 00000000..0d89be6c --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/impl/ModifiedOreBlock.java @@ -0,0 +1,350 @@ +package dev.lukebemish.excavatedvariants.impl; + +import dev.lukebemish.excavatedvariants.api.data.Ore; +import dev.lukebemish.excavatedvariants.api.data.Stone; +import dev.lukebemish.excavatedvariants.api.data.modifier.Flag; +import dev.lukebemish.excavatedvariants.impl.mixin.BlockBehaviorAccessor; +import dev.lukebemish.excavatedvariants.impl.mixin.BlockPropertiesMixin; +import net.minecraft.advancements.critereon.EnchantmentPredicate; +import net.minecraft.advancements.critereon.ItemEnchantmentsPredicate; +import net.minecraft.advancements.critereon.ItemPredicate; +import net.minecraft.advancements.critereon.ItemSubPredicates; +import net.minecraft.advancements.critereon.MinMaxBounds; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.util.RandomSource; +import net.minecraft.util.valueproviders.ConstantInt; +import net.minecraft.util.valueproviders.IntProvider; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.ItemInteractionResult; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Items; +import net.minecraft.world.item.context.BlockPlaceContext; +import net.minecraft.world.item.enchantment.Enchantments; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.DropExperienceBlock; +import net.minecraft.world.level.block.state.BlockBehaviour; +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.level.block.state.properties.NoteBlockInstrument; +import net.minecraft.world.level.block.state.properties.Property; +import net.minecraft.world.level.material.MapColor; +import net.minecraft.world.level.storage.loot.LootParams; +import net.minecraft.world.level.storage.loot.parameters.LootContextParamSets; +import net.minecraft.world.level.storage.loot.parameters.LootContextParams; +import net.minecraft.world.phys.BlockHitResult; +import org.apache.commons.lang3.mutable.Mutable; +import org.apache.commons.lang3.mutable.MutableBoolean; +import org.apache.commons.lang3.mutable.MutableObject; +import org.jspecify.annotations.Nullable; + +import java.util.ArrayList; +import java.util.List; +import java.util.Set; + +public class ModifiedOreBlock extends DropExperienceBlock { + static Property[] STATIC_PROPS; + public final Ore ore; + public final Stone stone; + final Set flags; + protected final @Nullable Block target; + protected final Block stoneTarget; + protected final boolean delegateSpecialDrops; + private boolean isLit = false; + private boolean isHorizontalFacing = false; + private boolean isFacing = false; + private boolean isHopperFacing = false; + private boolean isAxis = false; + private boolean isHorizontalAxis = false; + private Property[] props; + + public ModifiedOreBlock(ExcavatedVariants.VariantFuture future) { + super(getXpProvider(future), copyProperties(future)); + this.ore = future.ore; + this.stone = future.stone; + this.flags = Set.copyOf(future.flags); + this.target = future.foundOre; + this.stoneTarget = future.foundStone; + if (STATIC_PROPS != null) { + this.props = STATIC_PROPS.clone(); + STATIC_PROPS = null; + copyBlockstateDefs(); + } + + MutableBoolean shouldDelegateSpecialDrops = new MutableBoolean(true); + for (var propsModifier : future.propsModifiers) { + propsModifier.setXpDropped(xp -> shouldDelegateSpecialDrops.setValue(true)); + } + this.delegateSpecialDrops = shouldDelegateSpecialDrops.booleanValue(); + } + + private static IntProvider getXpProvider(ExcavatedVariants.VariantFuture future) { + Mutable out = new MutableObject<>(ConstantInt.of(0)); + for (var propsModifier : future.propsModifiers) { + propsModifier.setXpDropped(out::setValue); + } + return out.getValue(); + } + + private static float avgF(float a, float b, float weight) { + return (a * (weight) + b * (1 - weight)); + } + + private static MapColor avgColor(MapColor a, MapColor b, @SuppressWarnings("SameParameterValue") float weight) { + int avgColor = (int) (a.calculateRGBColor(MapColor.Brightness.HIGH) * weight + b.calculateRGBColor(MapColor.Brightness.HIGH) * (1 - weight)); + int lowest = 0; + int lowDiff = 0xFFFFFF; + for (int i = 0; i < 64; i++) { + MapColor c = MapColor.byId(i); + int diff = Math.abs(c.calculateRGBColor(MapColor.Brightness.HIGH) - avgColor); + if (diff < lowDiff) { + lowDiff = diff; + lowest = i; + } + } + return MapColor.byId(lowest); + } + + private static Properties copyProperties(ExcavatedVariants.VariantFuture future) { + Block target = future.foundOre; + Block stoneTarget = future.foundStone; + BlockBehaviour.Properties outProperties; + if (target != null && stoneTarget != null) { + Properties properties = Properties.ofFullCopy(stoneTarget); + Properties oreProperties = Properties.ofFullCopy(target); + properties.requiresCorrectToolForDrops(); + BlockPropertiesMixin newProperties = (BlockPropertiesMixin) properties; + BlockPropertiesMixin oreProps = (BlockPropertiesMixin) oreProperties; + properties.strength(avgStrength(target.defaultDestroyTime(), stoneTarget.defaultDestroyTime(), 0.5f), + avgF(target.getExplosionResistance(), stoneTarget.getExplosionResistance(), 0.5f)) + .mapColor(avgColor(stoneTarget.defaultMapColor(), target.defaultMapColor(), 0.8F)); + newProperties.setDynamicShape(false); + newProperties.setHasCollision(true); + newProperties.setIsRandomlyTicking(oreProps.getIsRandomlyTicking()); + newProperties.setLightEmission(blockstate -> oreProps.getLightEmission().applyAsInt(withProperties(blockstate, target))); + outProperties = properties; + } else { + outProperties = BlockBehaviour.Properties.of() + .mapColor(MapColor.STONE) + .instrument(NoteBlockInstrument.BASEDRUM) + .requiresCorrectToolForDrops() + .strength(3.0f, 3.0f); + } + for (var propsModifier : future.propsModifiers) { + propsModifier.setExplosionResistance(outProperties::explosionResistance); + propsModifier.setDestroyTime(outProperties::destroyTime); + } + return outProperties; + } + + public static float avgStrength(float a, float b, float weight) { + if (a < 0 || b < 0) return -1f; + return avgF(a, b, weight); + } + + private static BlockState withProperties(BlockState state, Block target) { + BlockState blockState = target.defaultBlockState(); + Block block = state.getBlock(); + if (block instanceof ModifiedOreBlock self) { + + var arr = self.props == null ? STATIC_PROPS : self.props; + for (Property property : arr) { + if (blockState.hasProperty(property)) { + blockState = copyProperty(state, blockState, property); + } + } + } + + return blockState; + } + + private static > BlockState copyProperty(BlockState sourceState, BlockState targetState, Property property) { + return targetState.setValue(property, sourceState.getValue(property)); + } + + public static void setupStaticWrapper(ExcavatedVariants.VariantFuture future) { + Block target = future.foundOre; + Block stoneTarget = future.foundStone; + ArrayList> propBuilder = new ArrayList<>(); + for (Property p : target.defaultBlockState().getProperties()) { + if (p == BlockStateProperties.LIT) { + propBuilder.add(p); + } + } + for (Property p : stoneTarget.defaultBlockState().getProperties()) { + if (p == BlockStateProperties.AXIS + || p == BlockStateProperties.HORIZONTAL_AXIS + || p == BlockStateProperties.FACING + || p == BlockStateProperties.FACING_HOPPER + || p == BlockStateProperties.HORIZONTAL_FACING) { + propBuilder.add(p); + } + } + STATIC_PROPS = propBuilder.toArray(new Property[]{}); + } + + private void copyBlockstateDefs() { + BlockState bs = this.defaultBlockState(); + for (Property p : props) { + if (p == BlockStateProperties.LIT) { + this.isLit = true; + bs = bs.setValue(BlockStateProperties.LIT, false); + } + if (p == BlockStateProperties.FACING) { + this.isFacing = true; + bs = bs.setValue(BlockStateProperties.FACING, Direction.NORTH); + } + if (p == BlockStateProperties.FACING_HOPPER) { + this.isHopperFacing = true; + bs = bs.setValue(BlockStateProperties.FACING_HOPPER, Direction.NORTH); + } + if (p == BlockStateProperties.HORIZONTAL_FACING) { + this.isHorizontalFacing = true; + bs = bs.setValue(BlockStateProperties.HORIZONTAL_FACING, Direction.NORTH); + } + if (p == BlockStateProperties.AXIS) { + this.isAxis = true; + bs = bs.setValue(BlockStateProperties.AXIS, Direction.Axis.Y); + } + if (p == BlockStateProperties.HORIZONTAL_AXIS) { + this.isHorizontalAxis = true; + bs = bs.setValue(BlockStateProperties.HORIZONTAL_AXIS, Direction.Axis.Z); + } + } + this.registerDefaultState(bs); + } + + @Override + public boolean isRandomlyTicking(BlockState state) { + if (isLit) { + return state.getValue(BlockStateProperties.LIT); + } + return super.isRandomlyTicking(state); + } + + @SuppressWarnings("deprecation") + @Override + public void attack(BlockState state, Level level, BlockPos pos, Player player) { + interact(state, level, pos); + super.attack(state, level, pos, player); + } + + @Override + public void stepOn(Level level, BlockPos pos, BlockState state, Entity entity) { + interact(state, level, pos); + super.stepOn(level, pos, state, entity); + } + + @Override + protected ItemInteractionResult useItemOn(ItemStack itemStack, BlockState blockState, Level level, BlockPos blockPos, Player player, InteractionHand interactionHand, BlockHitResult blockHitResult) { + if (!level.isClientSide) { + interact(blockState, level, blockPos); + } + return super.useItemOn(itemStack, blockState, level, blockPos, player, interactionHand, blockHitResult); + } + + private void interact(BlockState state, Level level, BlockPos pos) { + if (isLit && !state.getValue(BlockStateProperties.LIT)) { + level.setBlock(pos, state.setValue(BlockStateProperties.LIT, true), 3); + } + } + + @Override + public void randomTick(BlockState state, ServerLevel level, BlockPos pos, RandomSource random) { + if (isLit) { + if (state.getValue(BlockStateProperties.LIT)) { + level.setBlock(pos, state.setValue(BlockStateProperties.LIT, false), 3); + } + } + super.randomTick(state, level, pos, random); + } + + @Override + public float defaultDestroyTime() { + if (target != null) { + return this.target.defaultDestroyTime(); + } + return super.defaultDestroyTime(); + } + + public void animateTick(BlockState state, Level level, BlockPos pos, RandomSource random) { + if (target != null) target.animateTick(state, level, pos, random); + if (stoneTarget != null) stoneTarget.animateTick(state, level, pos, random); + } + + protected void createBlockStateDefinition(StateDefinition.Builder builder) { + if (props != null) { + if (props.length != 0) { + builder.add(props); + } + } else if (STATIC_PROPS != null && STATIC_PROPS.length != 0) { + builder.add(STATIC_PROPS); + } + } + + @Override + public List getDrops(BlockState state, LootParams.Builder builder) { + if (target != null) { + BlockState targetState = target.defaultBlockState(); + List items = ((BlockBehaviorAccessor) target).excavated_variants$getDrops(targetState, builder); + ItemStack tool = builder.withParameter(LootContextParams.BLOCK_STATE, targetState).create(LootContextParamSets.BLOCK).getParamOrNull(LootContextParams.TOOL); + var predicate = ItemPredicate.Builder.item().withSubPredicate( + ItemSubPredicates.ENCHANTMENTS, + ItemEnchantmentsPredicate.enchantments(List.of( + new EnchantmentPredicate(Enchantments.SILK_TOUCH, MinMaxBounds.Ints.atLeast(1)) + )) + ).build(); + boolean isSilk = tool != null && predicate.test(tool); + return items.stream().map(x -> { + if (x.is(target.asItem()) && this.asItem() != Items.AIR && !(flags.contains(Flag.ORIGINAL_ALWAYS)) + && !(flags.contains(Flag.ORIGINAL_WITHOUT_SILK) && !isSilk)) { + int count = x.getCount(); + return new ItemStack(this.asItem(), count); + } + return x; + }).toList(); + } + return new ArrayList<>(); + } + + @Override + protected void spawnAfterBreak(BlockState state, ServerLevel level, BlockPos pos, ItemStack stack, boolean bl) { + if (target != null && this.delegateSpecialDrops) { + ((BlockBehaviorAccessor) target).excavated_variants$spawnAfterBreak(state, level, pos, stack, bl); + } else { + super.spawnAfterBreak(state, level, pos, stack, bl); + } + } + + @Nullable + @Override + public BlockState getStateForPlacement(BlockPlaceContext context) { + BlockState def = this.defaultBlockState(); + if (isAxis) { + def = def.setValue(BlockStateProperties.AXIS, context.getClickedFace().getAxis()); + } else if (isHorizontalAxis) { + def = def.setValue(BlockStateProperties.HORIZONTAL_AXIS, context.getHorizontalDirection().getAxis()); + } else if (isFacing) { + def = def.setValue(BlockStateProperties.FACING, context.getClickedFace().getOpposite()); + } else if (isHopperFacing) { + var d = context.getClickedFace().getOpposite(); + def = def.setValue(BlockStateProperties.FACING_HOPPER, d.getAxis() == Direction.Axis.Y ? Direction.DOWN : d); + } else if (isHorizontalFacing) { + def = def.setValue(BlockStateProperties.HORIZONTAL_FACING, context.getHorizontalDirection()); + } + return def; + } + + public boolean isAxisType() { + return isAxis || isHorizontalAxis; + } + + public boolean isFacingType() { + return isFacing || isHorizontalFacing || isHopperFacing; + } +} diff --git a/src/main/java/dev/lukebemish/excavatedvariants/impl/RecipePlanner.java b/src/main/java/dev/lukebemish/excavatedvariants/impl/RecipePlanner.java new file mode 100644 index 00000000..5f2460f4 --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/impl/RecipePlanner.java @@ -0,0 +1,57 @@ +package dev.lukebemish.excavatedvariants.impl; + +import dev.lukebemish.dynamicassetgenerator.api.PathAwareInputStreamSource; +import dev.lukebemish.dynamicassetgenerator.api.ResourceGenerationContext; +import net.minecraft.resources.ResourceKey; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.server.packs.resources.IoSupplier; +import net.minecraft.tags.TagKey; +import net.minecraft.world.level.block.Block; +import org.jspecify.annotations.NonNull; +import org.jspecify.annotations.Nullable; + +import java.io.ByteArrayInputStream; +import java.io.InputStream; +import java.util.HashMap; +import java.util.Map; +import java.util.Set; + +public class RecipePlanner implements PathAwareInputStreamSource { + public final Map, ResourceKey> oreToBaseOreMap = new HashMap<>(); + private final Map> recipeToTagMap = new HashMap<>(); + private boolean initialized = false; + private synchronized void initialize() { + if (initialized) return; + oreToBaseOreMap.keySet() + .forEach(tagKey -> { + var location = new ResourceLocation( + ExcavatedVariants.MOD_ID, + "recipes/ore_conversion/" + tagKey.location().getNamespace() + "/" + tagKey.location().getPath() + ".json" + ); + recipeToTagMap.put(location, tagKey); + }); + initialized = true; + } + + @Override + public @NonNull Set getLocations(ResourceGenerationContext context) { + initialize(); + return recipeToTagMap.keySet(); + } + + @Override + public @Nullable IoSupplier get(ResourceLocation outRl, ResourceGenerationContext context) { + initialize(); + var tagKey = recipeToTagMap.get(outRl); + if (tagKey == null) return null; + var blockKey = oreToBaseOreMap.get(tagKey); + if (blockKey == null) return null; + String recipe = String.format( + "{\"type\":\"minecraft:crafting_shapeless\",\"ingredients\":[{\"tag\":\"%s\"}],\"result\":{\"id\":\"%s\",\"count\":1}}", + tagKey.location(), blockKey.location() + ); + return () -> new ByteArrayInputStream(recipe.getBytes()); + } + + // Don't bother caching +} diff --git a/src/main/java/dev/lukebemish/excavatedvariants/impl/RegistriesImpl.java b/src/main/java/dev/lukebemish/excavatedvariants/impl/RegistriesImpl.java new file mode 100644 index 00000000..edfabb3a --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/impl/RegistriesImpl.java @@ -0,0 +1,83 @@ +package dev.lukebemish.excavatedvariants.impl; + +import com.mojang.serialization.Lifecycle; +import dev.lukebemish.excavatedvariants.api.PostRegistrationListener; +import dev.lukebemish.excavatedvariants.api.RegistrationListener; +import dev.lukebemish.excavatedvariants.api.data.GroundType; +import dev.lukebemish.excavatedvariants.api.data.Ore; +import dev.lukebemish.excavatedvariants.api.data.Stone; +import dev.lukebemish.excavatedvariants.api.data.modifier.Modifier; +import dev.lukebemish.excavatedvariants.impl.mixin.BuiltInRegistriesMixin; +import dev.lukebemish.excavatedvariants.impl.mixin.MappedRegistryAccessor; +import dev.lukebemish.excavatedvariants.impl.platform.Services; +import net.minecraft.core.MappedRegistry; +import net.minecraft.core.Registry; +import net.minecraft.core.WritableRegistry; +import net.minecraft.core.registries.BuiltInRegistries; +import net.minecraft.resources.ResourceKey; +import net.minecraft.resources.ResourceLocation; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.function.BiConsumer; + +public final class RegistriesImpl { + private RegistriesImpl() {} + + public static final ResourceKey> GROUND_TYPE_KEY = ResourceKey.createRegistryKey(new ResourceLocation(ExcavatedVariants.MOD_ID, "ground_type")); + public static final ResourceKey> ORE_KEY = ResourceKey.createRegistryKey(new ResourceLocation(ExcavatedVariants.MOD_ID, "ore")); + public static final ResourceKey> STONE_KEY = ResourceKey.createRegistryKey(new ResourceLocation(ExcavatedVariants.MOD_ID, "stone")); + public static final ResourceKey> MODIFIER_KEY = ResourceKey.createRegistryKey(new ResourceLocation(ExcavatedVariants.MOD_ID, "modifier")); + + public static final WritableRegistry GROUND_TYPE_REGISTRY = new MappedRegistry<>(GROUND_TYPE_KEY, Lifecycle.stable(), false); + public static final WritableRegistry ORE_REGISTRY = new MappedRegistry<>(ORE_KEY, Lifecycle.stable(), false); + public static final WritableRegistry STONE_REGISTRY = new MappedRegistry<>(STONE_KEY, Lifecycle.stable(), false); + public static final WritableRegistry MODIFIER_REGISTRY = new MappedRegistry<>(MODIFIER_KEY, Lifecycle.stable(), false); + + static { + GROUND_TYPE_REGISTRY.freeze(); + ORE_REGISTRY.freeze(); + STONE_REGISTRY.freeze(); + MODIFIER_REGISTRY.freeze(); + } + + private static final List REGISTRATION_LISTENERS = Services.loadListeners(RegistrationListener.class); + private static final List POST_REGISTRATION_LISTENERS = Services.loadListeners(PostRegistrationListener.class); + + public static void bootstrap() { + ((MappedRegistryAccessor) GROUND_TYPE_REGISTRY).excavated_variants$setFrozen(false); + ((MappedRegistryAccessor) ORE_REGISTRY).excavated_variants$setFrozen(false); + ((MappedRegistryAccessor) STONE_REGISTRY).excavated_variants$setFrozen(false); + ((MappedRegistryAccessor) MODIFIER_REGISTRY).excavated_variants$setFrozen(false); + + Map> ores = new HashMap<>(); + + BiConsumer groundTypes = (l, o) -> Registry.register(GROUND_TYPE_REGISTRY, l, o); + BiConsumer stoneTypes = (l, o) -> Registry.register(STONE_REGISTRY, l, o); + BiConsumer oreTypes = (l, o) -> ores.computeIfAbsent(l, k -> new ArrayList<>()).add(o); + BiConsumer modifiers = (l, o) -> Registry.register(MODIFIER_REGISTRY, l, o); + + REGISTRATION_LISTENERS.forEach(r -> r.provideEntries(new RegistrationListener.Registrar(groundTypes, stoneTypes, oreTypes, modifiers))); + + ores.forEach((l, os) -> Registry.register(ORE_REGISTRY, l, Ore.merge(os))); + + GROUND_TYPE_REGISTRY.freeze(); + ORE_REGISTRY.freeze(); + STONE_REGISTRY.freeze(); + MODIFIER_REGISTRY.freeze(); + + POST_REGISTRATION_LISTENERS.forEach(r -> r.registriesComplete(new PostRegistrationListener.Registries(GROUND_TYPE_REGISTRY, STONE_REGISTRY, ORE_REGISTRY, MODIFIER_REGISTRY))); + } + + @SuppressWarnings("UnreachableCode") + public static void registerRegistries() { + ((MappedRegistryAccessor) BuiltInRegistries.REGISTRY).excavated_variants$setFrozen(false); + Registry.register(BuiltInRegistriesMixin.excavated_variants$getWritableRegistry(), GROUND_TYPE_KEY.location(), GROUND_TYPE_REGISTRY); + Registry.register(BuiltInRegistriesMixin.excavated_variants$getWritableRegistry(), ORE_KEY.location(), ORE_REGISTRY); + Registry.register(BuiltInRegistriesMixin.excavated_variants$getWritableRegistry(), STONE_KEY.location(), STONE_REGISTRY); + Registry.register(BuiltInRegistriesMixin.excavated_variants$getWritableRegistry(), MODIFIER_KEY.location(), MODIFIER_REGISTRY); + BuiltInRegistries.REGISTRY.freeze(); + } +} diff --git a/src/main/java/dev/lukebemish/excavatedvariants/impl/client/BackupFetcher.java b/src/main/java/dev/lukebemish/excavatedvariants/impl/client/BackupFetcher.java new file mode 100644 index 00000000..df7ebd11 --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/impl/client/BackupFetcher.java @@ -0,0 +1,48 @@ +package dev.lukebemish.excavatedvariants.impl.client; + +import dev.lukebemish.dynamicassetgenerator.api.ResourceGenerationContext; +import net.minecraft.resources.ResourceLocation; + +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.io.InputStream; + +public class BackupFetcher { + public static InputStream getBlockStateFile(ResourceLocation rl, ResourceGenerationContext context) { + try { + ResourceLocation bsLocation = new ResourceLocation(rl.getNamespace(), "blockstates/" + rl.getPath() + ".json"); + var resource = context.getResourceSource().getResource(bsLocation); + if (resource == null) throw new IOException("Resource not found: "+bsLocation); + return resource.get(); + } catch (IOException e) { + try { + ResourceLocation testBS = new ResourceLocation(rl.getNamespace(), "excavated_variants_backups/blockstates" + rl.getPath() + ".json"); + var resource = context.getResourceSource().getResource(testBS); + if (resource == null) throw new IOException("Resource not found: "+testBS); + return resource.get(); + } catch (IOException e2) { + String blockstate = "{\"variants\":{\"\":{\"model\":\"" + rl.getNamespace() + ":block/" + rl.getPath() + "\"}}}"; + return new ByteArrayInputStream(blockstate.getBytes()); + } + } + } + + public static InputStream getModelFile(ResourceLocation rl, ResourceGenerationContext context) { + try { + var modelLocation = new ResourceLocation(rl.getNamespace(), "models/" + rl.getPath() + ".json"); + var resource = context.getResourceSource().getResource(modelLocation); + if (resource == null) throw new IOException("Resource not found: "+modelLocation); + return resource.get(); + } catch (IOException e) { + try { + ResourceLocation testBS = new ResourceLocation(rl.getNamespace(), "excavated_variants_backups/models/" + rl.getPath() + ".json"); + var resource = context.getResourceSource().getResource(testBS); + if (resource == null) throw new IOException("Resource not found: "+testBS); + return resource.get(); + } catch (IOException e2) { + String model = "{\"parent\":\"block/cube_all\",\"textures\":{\"all\":\"" + rl.getNamespace() + ":" + rl.getPath() + "\"}}"; + return new ByteArrayInputStream(model.getBytes()); + } + } + } +} diff --git a/src/main/java/dev/lukebemish/excavatedvariants/impl/client/BlockStateData.java b/src/main/java/dev/lukebemish/excavatedvariants/impl/client/BlockStateData.java new file mode 100644 index 00000000..aaebedb2 --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/impl/client/BlockStateData.java @@ -0,0 +1,60 @@ +package dev.lukebemish.excavatedvariants.impl.client; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import com.mojang.serialization.Codec; +import com.mojang.serialization.codecs.RecordCodecBuilder; +import dev.lukebemish.excavatedvariants.impl.ModifiedOreBlock; + +import net.minecraft.core.Direction; +import net.minecraft.resources.ResourceLocation; + +public class BlockStateData { + public static final Codec CODEC = RecordCodecBuilder.create(instance -> instance.group( + Codec.unboundedMap(Codec.STRING, VariantAssembler.CODEC.listOf()).fieldOf("variants").forGetter(BlockStateData::getVariants) + ).apply(instance, BlockStateData::new)); + + private final Map> variants = new HashMap<>(); + + public Map> getVariants() { + return variants; + } + + public BlockStateData() {} + public BlockStateData(Map> variants) { + this.variants.putAll(variants); + } + + public static BlockStateData create(ModifiedOreBlock block, List modelLocs) { + var assembler = new BlockStateData(); + if (block.isFacingType()) { + for (Direction d : Direction.values()) { + ArrayList vars = new ArrayList<>(); + for (ResourceLocation rl : modelLocs) { + vars.add(VariantAssembler.fromFacing(rl, d)); + } + assembler.variants.put("facing=" + d.getName(), vars); + + } + } else if (block.isAxisType()) { + for (Direction.Axis a : Direction.Axis.values()) { + ArrayList vars = new ArrayList<>(); + for (ResourceLocation rl : modelLocs) { + vars.add(VariantAssembler.fromAxis(rl, a)); + } + assembler.variants.put("axis=" + a.getName(), vars); + + } + } else { + ArrayList vars = new ArrayList<>(); + for (ResourceLocation rl : modelLocs) { + vars.add(VariantAssembler.fromModel(rl)); + } + assembler.variants.put("", vars); + } + return assembler; + } +} diff --git a/src/main/java/dev/lukebemish/excavatedvariants/impl/client/ClientServices.java b/src/main/java/dev/lukebemish/excavatedvariants/impl/client/ClientServices.java new file mode 100644 index 00000000..d01b0586 --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/impl/client/ClientServices.java @@ -0,0 +1,7 @@ +package dev.lukebemish.excavatedvariants.impl.client; + +import dev.lukebemish.excavatedvariants.impl.platform.Services; + +public class ClientServices { + public static final RenderTypeHandler RENDER_TYPE_HANDLER = Services.load(RenderTypeHandler.class); +} diff --git a/src/main/java/dev/lukebemish/excavatedvariants/impl/client/DefaultProvider.java b/src/main/java/dev/lukebemish/excavatedvariants/impl/client/DefaultProvider.java new file mode 100644 index 00000000..463be6dc --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/impl/client/DefaultProvider.java @@ -0,0 +1,95 @@ +package dev.lukebemish.excavatedvariants.impl.client; + +import com.google.auto.service.AutoService; +import dev.lukebemish.dynamicassetgenerator.api.ResourceGenerationContext; +import dev.lukebemish.excavatedvariants.api.client.ModelData; +import dev.lukebemish.excavatedvariants.api.client.ResourceProvider; +import dev.lukebemish.excavatedvariants.api.client.TexFaceProvider; +import dev.lukebemish.excavatedvariants.api.data.Ore; +import dev.lukebemish.excavatedvariants.api.data.Stone; +import dev.lukebemish.excavatedvariants.impl.ExcavatedVariants; +import net.minecraft.client.renderer.block.model.BlockModelDefinition; +import net.minecraft.client.renderer.block.model.MultiVariant; +import net.minecraft.resources.ResourceKey; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.level.block.Block; +import org.jspecify.annotations.Nullable; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.util.*; + +@AutoService(ResourceProvider.class) +public class DefaultProvider implements ResourceProvider { + + @Override + public @Nullable List provideStoneTextures(Stone stone, ResourceGenerationContext context) { + List blockModels = getBlockModels(stone.block, context); + if (blockModels.isEmpty()) { + ExcavatedVariants.LOGGER.warn("Could not find blockstates for stone {}", stone); + return null; + } + List models = new ArrayList<>(); + for (ResourceLocation model : blockModels) { + try { + models.add(ParsedModel.getFromLocation(model, context).makeStoneModel()); + } catch (IOException ignored) {} + } + if (!models.isEmpty()) { + return models; + } + return null; + } + + @Override + public @Nullable List provideOreTextures(Ore ore, ResourceKey selectedBlock, ResourceGenerationContext context) { + /* + * - Reading in the blockstates of ore and stone involved + * - From each blockstate, getting a list of models involved - this will be a *single list*, not a key-value + * map, as we only care about the "primary" model and its variants (and we assume that each orientation uses + * the same "primary" model and variants). + * - Now we have a list of models per blockstate. For each model: + * - extract the textures used in the model + */ + List blockModels = getBlockModels(selectedBlock, context); + if (blockModels == null || blockModels.isEmpty()) { + ExcavatedVariants.LOGGER.warn("Could not find blockstates for ore " + ore); + return null; + } + List models = new ArrayList<>(); + for (ResourceLocation model : blockModels) { + try { + models.add(ParsedModel.getFromLocation(model, context).makeTextureProvider()); + } catch (IOException ignored) {} + } + if (!models.isEmpty()) { + return models; + } + return null; + } + + private List getBlockModels(ResourceKey block, ResourceGenerationContext context) { + BlockModelDefinition.Context ctx = new BlockModelDefinition.Context(); + try (InputStream blockstateStream = BackupFetcher.getBlockStateFile(block.location(), context)) { + BlockModelDefinition definition = BlockModelDefinition.fromStream(ctx, new BufferedReader(new InputStreamReader(blockstateStream))); + if (!definition.isMultiPart()) { + Set oreModels = new HashSet<>(); + for (Map.Entry entry : definition.getVariants().entrySet()) { + oreModels.addAll(entry.getValue().getDependencies()); + } + return List.copyOf(oreModels); + } else { + return List.of(); + } + } catch (IOException e) { + return List.of(); + } + } + + @Override + public int priority() { + return ExcavatedVariants.DEFAULT_COMPAT_PRIORITY; + } +} diff --git a/src/main/java/dev/lukebemish/excavatedvariants/impl/client/ItemModelPlanner.java b/src/main/java/dev/lukebemish/excavatedvariants/impl/client/ItemModelPlanner.java new file mode 100644 index 00000000..ca20e38f --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/impl/client/ItemModelPlanner.java @@ -0,0 +1,79 @@ +package dev.lukebemish.excavatedvariants.impl.client; + +import com.google.gson.JsonObject; +import dev.lukebemish.dynamicassetgenerator.api.PathAwareInputStreamSource; +import dev.lukebemish.dynamicassetgenerator.api.Resettable; +import dev.lukebemish.dynamicassetgenerator.api.ResourceGenerationContext; +import dev.lukebemish.excavatedvariants.impl.ExcavatedVariants; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.server.packs.resources.IoSupplier; +import org.jspecify.annotations.NonNull; +import org.jspecify.annotations.Nullable; + +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.util.ArrayList; +import java.util.List; +import java.util.Set; +import java.util.stream.Collectors; + +public class ItemModelPlanner implements PathAwareInputStreamSource, Resettable { + private final List ids = new ArrayList<>(); + + @Nullable + private JsonObject baseModel; + boolean tried = false; + + public void add(String id) { + ids.add(id); + } + + @Override + public @NonNull Set getLocations(ResourceGenerationContext context) { + return ids.stream().map(fullId -> new ResourceLocation(ExcavatedVariants.MOD_ID, "models/item/" + fullId + ".json")).collect(Collectors.toSet()); + } + + @Override + public @Nullable IoSupplier get(ResourceLocation outRl, ResourceGenerationContext context) { + try { + if (baseModel == null) { + setupBaseModel(context); + } + } catch (IOException e) { + return null; + } + + return () -> { + var json = baseModel.deepCopy(); + json.addProperty("parent", ExcavatedVariants.MOD_ID + ":block/" + outRl.getPath().replace(".json", "").replace("models/item/", "") + "__0"); + return new ByteArrayInputStream(ExcavatedVariants.GSON.toJson(json).getBytes()); + }; + } + + private synchronized void setupBaseModel(ResourceGenerationContext context) throws IOException { + var resource = context.getResourceSource().getResource(new ResourceLocation("models/block/block.json")); + if (resource == null) { + if (!tried) { + tried = true; + throw new IOException("Failed to load base block model; resource not found"); + } + return; + } + try (var is = resource.get()) { + baseModel = ExcavatedVariants.GSON.fromJson(new String(is.readAllBytes()), JsonObject.class); + } catch (Exception e) { + if (!tried) { + tried = true; + ExcavatedVariants.LOGGER.error("Failed to load base block model", e); + } + throw new IOException(e); + } + } + + @Override + public void reset(ResourceGenerationContext context) { + baseModel = null; + tried = false; + } +} diff --git a/src/main/java/dev/lukebemish/excavatedvariants/impl/client/ParsedModel.java b/src/main/java/dev/lukebemish/excavatedvariants/impl/client/ParsedModel.java new file mode 100644 index 00000000..1076c855 --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/impl/client/ParsedModel.java @@ -0,0 +1,294 @@ +package dev.lukebemish.excavatedvariants.impl.client; + +import com.google.gson.JsonElement; +import com.mojang.serialization.Codec; +import com.mojang.serialization.JsonOps; +import com.mojang.serialization.codecs.RecordCodecBuilder; +import dev.lukebemish.dynamicassetgenerator.api.ResourceGenerationContext; +import dev.lukebemish.dynamicassetgenerator.api.client.generators.TexSource; +import dev.lukebemish.dynamicassetgenerator.api.client.generators.texsources.AnimationFrameCapture; +import dev.lukebemish.dynamicassetgenerator.api.client.generators.texsources.AnimationSplittingSource; +import dev.lukebemish.dynamicassetgenerator.api.client.generators.texsources.ForegroundTransferSource; +import dev.lukebemish.dynamicassetgenerator.api.client.generators.texsources.OverlaySource; +import dev.lukebemish.dynamicassetgenerator.api.client.generators.texsources.TextureReaderSource; +import dev.lukebemish.excavatedvariants.api.client.Face; +import dev.lukebemish.excavatedvariants.api.client.ModelData; +import dev.lukebemish.excavatedvariants.api.client.TexFaceProvider; +import dev.lukebemish.excavatedvariants.impl.ExcavatedVariants; +import net.minecraft.resources.ResourceLocation; +import org.jspecify.annotations.Nullable; + +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import java.util.Set; +import java.util.stream.Stream; + +// ONLY fit to be used for parsing, not for writing +public final class ParsedModel { + + public static @Nullable ResourceLocation resolveTexture(Map map, String texName) { + texName = texName.substring(1); + String found = map.get(texName); + if (found == null) return null; + if (found.startsWith("#")) return resolveTexture(map, found); + return ResourceLocation.of(found, ':'); + } + + public static String resolveTextureSymbol(Map map, String texName) { + texName = texName.substring(1); + String found = map.get(texName); + if (found == null) return texName; + if (found.startsWith("#")) { + return resolveTextureSymbol(map, found); + } + return texName; + } + + public static final Codec CODEC = Codec.lazyInitialized(() -> RecordCodecBuilder.create(i -> i.group( + ResourceLocation.CODEC.optionalFieldOf("parent").forGetter(ParsedModel::parent), + Codec.unboundedMap(Codec.STRING, Codec.STRING).optionalFieldOf("textures", Map.of()).forGetter(ParsedModel::textures), + ElementDefinition.CODEC.listOf().optionalFieldOf("elements", List.of()).forGetter(ParsedModel::elements), + Codec.unboundedMap(Codec.STRING, ParsedModel.CODEC).optionalFieldOf("children").forGetter(ParsedModel::children) + ).apply(i, ParsedModel::new))); + @SuppressWarnings("OptionalUsedAsFieldOrParameterType") + private final Optional parent; + private final Map textures; + private final List elements; + @SuppressWarnings("OptionalUsedAsFieldOrParameterType") + private final Optional> children; + + public ParsedModel( + @SuppressWarnings("OptionalUsedAsFieldOrParameterType") Optional parent, + Map textures, + List elements, + @SuppressWarnings("OptionalUsedAsFieldOrParameterType") Optional> children) { + this.parent = parent; + this.textures = textures; + this.elements = elements; + this.children = children; + } + + private @Nullable ResourceGenerationContext context; + private @Nullable ResourceLocation location; + + public static ParsedModel getFromLocation(ResourceLocation rl, ResourceGenerationContext context) throws IOException { + try (InputStream is = BackupFetcher.getModelFile(rl, context); + var reader = new InputStreamReader(is)) { + JsonElement json = ExcavatedVariants.GSON.fromJson(reader, JsonElement.class); + ParsedModel model = ParsedModel.CODEC.parse(JsonOps.INSTANCE, json).getOrThrow(); + model.context = context; + model.location = rl; + return model; + } catch (IOException | RuntimeException e) { + throw new IOException("Could not read model " + rl, e); + } + } + + public Map getTextureMap() throws IOException { + Map textures = new HashMap<>(); + if (parent().isPresent() && !parent().get().equals(location)) { + ParsedModel parent = getFromLocation(parent().get(), context); + textures.putAll(parent.getTextureMap()); + } + textures.putAll(this.textures()); + return textures; + } + + private Map getRlMapForSide(String side) throws IOException { + return getRlMapForSide(side, Map.of()); + } + + private Map getRlMapForSide(String side, Map oldTexMap) throws IOException { + Map map = new HashMap<>(); + + var texMap = new HashMap<>(oldTexMap); + texMap.putAll(getTextureMap()); + + if (parent().isPresent() && !parent().get().equals(location)) { + map.putAll(getFromLocation(parent().get(), context).getRlMapForSide(side, texMap)); + } + + if (children().isEmpty() || children().get().isEmpty()) { + for (ElementDefinition definition : this.elements()) { + if (definition.faces.containsKey(side)) { + String texName = resolveTextureSymbol(texMap, definition.faces.get(side).texture()); + LocationKey key = definition.getLocationKey(); + NamedResourceList rls = map.computeIfAbsent(key, k -> new NamedResourceList(texName)); + rls.name = texName; + ResourceLocation location = resolveTexture(texMap, "#" + texName); + if (location != null) + rls.resources.add(location); + } + } + } else { + for (var h : children().get().values()) { + var m = h.getRlMapForSide(side, texMap); + m.forEach((key, rls) -> map.merge(key, rls, (l1, l2) -> { + NamedResourceList out = new NamedResourceList(l1.name); + out.resources.addAll(l1.resources); + out.resources.addAll(l2.resources); + return out; + })); + } + } + return map; + } + + public record SideInformation(Set faces, List textureStack) { + } + + private Map processIntoSides() throws IOException { + Map sides = new HashMap<>(); + for (Face face : Face.values()) { + var map = getRlMapForSide(face.faceName); + for (NamedResourceList value : map.values()) { + sides.computeIfAbsent(value.name, k -> new SideInformation(new HashSet<>(), new ArrayList<>(value.resources))) + .faces.add(face); + } + } + return sides; + } + + public ModelData makeStoneModel() throws IOException { + Map sides = processIntoSides(); + return new StoneModelData(this, sides); + } + + public TexFaceProvider makeTextureProvider() throws IOException { + Map> map = new HashMap<>(); + for (Face face : Face.values()) { + var rlMap = getRlMapForSide(face.faceName); + map.put(face, rlMap.values().stream().findFirst().map(it -> it.resources).orElse(List.of())); + } + return face -> (newStone, oldStone) -> { + int[] c = new int[]{0}; + Map sourceMap = new HashMap<>(); + + TexSource newStoneSource = newStone.apply(source -> { + String name = "stoneNew" + c[0]; + c[0] += 1; + sourceMap.put(name, source); + return new AnimationFrameCapture.Builder().setCapture(name).build(); + }); + c[0] = 0; + + TexSource oldStoneSource = oldStone.apply(source -> { + String name = "stoneOld" + c[0]; + c[0] += 1; + sourceMap.put(name, source); + return new AnimationFrameCapture.Builder().setCapture(name).build(); + }); + c[0] = 0; + + List oreSources = new ArrayList<>(); + for (ResourceLocation location : map.get(face)) { + String name = "ore" + c[0]; + c[0] += 1; + sourceMap.put(name, new TextureReaderSource.Builder().setPath(location).build()); + oreSources.add(new AnimationFrameCapture.Builder().setCapture(name).build()); + } + + return new AnimationSplittingSource.Builder() + .setGenerator(new ForegroundTransferSource.Builder() + .setBackground(oldStoneSource) + .setFull(new OverlaySource.Builder().setSources(oreSources).build()) + .setNewBackground(newStoneSource) + .build()) + .setSources(sourceMap).build(); + }; + } + + public Optional parent() { + return parent; + } + + public Map textures() { + return textures; + } + + public List elements() { + return elements; + } + + public Optional> children() { + return children; + } + + @Override + public boolean equals(Object obj) { + if (obj == this) return true; + if (obj == null || obj.getClass() != this.getClass()) return false; + var that = (ParsedModel) obj; + return Objects.equals(this.parent, that.parent) && + Objects.equals(this.textures, that.textures) && + Objects.equals(this.elements, that.elements) && + Objects.equals(this.children, that.children); + } + + @Override + public int hashCode() { + return Objects.hash(parent, textures, elements, children); + } + + @Override + public String toString() { + return "ParsedModel[" + + "parent=" + parent + ", " + + "textures=" + textures + ", " + + "elements=" + elements + ", " + + "children=" + children + ']'; + } + + + public record ElementDefinition(Map faces, List from, List to, + RotationDefinition rotation) { + public static final Codec CODEC = RecordCodecBuilder.create(i -> i.group( + Codec.unboundedMap(Codec.STRING, FaceDefinition.CODEC).optionalFieldOf("faces", Map.of()).forGetter(ElementDefinition::faces), + Codec.INT.listOf().optionalFieldOf("from", List.of(0, 0, 0)).forGetter(ElementDefinition::from), + Codec.INT.listOf().optionalFieldOf("to", List.of(16, 16, 16)).forGetter(ElementDefinition::to), + RotationDefinition.CODEC.optionalFieldOf("rotation", new RotationDefinition(List.of(0, 0, 0), "x", 0)).forGetter(ElementDefinition::rotation) + ).apply(i, ElementDefinition::new)); + + public LocationKey getLocationKey() { + List from = Stream.of(0, 1, 2).map(i -> Math.min(from().get(i), to().get(i))).toList(); + List to = Stream.of(0, 1, 2).map(i -> Math.max(from().get(i), to().get(i))).toList(); + return new LocationKey(rotation().origin(), rotation().axis(), rotation().angle(), + from, to); + } + } + + public record RotationDefinition(List origin, String axis, float angle) { + public static final Codec CODEC = RecordCodecBuilder.create(i -> i.group( + Codec.INT.listOf().fieldOf("origin").forGetter(RotationDefinition::origin), + Codec.STRING.fieldOf("axis").forGetter(RotationDefinition::axis), + Codec.FLOAT.fieldOf("angle").forGetter(RotationDefinition::angle) + ).apply(i, RotationDefinition::new)); + } + + public record LocationKey(List origin, String axis, float angle, List of, List to) { + } + + public static class NamedResourceList { + public String name; + public final List resources; + + public NamedResourceList(String name) { + this.name = name; + this.resources = new ArrayList<>(); + } + } + + public record FaceDefinition(String texture) { + public static final Codec CODEC = RecordCodecBuilder.create(i -> i.group( + Codec.STRING.fieldOf("texture").forGetter(FaceDefinition::texture) + ).apply(i, FaceDefinition::new)); + } +} diff --git a/src/main/java/dev/lukebemish/excavatedvariants/impl/client/RenderTypeHandler.java b/src/main/java/dev/lukebemish/excavatedvariants/impl/client/RenderTypeHandler.java new file mode 100644 index 00000000..b7a83f71 --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/impl/client/RenderTypeHandler.java @@ -0,0 +1,7 @@ +package dev.lukebemish.excavatedvariants.impl.client; + +import net.minecraft.world.level.block.Block; + +public interface RenderTypeHandler { + void setRenderTypeMipped(Block block); +} \ No newline at end of file diff --git a/src/main/java/dev/lukebemish/excavatedvariants/impl/client/ResourceAssembler.java b/src/main/java/dev/lukebemish/excavatedvariants/impl/client/ResourceAssembler.java new file mode 100644 index 00000000..27ee4acd --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/impl/client/ResourceAssembler.java @@ -0,0 +1,172 @@ +package dev.lukebemish.excavatedvariants.impl.client; + +import com.google.common.collect.Sets; +import com.google.gson.JsonElement; +import com.mojang.serialization.JsonOps; +import dev.lukebemish.dynamicassetgenerator.api.InputStreamSource; +import dev.lukebemish.dynamicassetgenerator.api.PathAwareInputStreamSource; +import dev.lukebemish.dynamicassetgenerator.api.ResourceGenerationContext; +import dev.lukebemish.excavatedvariants.api.client.*; +import dev.lukebemish.excavatedvariants.api.data.Ore; +import dev.lukebemish.excavatedvariants.api.data.Stone; +import dev.lukebemish.excavatedvariants.impl.ExcavatedVariants; +import dev.lukebemish.excavatedvariants.impl.ModifiedOreBlock; +import net.minecraft.resources.ResourceKey; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.server.packs.resources.IoSupplier; +import org.jspecify.annotations.NonNull; +import org.jspecify.annotations.Nullable; + +import java.io.ByteArrayInputStream; +import java.io.InputStream; +import java.nio.charset.StandardCharsets; +import java.util.*; + +public class ResourceAssembler implements PathAwareInputStreamSource { + private final Map, List> stoneModels = new HashMap<>(); + private final Map, List> oreModels = new HashMap<>(); + private final Map resources = new HashMap<>(); + private final TextureAtlasBuilder textureAtlasBuilder = new TextureAtlasBuilder(); + + public void addFuture(ExcavatedVariants.VariantFuture future, ResourceGenerationContext context) { + if (!stoneModels.containsKey(future.stone.getKeyOrThrow())) { + + var textures = ResourceCollector.makeStoneTextures(future.stone, context); + if (textures != null) { + stoneModels.put(future.stone.getKeyOrThrow(), textures); + } + } + if (!stoneModels.containsKey(future.foundSourceStone.getKeyOrThrow())) { + var textures = ResourceCollector.makeStoneTextures(future.foundSourceStone, context); + if (textures != null) { + stoneModels.put(future.foundSourceStone.getKeyOrThrow(), textures); + } + } + if (!oreModels.containsKey(future.ore.getKeyOrThrow())) { + var textures = ResourceCollector.makeOreTextures(future.ore, future.foundOreKey, context); + if (textures != null) { + oreModels.put(future.ore.getKeyOrThrow(), textures); + } + } + + processPair(future); + } + + private void processPair(ExcavatedVariants.VariantFuture future) { + List oldStoneModels = stoneModels.get(future.foundSourceStone.getKeyOrThrow()); + List newStoneModels = stoneModels.get(future.stone.getKeyOrThrow()); + List oreModels = this.oreModels.get(future.ore.getKeyOrThrow()); + + if (oldStoneModels == null) { + ExcavatedVariants.LOGGER.warn("No existing stone models found for "+future.foundSourceStone.getKeyOrThrow()); + return; + } + if (newStoneModels == null) { + ExcavatedVariants.LOGGER.warn("No new stone models found for "+future.stone.getKeyOrThrow()); + return; + } + if (oreModels == null || oreModels.isEmpty()) { + ExcavatedVariants.LOGGER.warn("No ore models found for "+future.ore.getKeyOrThrow()); + return; + } + + ModelData oldStoneModel = oldStoneModels.get(0); + + int counter = 0; + List models = new ArrayList<>(); + for (ModelData newStoneModel : newStoneModels) { + for (TexFaceProvider oreModel : oreModels) { + ResourceLocation modelLocation = new ResourceLocation(ExcavatedVariants.MOD_ID, "block/"+future.fullId+"__"+counter); + assembleModel(modelLocation, oreModel, oldStoneModel, newStoneModel, future.foundSourceStone); + models.add(modelLocation); + counter += 1; + } + } + + // Generate blockstate file + var fullId = future.fullId; + ModifiedOreBlock block = ExcavatedVariants.BLOCKS.get(future); + + var assembled = BlockStateData.create(block, models); + var encoded = BlockStateData.CODEC.encodeStart(JsonOps.INSTANCE, assembled).result(); + if (encoded.isPresent()) { + var json = ExcavatedVariants.GSON.toJson(encoded.get()); + addResource(new ResourceLocation(ExcavatedVariants.MOD_ID, "blockstates/"+fullId+".json"), + (resourceLocation, c) -> () -> new ByteArrayInputStream(json.getBytes(StandardCharsets.UTF_8))); + } else { + ExcavatedVariants.LOGGER.warn("Failed to encode blockstate for "+fullId); + } + } + + private void assembleModel(ResourceLocation modelLocation, TexFaceProvider ore, ModelData oldStone, ModelData newStone, Stone oldStoneData) { + Map stoneFaceLocationMap = new HashMap<>(); + Map modelTextureTranslations = new HashMap<>(); + NamedTextureProvider[] oldStoneTexSource = new NamedTextureProvider[1]; + + oldStone.produceTextures((name, texture, faces) -> oldStoneTexSource[0] = texture); + + if (oldStoneTexSource[0] == null) { + ExcavatedVariants.LOGGER.warn("No existing stone texture found for "+oldStoneData.getKeyOrThrow().location()); + return; + } + + int[] counter = new int[] {0}; + newStone.produceTextures((name, texture, faces) -> { + counter[0] += 1; + ResourceLocation location = new ResourceLocation(modelLocation.getNamespace(), modelLocation.getPath()+"__"+counter[0]); + modelTextureTranslations.put(name, location); + + if (faces.isEmpty()) { + return; + } + stoneFaceLocationMap.put(name, new StoneTexFace(new HashSet<>(faces), location, texture)); + }); + + // Make the actual model here... + JsonElement model = newStone.assembleModel(Collections.unmodifiableMap(modelTextureTranslations)); + ResourceLocation modelJsonLocation = new ResourceLocation(modelLocation.getNamespace(), "models/"+modelLocation.getPath()+".json"); + addResource(modelJsonLocation, (resourceLocation, c) -> () -> new ByteArrayInputStream(model.toString().getBytes(StandardCharsets.UTF_8))); + + // And now we'll generate the ore textures + for (Map.Entry entry : stoneFaceLocationMap.entrySet()) { + StoneTexFace stoneTexFace = entry.getValue(); + Set faces = stoneTexFace.faces(); + // note that when a StoneTexFace is constructed it always has at least one face + //noinspection OptionalGetWithoutIsPresent + TextureProducer oreTexture = ore.get(faces.stream().findFirst().get()); + assembleTextures(stoneTexFace.textureLocation(), oreTexture, oldStoneTexSource[0], stoneTexFace.texture()); + } + } + + private void assembleTextures(ResourceLocation output, TextureProducer oreTexture, NamedTextureProvider oldStoneTexture, NamedTextureProvider newStoneTexture) { + var outTexture = oreTexture.produce(newStoneTexture, oldStoneTexture); + textureAtlasBuilder.addSource(output, outTexture); + } + + private void addResource(ResourceLocation location, InputStreamSource source) { + resources.put(location, source); + } + + private record StoneTexFace(Set faces, ResourceLocation textureLocation, NamedTextureProvider texture) {} + + @Override + public @NonNull Set getLocations(ResourceGenerationContext context) { + return Sets.union(resources.keySet(), textureAtlasBuilder.getLocations(context)); + } + + @Override + public @Nullable IoSupplier get(ResourceLocation outRl, ResourceGenerationContext context) { + var supplier = resources.get(outRl); + if (supplier != null) return supplier.get(outRl, context); + if (textureAtlasBuilder.getLocations(context).contains(outRl)) + return textureAtlasBuilder.get(outRl, context); + return null; + } + + @Override + public @Nullable String createCacheKey(ResourceLocation outRl, ResourceGenerationContext context) { + if (textureAtlasBuilder.getLocations(context).contains(outRl)) + return textureAtlasBuilder.createCacheKey(outRl, context); + return null; + } +} diff --git a/src/main/java/dev/lukebemish/excavatedvariants/impl/client/ResourceCollector.java b/src/main/java/dev/lukebemish/excavatedvariants/impl/client/ResourceCollector.java new file mode 100644 index 00000000..18b1a88b --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/impl/client/ResourceCollector.java @@ -0,0 +1,38 @@ +package dev.lukebemish.excavatedvariants.impl.client; + +import dev.lukebemish.dynamicassetgenerator.api.ResourceGenerationContext; +import dev.lukebemish.excavatedvariants.api.client.ModelData; +import dev.lukebemish.excavatedvariants.api.client.ResourceProvider; +import dev.lukebemish.excavatedvariants.api.client.TexFaceProvider; +import dev.lukebemish.excavatedvariants.api.data.Ore; +import dev.lukebemish.excavatedvariants.api.data.Stone; +import dev.lukebemish.excavatedvariants.impl.platform.Services; +import net.minecraft.resources.ResourceKey; +import net.minecraft.world.level.block.Block; +import org.jspecify.annotations.Nullable; + +import java.util.List; + +public class ResourceCollector { + private static final List PROVIDERS = Services.loadListeners(ResourceProvider.class); + + static @Nullable List makeStoneTextures(Stone stone, ResourceGenerationContext context) { + for (var provider : PROVIDERS) { + var models = provider.provideStoneTextures(stone, context); + if (models != null) { + return models; + } + } + return null; + } + + static @Nullable List makeOreTextures(Ore ore, ResourceKey selectedBlock, ResourceGenerationContext context) { + for (var provider : PROVIDERS) { + var models = provider.provideOreTextures(ore, selectedBlock, context); + if (models != null) { + return models; + } + } + return null; + } +} diff --git a/src/main/java/dev/lukebemish/excavatedvariants/impl/client/StoneModelData.java b/src/main/java/dev/lukebemish/excavatedvariants/impl/client/StoneModelData.java new file mode 100644 index 00000000..d80f56df --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/impl/client/StoneModelData.java @@ -0,0 +1,59 @@ +package dev.lukebemish.excavatedvariants.impl.client; + +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.mojang.serialization.JsonOps; +import dev.lukebemish.dynamicassetgenerator.api.client.generators.texsources.OverlaySource; +import dev.lukebemish.dynamicassetgenerator.api.client.generators.texsources.TextureReaderSource; +import dev.lukebemish.excavatedvariants.api.client.ModelData; +import net.minecraft.resources.ResourceLocation; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +class StoneModelData implements ModelData { + private final ParsedModel parsedModel; + private final Map sides; + + public StoneModelData(ParsedModel parsedModel, Map sides) { + this.parsedModel = parsedModel; + this.sides = sides; + } + + @Override + public JsonElement assembleModel(Map textures) { + Map textureMap = new HashMap<>(parsedModel.textures()); + for (Map.Entry entry : textures.entrySet()) { + textureMap.put(entry.getKey(), entry.getValue().toString()); + } + ParsedModel newModel = new ParsedModel(parsedModel.parent(), textureMap, parsedModel.elements(), parsedModel.children()); + return ParsedModel.CODEC.encodeStart(JsonOps.INSTANCE, newModel).result().orElse(new JsonObject()); + } + + @Override + public void produceTextures(TextureConsumer textureProducerConsumer) { + for (Map.Entry entry : sides.entrySet()) { + String name = entry.getKey(); + if (!parsedModel.textures().containsKey(name)) { + continue; + } + + ParsedModel.SideInformation info = entry.getValue(); + List stack = info.textureStack(); + if (stack.isEmpty()) { + continue; + } + + textureProducerConsumer.accept(name, sourceWrapper -> + new OverlaySource.Builder() + .setSources(stack.stream() + .map(rl -> + sourceWrapper.wrap( + new TextureReaderSource.Builder() + .setPath(rl) + .build())) + .toList()).build(), info.faces()); + } + } +} diff --git a/src/main/java/dev/lukebemish/excavatedvariants/impl/client/TextureAtlasBuilder.java b/src/main/java/dev/lukebemish/excavatedvariants/impl/client/TextureAtlasBuilder.java new file mode 100644 index 00000000..0e332462 --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/impl/client/TextureAtlasBuilder.java @@ -0,0 +1,64 @@ +package dev.lukebemish.excavatedvariants.impl.client; + +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonPrimitive; +import com.mojang.serialization.JsonOps; +import dev.lukebemish.dynamicassetgenerator.api.PathAwareInputStreamSource; +import dev.lukebemish.dynamicassetgenerator.api.ResourceGenerationContext; +import dev.lukebemish.dynamicassetgenerator.api.client.generators.TexSource; +import dev.lukebemish.excavatedvariants.impl.ExcavatedVariants; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.server.packs.resources.IoSupplier; +import org.jspecify.annotations.NonNull; +import org.jspecify.annotations.Nullable; + +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.nio.charset.StandardCharsets; +import java.util.HashMap; +import java.util.Map; +import java.util.Set; + +public class TextureAtlasBuilder implements PathAwareInputStreamSource { + private final Map sources = new HashMap<>(); + + @Override + public @NonNull Set getLocations(ResourceGenerationContext context) { + return Set.of(new ResourceLocation("minecraft", "atlases/blocks.json")); + } + + public void addSource(ResourceLocation rl, TexSource source) { + sources.put(rl, source); + } + + @Override + public @Nullable IoSupplier get(ResourceLocation outRl, ResourceGenerationContext context) { + return () -> { + Map jsonMap = new HashMap<>(); + for (var entry : sources.entrySet()) { + TexSource source = entry.getValue(); + var json = TexSource.CODEC.encodeStart(JsonOps.INSTANCE, source); + if (json.error().isPresent()) { + throw new IOException("Failed to encode " + entry.getKey() + " as json: " + json.error().get()); + } else if (json.result().isPresent()) { + jsonMap.put(entry.getKey(), json.result().get()); + } + } + JsonObject root = new JsonObject(); + JsonArray sources = new JsonArray(); + JsonObject source = new JsonObject(); + JsonObject nestedSources = new JsonObject(); + for (var entry : jsonMap.entrySet()) { + nestedSources.add(entry.getKey().toString(), entry.getValue()); + } + source.add("sources", nestedSources); + source.add("type", new JsonPrimitive("dynamic_asset_generator:tex_sources")); + sources.add(source); + root.add("sources", sources); + return new ByteArrayInputStream(ExcavatedVariants.GSON.toJson(root).getBytes(StandardCharsets.UTF_8)); + }; + } +} diff --git a/src/main/java/dev/lukebemish/excavatedvariants/impl/client/VariantAssembler.java b/src/main/java/dev/lukebemish/excavatedvariants/impl/client/VariantAssembler.java new file mode 100644 index 00000000..c1e8ebaa --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/impl/client/VariantAssembler.java @@ -0,0 +1,76 @@ +package dev.lukebemish.excavatedvariants.impl.client; + +import com.mojang.serialization.Codec; +import com.mojang.serialization.codecs.RecordCodecBuilder; + +import net.minecraft.core.Direction; +import net.minecraft.resources.ResourceLocation; + +public class VariantAssembler { + public static final Codec CODEC = RecordCodecBuilder.create(instance -> instance.group( + ResourceLocation.CODEC.fieldOf("model").forGetter(VariantAssembler::getModel), + Codec.INT.optionalFieldOf("x", 0).forGetter(VariantAssembler::getX), + Codec.INT.optionalFieldOf("y", 0).forGetter(VariantAssembler::getY) + ).apply(instance, VariantAssembler::new)); + + private final ResourceLocation model; + private int x; + private int y; + + public ResourceLocation getModel() { + return model; + } + + public int getX() { + return x; + } + + public int getY() { + return y; + } + + public VariantAssembler(ResourceLocation model) { + this.model = model; + this.x = 0; + this.y = 0; + } + + public VariantAssembler(ResourceLocation model, int x, int y) { + this.model = model; + this.x = x; + this.y = y; + } + + public static VariantAssembler fromFacing(ResourceLocation model, Direction dir) { + var va = new VariantAssembler(model); + switch (dir) { + case UP -> va.x = 270; + case DOWN -> va.x = 90; + case EAST -> va.y = 90; + case NORTH -> { + } + case WEST -> va.y = 270; + case SOUTH -> va.y = 180; + } + return va; + } + + public static VariantAssembler fromAxis(ResourceLocation model, Direction.Axis axis) { + var va = new VariantAssembler(model); + switch (axis) { + case X -> { + va.x = 90; + va.y = 90; + } + case Y -> { + + } + case Z -> va.x = 90; + } + return va; + } + + public static VariantAssembler fromModel(ResourceLocation model) { + return new VariantAssembler(model); + } +} diff --git a/src/main/java/dev/lukebemish/excavatedvariants/impl/client/package-info.java b/src/main/java/dev/lukebemish/excavatedvariants/impl/client/package-info.java new file mode 100644 index 00000000..ae52f0f7 --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/impl/client/package-info.java @@ -0,0 +1,6 @@ +@NullMarked +@ApiStatus.Internal +package dev.lukebemish.excavatedvariants.impl.client; + +import org.jetbrains.annotations.ApiStatus; +import org.jspecify.annotations.NullMarked; \ No newline at end of file diff --git a/src/main/java/dev/lukebemish/excavatedvariants/impl/data/ModConfig.java b/src/main/java/dev/lukebemish/excavatedvariants/impl/data/ModConfig.java new file mode 100644 index 00000000..e5525b5c --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/impl/data/ModConfig.java @@ -0,0 +1,66 @@ +package dev.lukebemish.excavatedvariants.impl.data; + +import com.google.gson.JsonElement; +import com.mojang.serialization.Codec; +import com.mojang.serialization.JsonOps; +import com.mojang.serialization.codecs.RecordCodecBuilder; +import dev.lukebemish.excavatedvariants.impl.ExcavatedVariants; +import dev.lukebemish.excavatedvariants.impl.platform.Services; + +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Path; + +public class ModConfig { + public static final Path CONFIG_PATH = Services.PLATFORM.getConfigFolder(); + public static final Path FULL_PATH = CONFIG_PATH.resolve(ExcavatedVariants.MOD_ID + ".json"); + public static final Codec CODEC = RecordCodecBuilder.create(instance -> instance.group( + Codec.BOOL.fieldOf("attempt_worldgen_replacement").forGetter(c -> c.attemptWorldgenReplacement), + Codec.BOOL.fieldOf("add_conversion_recipes").forGetter(c -> c.addConversionRecipes) + ).apply(instance, ModConfig::new)); + + public final boolean attemptWorldgenReplacement; + public final boolean addConversionRecipes; + + private ModConfig(boolean attemptWorldgenReplacement, boolean addConversionRecipes) { + this.attemptWorldgenReplacement = attemptWorldgenReplacement; + this.addConversionRecipes = addConversionRecipes; + } + + private static ModConfig defaultConfig() { + return new ModConfig(true, true); + } + + public static ModConfig load() { + if (!Files.exists(FULL_PATH)) { + ModConfig config = defaultConfig(); + write(config); + return config; + } + try (var reader = Files.newBufferedReader(FULL_PATH, StandardCharsets.UTF_8)) { + JsonElement json = ExcavatedVariants.GSON.fromJson(reader, JsonElement.class); + return CODEC.parse(JsonOps.INSTANCE, json).mapError(s -> { + ExcavatedVariants.LOGGER.error("Failed to parse config: {}", s); + return s; + }).result().orElseThrow(() -> new IOException("Failed to parse config")); + } catch (IOException e) { + ExcavatedVariants.LOGGER.error("Failed to read config", e); + ModConfig config = defaultConfig(); + write(config); + return config; + } + } + + private static void write(ModConfig config) { + try (var writer = Files.newBufferedWriter(FULL_PATH, StandardCharsets.UTF_8)) { + JsonElement json = CODEC.encodeStart(JsonOps.INSTANCE, config).mapError(s -> { + ExcavatedVariants.LOGGER.error("Failed to encode config: {}", s); + return s; + }).result().orElseThrow(() -> new IOException("Failed to encode config")); + writer.write(ExcavatedVariants.GSON_PRETTY.toJson(json)); + } catch (IOException e) { + ExcavatedVariants.LOGGER.error("Failed to write config", e); + } + } +} diff --git a/src/main/java/dev/lukebemish/excavatedvariants/impl/data/filter/ObjectVariantFilter.java b/src/main/java/dev/lukebemish/excavatedvariants/impl/data/filter/ObjectVariantFilter.java new file mode 100644 index 00000000..29755429 --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/impl/data/filter/ObjectVariantFilter.java @@ -0,0 +1,131 @@ +package dev.lukebemish.excavatedvariants.impl.data.filter; + +import com.google.common.collect.BiMap; +import com.google.common.collect.ImmutableBiMap; +import com.mojang.datafixers.util.Pair; +import com.mojang.serialization.Codec; +import com.mojang.serialization.DataResult; +import com.mojang.serialization.DynamicOps; +import com.mojang.serialization.MapCodec; +import com.mojang.serialization.codecs.RecordCodecBuilder; +import dev.lukebemish.excavatedvariants.api.data.Ore; +import dev.lukebemish.excavatedvariants.api.data.Stone; +import dev.lukebemish.excavatedvariants.api.data.filter.VariantFilter; +import net.minecraft.resources.ResourceLocation; + +import java.util.List; +import java.util.function.Function; + +public sealed interface ObjectVariantFilter extends VariantFilter { + BiMap> FILTER_TYPES = new ImmutableBiMap.Builder>() + .put("and", AndVariantFilter.CODEC) + .put("or", OrVariantFilter.CODEC) + .put("not", NotVariantFilter.CODEC) + .put("empty", EmptyVariantFilter.CODEC) + .put("all", AllVariantFilter.CODEC) + .build(); + Codec CODEC = Codec.lazyInitialized(() -> new Codec>() { + @Override + public DataResult, T>> decode(DynamicOps ops, T input) { + return Codec.STRING.decode(ops, input).flatMap(keyValuePair -> !FILTER_TYPES.containsKey(keyValuePair.getFirst()) + ? DataResult.error(() -> "Unknown filter type: " + keyValuePair.getFirst()) + : DataResult.success(keyValuePair.mapFirst(FILTER_TYPES::get))); + } + + @Override + public DataResult encode(MapCodec input, DynamicOps ops, T prefix) { + String key = FILTER_TYPES.inverse().get(input); + if (key == null) { + return DataResult.error(() -> "Unregistered filter type: " + input); + } + T toMerge = ops.createString(key); + return ops.mergeToPrimitive(prefix, toMerge); + } + }).dispatch(ObjectVariantFilter::codec, Function.identity()); + + MapCodec codec(); + + final class AllVariantFilter implements ObjectVariantFilter { + public static final AllVariantFilter INSTANCE = new AllVariantFilter(); + public static final MapCodec CODEC = MapCodec.unit(INSTANCE); + private AllVariantFilter() { + } + + @Override + public boolean matches(Ore ore, Stone stone, ResourceLocation block) { + return true; + } + + @Override + public MapCodec codec() { + return CODEC; + } + } + + record AndVariantFilter(List variantFilters) implements ObjectVariantFilter { + public static final MapCodec CODEC = RecordCodecBuilder.mapCodec(i -> i.group( + VariantFilter.CODEC.listOf().fieldOf("filters").forGetter(AndVariantFilter::variantFilters) + ).apply(i, AndVariantFilter::new)); + + + @Override + public boolean matches(Ore ore, Stone stone, ResourceLocation block) { + return variantFilters.stream().allMatch(f -> f.matches(ore, stone, block)); + } + + @Override + public MapCodec codec() { + return CODEC; + } + } + + final class EmptyVariantFilter implements ObjectVariantFilter { + public static final EmptyVariantFilter INSTANCE = new EmptyVariantFilter(); + public static final MapCodec CODEC = MapCodec.unit(INSTANCE); + private EmptyVariantFilter() { + } + + @Override + public boolean matches(Ore ore, Stone stone, ResourceLocation block) { + return false; + } + + @Override + public MapCodec codec() { + return CODEC; + } + } + + record NotVariantFilter(VariantFilter variantFilter) implements ObjectVariantFilter { + public static final MapCodec CODEC = RecordCodecBuilder.mapCodec(i -> i.group( + VariantFilter.CODEC.fieldOf("filter").forGetter(NotVariantFilter::variantFilter) + ).apply(i, NotVariantFilter::new)); + + @Override + public boolean matches(Ore ore, Stone stone, ResourceLocation block) { + return !variantFilter().matches(ore, stone, block); + } + + @Override + public MapCodec codec() { + return CODEC; + } + } + + record OrVariantFilter(List variantFilters) implements ObjectVariantFilter { + public static final MapCodec CODEC = RecordCodecBuilder.mapCodec(i -> i.group( + VariantFilter.CODEC.listOf().fieldOf("filters").forGetter(OrVariantFilter::variantFilters) + ).apply(i, OrVariantFilter::new)); + + + @Override + public boolean matches(Ore ore, Stone stone, ResourceLocation block) { + return variantFilters.stream().anyMatch(f -> f.matches(ore, stone, block)); + } + + @Override + public MapCodec codec() { + return CODEC; + } + } +} diff --git a/src/main/java/dev/lukebemish/excavatedvariants/impl/data/filter/StringHeldVariantFilter.java b/src/main/java/dev/lukebemish/excavatedvariants/impl/data/filter/StringHeldVariantFilter.java new file mode 100644 index 00000000..dead9329 --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/impl/data/filter/StringHeldVariantFilter.java @@ -0,0 +1,184 @@ +package dev.lukebemish.excavatedvariants.impl.data.filter; + +import com.mojang.serialization.Codec; +import com.mojang.serialization.DataResult; +import dev.lukebemish.excavatedvariants.api.RegistryKeys; +import dev.lukebemish.excavatedvariants.api.data.GroundType; +import dev.lukebemish.excavatedvariants.api.data.Ore; +import dev.lukebemish.excavatedvariants.api.data.Stone; +import dev.lukebemish.excavatedvariants.api.data.filter.VariantFilter; +import dev.lukebemish.excavatedvariants.impl.platform.Services; +import net.minecraft.resources.ResourceKey; +import net.minecraft.resources.ResourceLocation; + +import java.util.regex.Pattern; + +public sealed interface StringHeldVariantFilter extends VariantFilter { + Codec CODEC = Codec.STRING.flatXmap(StringHeldVariantFilter::of, f -> DataResult.success(f.toString())); + + static DataResult of(String part) { + if (part.equals("*")) + return DataResult.success(AllVariantFilter.INSTANCE); + else if (part.equals("~")) + return DataResult.success(EmptyVariantFilter.INSTANCE); + else if (part.equals("generated")) + return DataResult.success(GeneratedVariantFilter.INSTANCE); + else if (part.contains("@")) { + if (part.startsWith("stone@")) { + return ResourceLocation.read(part.replaceFirst("stone@", "")).map(rl -> new StoneVariantFilter(ResourceKey.create(RegistryKeys.STONE, rl))); + } else if (part.startsWith("ore@")) { + return ResourceLocation.read(part.replaceFirst("ore@", "")).map(rl -> new OreVariantFilter(ResourceKey.create(RegistryKeys.ORE, rl))); + } else if (part.startsWith("ground_type@")) { + return ResourceLocation.read(part.replaceFirst("ground_type@", "")).map(rl -> new GroundTypeVariantFilter(ResourceKey.create(RegistryKeys.GROUND_TYPE, rl))); + } else if (part.startsWith("mod@")) { + var rest = part.replaceFirst("mod@", ""); + return DataResult.success(new ModVariantFilter(rest)); + } else if (part.startsWith("block@")) { + var parts = part.replaceFirst("block@", "").split(":"); + if (parts.length != 2) + return DataResult.error(() -> "Invalid block filter: '" + part + "'"); + return DataResult.success(new BlockPatternVariantFilter(parts[0], parts[1])); + } else { + return DataResult.error(() -> "Unknown filter type '" + part.split("@")[0] + "'"); + } + } else if (part.startsWith("~")) { + DataResult wrapper = of(part.replaceFirst("~", "")); + return wrapper.map(NotVariantFilter::new); + } else + return DataResult.error(() -> "Note a filter: '" + part + "'"); + } + + record StoneVariantFilter(ResourceKey stone) implements StringHeldVariantFilter { + @Override + public boolean matches(Ore ore, Stone stone, ResourceLocation block) { + return stone.getKeyOrThrow() == stone(); + } + + @Override + public String toString() { + return "stone@" + stone(); + } + } + + record OreVariantFilter(ResourceKey ore) implements StringHeldVariantFilter { + @Override + public boolean matches(Ore ore, Stone stone, ResourceLocation block) { + return ore.getKeyOrThrow() == ore(); + } + + @Override + public String toString() { + return "ore@" + ore(); + } + } + + record NotVariantFilter(StringHeldVariantFilter wrapped) implements StringHeldVariantFilter { + @Override + public boolean matches(Ore ore, Stone stone, ResourceLocation block) { + return !wrapped.matches(ore, stone, block); + } + + @Override + public String toString() { + return "~" + wrapped(); + } + } + + record GroundTypeVariantFilter(ResourceKey type) implements StringHeldVariantFilter { + + @Override + public boolean matches(Ore ore, Stone stone, ResourceLocation block) { + return ore.types.contains(type()) && stone.types.contains(type()); + } + + @Override + public String toString() { + return "ground_type@" + type; + } + } + + final class AllVariantFilter implements StringHeldVariantFilter { + public static final AllVariantFilter INSTANCE = new AllVariantFilter(); + + private AllVariantFilter() { + } + + @Override + public boolean matches(Ore ore, Stone stone, ResourceLocation block) { + return true; + } + + @Override + public String toString() { + return "*"; + } + } + + final class EmptyVariantFilter implements StringHeldVariantFilter { + public static final EmptyVariantFilter INSTANCE = new EmptyVariantFilter(); + + private EmptyVariantFilter() { + } + + @Override + public boolean matches(Ore ore, Stone stone, ResourceLocation block) { + return false; + } + + @Override + public String toString() { + return "~"; + } + } + + final class GeneratedVariantFilter implements StringHeldVariantFilter { + public static final GeneratedVariantFilter INSTANCE = new GeneratedVariantFilter(); + + @Override + public boolean matches(Ore ore, Stone stone, ResourceLocation block) { + return ore.isNotOriginal(stone.getKeyOrThrow()); + } + + @Override + public String toString() { + return "generated"; + } + } + + record ModVariantFilter(String mod) implements StringHeldVariantFilter { + + @Override + public boolean matches(Ore ore, Stone stone, ResourceLocation block) { + return Services.PLATFORM.getModIds().contains(mod); + } + + @Override + public String toString() { + return "mod@" + mod; + } + } + + final class BlockPatternVariantFilter implements StringHeldVariantFilter { + private final String namespace; + private final String path; + private final Pattern namespacePattern; + private final Pattern pathPattern; + + public BlockPatternVariantFilter(String namespace, String path) { + this.namespace = namespace; + this.path = path; + this.namespacePattern = Pattern.compile(("\\Q" + namespace + "\\E").replace("*", "\\E.*\\Q")); + this.pathPattern = Pattern.compile(("\\Q" + path + "\\E").replace("*", "\\E.*\\Q")); + } + + @Override + public boolean matches(Ore ore, Stone stone, ResourceLocation block) { + return namespacePattern.matcher(block.getNamespace()).matches() && pathPattern.matcher(block.getPath()).matches(); + } + + @Override + public String toString() { + return "block@" + namespace + ":" + path; + } + } +} diff --git a/src/main/java/dev/lukebemish/excavatedvariants/impl/data/filter/package-info.java b/src/main/java/dev/lukebemish/excavatedvariants/impl/data/filter/package-info.java new file mode 100644 index 00000000..05afd97c --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/impl/data/filter/package-info.java @@ -0,0 +1,6 @@ +@ApiStatus.Internal +@NullMarked +package dev.lukebemish.excavatedvariants.impl.data.filter; + +import org.jetbrains.annotations.ApiStatus; +import org.jspecify.annotations.NullMarked; \ No newline at end of file diff --git a/src/main/java/dev/lukebemish/excavatedvariants/impl/data/modifier/BlockPropsModifierImpl.java b/src/main/java/dev/lukebemish/excavatedvariants/impl/data/modifier/BlockPropsModifierImpl.java new file mode 100644 index 00000000..cd4b34b3 --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/impl/data/modifier/BlockPropsModifierImpl.java @@ -0,0 +1,33 @@ +package dev.lukebemish.excavatedvariants.impl.data.modifier; + +import com.mojang.serialization.Codec; +import com.mojang.serialization.codecs.RecordCodecBuilder; +import dev.lukebemish.excavatedvariants.api.data.modifier.BlockPropsModifier; +import net.minecraft.util.valueproviders.IntProvider; + +import java.util.Optional; +import java.util.function.Consumer; + +public record BlockPropsModifierImpl(Optional destroyTime, Optional explosionResistance, + Optional xpDropped) implements BlockPropsModifier { + public static final Codec CODEC = RecordCodecBuilder.create(i -> i.group( + Codec.FLOAT.optionalFieldOf("destroy_time").forGetter(BlockPropsModifierImpl::destroyTime), + Codec.FLOAT.optionalFieldOf("explosion_resistance").forGetter(BlockPropsModifierImpl::explosionResistance), + IntProvider.NON_NEGATIVE_CODEC.optionalFieldOf("xp").forGetter(BlockPropsModifierImpl::xpDropped) + ).apply(i, BlockPropsModifierImpl::new)); + + @Override + public void setDestroyTime(Consumer consumer) { + destroyTime.ifPresent(consumer); + } + + @Override + public void setExplosionResistance(Consumer consumer) { + explosionResistance.ifPresent(consumer); + } + + @Override + public void setXpDropped(Consumer consumer) { + xpDropped.ifPresent(consumer); + } +} diff --git a/src/main/java/dev/lukebemish/excavatedvariants/impl/data/modifier/package-info.java b/src/main/java/dev/lukebemish/excavatedvariants/impl/data/modifier/package-info.java new file mode 100644 index 00000000..2a914a07 --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/impl/data/modifier/package-info.java @@ -0,0 +1,6 @@ +@ApiStatus.Internal +@NullMarked +package dev.lukebemish.excavatedvariants.impl.data.modifier; + +import org.jetbrains.annotations.ApiStatus; +import org.jspecify.annotations.NullMarked; \ No newline at end of file diff --git a/src/main/java/dev/lukebemish/excavatedvariants/impl/data/package-info.java b/src/main/java/dev/lukebemish/excavatedvariants/impl/data/package-info.java new file mode 100644 index 00000000..8c0d2b15 --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/impl/data/package-info.java @@ -0,0 +1,6 @@ +@NullMarked +@ApiStatus.Internal +package dev.lukebemish.excavatedvariants.impl.data; + +import org.jetbrains.annotations.ApiStatus; +import org.jspecify.annotations.NullMarked; \ No newline at end of file diff --git a/src/main/java/dev/lukebemish/excavatedvariants/impl/mixin/BlockBehaviorAccessor.java b/src/main/java/dev/lukebemish/excavatedvariants/impl/mixin/BlockBehaviorAccessor.java new file mode 100644 index 00000000..05b4b26b --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/impl/mixin/BlockBehaviorAccessor.java @@ -0,0 +1,21 @@ +package dev.lukebemish.excavatedvariants.impl.mixin; + +import net.minecraft.core.BlockPos; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.block.state.BlockBehaviour; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.storage.loot.LootParams; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.gen.Invoker; + +import java.util.List; + +@Mixin(BlockBehaviour.class) +public interface BlockBehaviorAccessor { + @Invoker("getDrops") + List excavated_variants$getDrops(BlockState state, LootParams.Builder params); + + @Invoker("spawnAfterBreak") + void excavated_variants$spawnAfterBreak(BlockState state, ServerLevel level, BlockPos pos, ItemStack stack, boolean bl); +} diff --git a/src/main/java/dev/lukebemish/excavatedvariants/impl/mixin/BlockMixin.java b/src/main/java/dev/lukebemish/excavatedvariants/impl/mixin/BlockMixin.java new file mode 100644 index 00000000..c6b070f2 --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/impl/mixin/BlockMixin.java @@ -0,0 +1,49 @@ +package dev.lukebemish.excavatedvariants.impl.mixin; + +import dev.lukebemish.excavatedvariants.api.data.Ore; +import dev.lukebemish.excavatedvariants.api.data.Stone; +import dev.lukebemish.excavatedvariants.impl.worldgen.OreFound; +import net.minecraft.world.level.block.Block; +import org.jspecify.annotations.Nullable; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.Unique; + +@Mixin(Block.class) +public class BlockMixin implements OreFound { + @Unique + private @Nullable Stone excavated_variants$stone = null; + @Unique + private @Nullable Stone excavated_variants$oreStone = null; + @Unique + private @Nullable Ore excavated_variants$ore = null; + + @Override + public Ore excavated_variants$getOre() { + return excavated_variants$ore; + } + + @Override + public void excavated_variants$setOre(Ore o) { + excavated_variants$ore = o; + } + + @Override + public Stone excavated_variants$getOreStone() { + return excavated_variants$oreStone; + } + + @Override + public void excavated_variants$setOreStone(Stone o) { + excavated_variants$oreStone = o; + } + + @Override + public Stone excavated_variants$getStone() { + return excavated_variants$stone; + } + + @Override + public void excavated_variants$setStone(Stone stone) { + excavated_variants$stone = stone; + } +} diff --git a/src/main/java/dev/lukebemish/excavatedvariants/impl/mixin/BlockPropertiesMixin.java b/src/main/java/dev/lukebemish/excavatedvariants/impl/mixin/BlockPropertiesMixin.java new file mode 100644 index 00000000..77123fd8 --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/impl/mixin/BlockPropertiesMixin.java @@ -0,0 +1,30 @@ +package dev.lukebemish.excavatedvariants.impl.mixin; + +import net.minecraft.world.level.block.state.BlockBehaviour; +import net.minecraft.world.level.block.state.BlockState; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.gen.Accessor; + +import java.util.function.ToIntFunction; + +@Mixin(BlockBehaviour.Properties.class) +public interface BlockPropertiesMixin { + + @Accessor + boolean getIsRandomlyTicking(); + + @Accessor + void setIsRandomlyTicking(boolean isRandomlyTicking); + + @Accessor + void setDynamicShape(boolean dynamicShape); + + @Accessor + void setHasCollision(boolean hasCollision); + + @Accessor + ToIntFunction getLightEmission(); + + @Accessor + void setLightEmission(ToIntFunction lightEmission); +} diff --git a/src/main/java/dev/lukebemish/excavatedvariants/impl/mixin/BuiltInRegistriesMixin.java b/src/main/java/dev/lukebemish/excavatedvariants/impl/mixin/BuiltInRegistriesMixin.java new file mode 100644 index 00000000..9ecf3801 --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/impl/mixin/BuiltInRegistriesMixin.java @@ -0,0 +1,15 @@ +package dev.lukebemish.excavatedvariants.impl.mixin; + +import net.minecraft.core.WritableRegistry; +import net.minecraft.core.registries.BuiltInRegistries; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.gen.Accessor; + +@Mixin(BuiltInRegistries.class) +public interface BuiltInRegistriesMixin { + + @Accessor("WRITABLE_REGISTRY") + static WritableRegistry> excavated_variants$getWritableRegistry() { + throw new IllegalStateException(); + } +} diff --git a/src/main/java/dev/lukebemish/excavatedvariants/impl/mixin/CreativeModeTabMixin.java b/src/main/java/dev/lukebemish/excavatedvariants/impl/mixin/CreativeModeTabMixin.java new file mode 100644 index 00000000..6793d554 --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/impl/mixin/CreativeModeTabMixin.java @@ -0,0 +1,30 @@ +package dev.lukebemish.excavatedvariants.impl.mixin; + +import dev.lukebemish.excavatedvariants.impl.ExcavatedVariants; +import dev.lukebemish.excavatedvariants.impl.platform.Services; +import net.minecraft.world.item.CreativeModeTab; +import net.minecraft.world.item.ItemStack; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.Unique; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; + +@Mixin(CreativeModeTab.class) +public class CreativeModeTabMixin { + @Unique + private static final int MAX_INT_VAL = (int) Math.sqrt(Integer.MAX_VALUE); + + @Inject(method = "getIconItem", at = @At("RETURN"), cancellable = true) + private void excavated_variants$itemIconInjection(CallbackInfoReturnable cir) { + //noinspection ConstantValue + if ((Object) this != Services.CREATIVE_TAB_LOADER.get().getCreativeTab()) { + return; + } + if (ExcavatedVariants.ITEMS.isEmpty()) { + return; + } + int time = (int) ((System.currentTimeMillis() / 1000) % MAX_INT_VAL); + cir.setReturnValue(new ItemStack(ExcavatedVariants.ITEMS.get((time * time) % ExcavatedVariants.ITEMS.size()).get())); + } +} diff --git a/src/main/java/dev/lukebemish/excavatedvariants/impl/mixin/MappedRegistryAccessor.java b/src/main/java/dev/lukebemish/excavatedvariants/impl/mixin/MappedRegistryAccessor.java new file mode 100644 index 00000000..b18a3077 --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/impl/mixin/MappedRegistryAccessor.java @@ -0,0 +1,11 @@ +package dev.lukebemish.excavatedvariants.impl.mixin; + +import net.minecraft.core.MappedRegistry; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.gen.Accessor; + +@Mixin(MappedRegistry.class) +public interface MappedRegistryAccessor { + @Accessor("frozen") + void excavated_variants$setFrozen(boolean frozen); +} diff --git a/src/main/java/dev/lukebemish/excavatedvariants/impl/mixin/MappedRegistryMixin.java b/src/main/java/dev/lukebemish/excavatedvariants/impl/mixin/MappedRegistryMixin.java new file mode 100644 index 00000000..5226786c --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/impl/mixin/MappedRegistryMixin.java @@ -0,0 +1,29 @@ +package dev.lukebemish.excavatedvariants.impl.mixin; + +import dev.lukebemish.excavatedvariants.impl.BlockAddedCallback; +import net.minecraft.core.Holder; +import net.minecraft.core.MappedRegistry; +import net.minecraft.core.RegistrationInfo; +import net.minecraft.core.Registry; +import net.minecraft.core.registries.Registries; +import net.minecraft.resources.ResourceKey; +import net.minecraft.world.level.block.Block; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; + +@Mixin(MappedRegistry.class) +public abstract class MappedRegistryMixin implements Registry { + @Inject( + method = "register(Lnet/minecraft/resources/ResourceKey;Ljava/lang/Object;Lnet/minecraft/core/RegistrationInfo;)Lnet/minecraft/core/Holder$Reference;", + at = @At("RETURN") + ) + private void excavated_variants$onRegistry(ResourceKey key, V entry, RegistrationInfo registrationInfo, CallbackInfoReturnable> cir) { + //noinspection RedundantCast,rawtypes + if (this.key() == (ResourceKey) Registries.BLOCK) { + //noinspection unchecked + BlockAddedCallback.onRegister((Block) entry, (ResourceKey) key); + } + } +} diff --git a/src/main/java/dev/lukebemish/excavatedvariants/impl/mixin/TieredItemMixin.java b/src/main/java/dev/lukebemish/excavatedvariants/impl/mixin/TieredItemMixin.java new file mode 100644 index 00000000..019f257f --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/impl/mixin/TieredItemMixin.java @@ -0,0 +1,21 @@ +package dev.lukebemish.excavatedvariants.impl.mixin; + +import dev.lukebemish.excavatedvariants.impl.KnownTiers; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.Tier; +import net.minecraft.world.item.TieredItem; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; + +@Mixin(TieredItem.class) +public class TieredItemMixin { + @Inject( + method = "(Lnet/minecraft/world/item/Tier;Lnet/minecraft/world/item/Item$Properties;)V", + at = @At("RETURN") + ) + private void onInit(Tier tier, Item.Properties properties, CallbackInfo ci) { + KnownTiers.KNOWN_TIERS.put(tier.getIncorrectBlocksForDrops(), tier); + } +} diff --git a/src/main/java/dev/lukebemish/excavatedvariants/impl/mixin/package-info.java b/src/main/java/dev/lukebemish/excavatedvariants/impl/mixin/package-info.java new file mode 100644 index 00000000..408057e6 --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/impl/mixin/package-info.java @@ -0,0 +1,6 @@ +@NullMarked +@ApiStatus.Internal +package dev.lukebemish.excavatedvariants.impl.mixin; + +import org.jetbrains.annotations.ApiStatus; +import org.jspecify.annotations.NullMarked; \ No newline at end of file diff --git a/src/main/java/dev/lukebemish/excavatedvariants/impl/network/AckOresPayload.java b/src/main/java/dev/lukebemish/excavatedvariants/impl/network/AckOresPayload.java new file mode 100644 index 00000000..ece312c8 --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/impl/network/AckOresPayload.java @@ -0,0 +1,16 @@ +package dev.lukebemish.excavatedvariants.impl.network; + +import dev.lukebemish.excavatedvariants.impl.ExcavatedVariants; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.network.codec.StreamCodec; +import net.minecraft.network.protocol.common.custom.CustomPacketPayload; + +public record AckOresPayload() implements CustomPacketPayload { + public static final StreamCodec CODEC = StreamCodec.unit(new AckOresPayload()); + public static final CustomPacketPayload.Type TYPE = new CustomPacketPayload.Type<>(ExcavatedVariants.id("ack_ores")); + + @Override + public Type type() { + return TYPE; + } +} diff --git a/src/main/java/dev/lukebemish/excavatedvariants/impl/network/SyncOresPayload.java b/src/main/java/dev/lukebemish/excavatedvariants/impl/network/SyncOresPayload.java new file mode 100644 index 00000000..f208fc11 --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/impl/network/SyncOresPayload.java @@ -0,0 +1,57 @@ +package dev.lukebemish.excavatedvariants.impl.network; + +import dev.lukebemish.excavatedvariants.impl.ExcavatedVariants; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.network.codec.StreamCodec; +import net.minecraft.network.protocol.common.custom.CustomPacketPayload; + +import java.util.ArrayList; +import java.util.HashSet; +import java.util.Set; +import java.util.function.Consumer; +import java.util.stream.Collectors; + +public record SyncOresPayload(Set blocks) implements CustomPacketPayload { + public static final StreamCodec CODEC = StreamCodec.of(SyncOresPayload::encode, SyncOresPayload::decode); + public static final CustomPacketPayload.Type TYPE = new CustomPacketPayload.Type<>(ExcavatedVariants.id("sync_ores")); + + private static SyncOresPayload decode(FriendlyByteBuf buffer) { + ArrayList blocks = new ArrayList<>(); + int i = buffer.readInt(); + for (int j = 0; j < i; j++) blocks.add(buffer.readUtf()); + return new SyncOresPayload(new HashSet<>(blocks)); + } + + private static void encode(FriendlyByteBuf buffer, SyncOresPayload payload) { + buffer.writeInt(payload.blocks.size()); + payload.blocks.forEach(buffer::writeUtf); + } + + public void consumeMessage(Consumer disconnecter) { + ExcavatedVariants.setupMap(); + Set knownBlocks = ExcavatedVariants.COMPLETE_VARIANTS.stream().map(v -> v.fullId).collect(Collectors.toSet()); + var serverOnly = this.blocks.stream().filter(b -> !knownBlocks.contains(b)).collect(Collectors.toSet()); + var clientOnly = knownBlocks.stream().filter(b -> !this.blocks.contains(b)).collect(Collectors.toSet()); + + if (clientOnly.isEmpty() && serverOnly.isEmpty()) { + return; + } + String disconnect = "Connection closed - mismatched ore variant list"; + if (!clientOnly.isEmpty()) { + String clientOnlyStr = String.join("\n ", clientOnly.stream().toList()); + ExcavatedVariants.LOGGER.error("Client contains ore variants not present on server:\n {}", clientOnlyStr); + disconnect += "\nSee log for details"; + } + if (!serverOnly.isEmpty()) { + String serverOnlyStr = String.join("\n ", serverOnly.stream().toList()); + ExcavatedVariants.LOGGER.error("Server contains ore variants not present on client:\n {}", serverOnlyStr); + disconnect += "\nSee log for details"; + } + disconnecter.accept(disconnect); + } + + @Override + public Type type() { + return TYPE; + } +} diff --git a/src/main/java/dev/lukebemish/excavatedvariants/impl/network/package-info.java b/src/main/java/dev/lukebemish/excavatedvariants/impl/network/package-info.java new file mode 100644 index 00000000..8911d452 --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/impl/network/package-info.java @@ -0,0 +1,6 @@ +@ApiStatus.Internal +@NullMarked +package dev.lukebemish.excavatedvariants.impl.network; + +import org.jetbrains.annotations.ApiStatus; +import org.jspecify.annotations.NullMarked; \ No newline at end of file diff --git a/src/main/java/dev/lukebemish/excavatedvariants/impl/package-info.java b/src/main/java/dev/lukebemish/excavatedvariants/impl/package-info.java new file mode 100644 index 00000000..42e6f9de --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/impl/package-info.java @@ -0,0 +1,6 @@ +@NullMarked +@ApiStatus.Internal +package dev.lukebemish.excavatedvariants.impl; + +import org.jetbrains.annotations.ApiStatus; +import org.jspecify.annotations.NullMarked; \ No newline at end of file diff --git a/src/main/java/dev/lukebemish/excavatedvariants/impl/platform/Services.java b/src/main/java/dev/lukebemish/excavatedvariants/impl/platform/Services.java new file mode 100644 index 00000000..51371820 --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/impl/platform/Services.java @@ -0,0 +1,32 @@ +package dev.lukebemish.excavatedvariants.impl.platform; + +import com.google.common.base.Suppliers; +import dev.lukebemish.excavatedvariants.impl.platform.services.CreativeTabLoader; +import dev.lukebemish.excavatedvariants.impl.platform.services.Platform; + +import java.util.List; +import java.util.ServiceLoader; +import java.util.function.Supplier; + +public class Services { + public static final Platform PLATFORM = load(Platform.class); + public static final Supplier CREATIVE_TAB_LOADER = loadLazy(CreativeTabLoader.class); + + public static T load(Class clazz) { + return ServiceLoader.load(clazz) + .findFirst() + .orElseThrow(() -> new NullPointerException("Failed to load service for " + clazz.getName())); + } + + public static List loadListeners(Class clazz) { + return ServiceLoader.load(clazz) + .stream() + .map(ServiceLoader.Provider::get) + .sorted() + .toList(); + } + + public static Supplier loadLazy(Class clazz) { + return Suppliers.memoize(() -> load(clazz)); + } +} diff --git a/src/main/java/dev/lukebemish/excavatedvariants/impl/platform/package-info.java b/src/main/java/dev/lukebemish/excavatedvariants/impl/platform/package-info.java new file mode 100644 index 00000000..40800410 --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/impl/platform/package-info.java @@ -0,0 +1,6 @@ +@NullMarked +@ApiStatus.Internal +package dev.lukebemish.excavatedvariants.impl.platform; + +import org.jetbrains.annotations.ApiStatus; +import org.jspecify.annotations.NullMarked; \ No newline at end of file diff --git a/src/main/java/dev/lukebemish/excavatedvariants/impl/platform/services/CreativeTabLoader.java b/src/main/java/dev/lukebemish/excavatedvariants/impl/platform/services/CreativeTabLoader.java new file mode 100644 index 00000000..463dbf23 --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/impl/platform/services/CreativeTabLoader.java @@ -0,0 +1,12 @@ +package dev.lukebemish.excavatedvariants.impl.platform.services; + +import dev.lukebemish.excavatedvariants.impl.ExcavatedVariants; + +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.item.CreativeModeTab; + +public interface CreativeTabLoader { + ResourceLocation CREATIVE_TAB_ID = new ResourceLocation(ExcavatedVariants.MOD_ID, "excavated_variants"); + void registerCreativeTab(); + CreativeModeTab getCreativeTab(); +} diff --git a/src/main/java/dev/lukebemish/excavatedvariants/impl/platform/services/Platform.java b/src/main/java/dev/lukebemish/excavatedvariants/impl/platform/services/Platform.java new file mode 100644 index 00000000..ddd2a876 --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/impl/platform/services/Platform.java @@ -0,0 +1,19 @@ +package dev.lukebemish.excavatedvariants.impl.platform.services; + +import dev.lukebemish.excavatedvariants.impl.ExcavatedVariants; + +import java.nio.file.Path; +import java.util.Set; + +public interface Platform { + + Path getConfigFolder(); + Path getModDataFolder(); + + String getModVersion(); + + boolean isClient(); + Set getModIds(); + + void register(ExcavatedVariants.VariantFuture future); +} diff --git a/src/main/java/dev/lukebemish/excavatedvariants/impl/platform/services/package-info.java b/src/main/java/dev/lukebemish/excavatedvariants/impl/platform/services/package-info.java new file mode 100644 index 00000000..7dc9d8ab --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/impl/platform/services/package-info.java @@ -0,0 +1,6 @@ +@NullMarked +@ApiStatus.Internal +package dev.lukebemish.excavatedvariants.impl.platform.services; + +import org.jetbrains.annotations.ApiStatus; +import org.jspecify.annotations.NullMarked; \ No newline at end of file diff --git a/src/main/java/dev/lukebemish/excavatedvariants/impl/worldgen/OreFinderUtil.java b/src/main/java/dev/lukebemish/excavatedvariants/impl/worldgen/OreFinderUtil.java new file mode 100644 index 00000000..63160538 --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/impl/worldgen/OreFinderUtil.java @@ -0,0 +1,57 @@ +package dev.lukebemish.excavatedvariants.impl.worldgen; + +import dev.lukebemish.excavatedvariants.api.data.Ore; +import dev.lukebemish.excavatedvariants.api.data.Stone; +import dev.lukebemish.excavatedvariants.impl.ExcavatedVariants; +import dev.lukebemish.excavatedvariants.impl.ModLifecycle; +import dev.lukebemish.excavatedvariants.impl.RegistriesImpl; +import net.minecraft.core.registries.BuiltInRegistries; +import net.minecraft.world.level.block.Block; +import org.jspecify.annotations.Nullable; + +import java.util.IdentityHashMap; +import java.util.Map; +import java.util.Objects; + +public final class OreFinderUtil { + + private static final Map> ORE_STONE_MAP = new IdentityHashMap<>(); + + private OreFinderUtil() { + } + + public static @Nullable Block getBlock(Ore ore, Stone newStone) { + if (ModLifecycle.getLifecyclePhase() == ModLifecycle.POST) { + var map = ORE_STONE_MAP.get(ore); + if (map != null) { + return map.get(newStone); + } + } + return null; + } + + public static void setupBlocks() { + if (ModLifecycle.getLifecyclePhase() != ModLifecycle.POST) { + var e = new IllegalStateException("Something has gone badly wrong with load ordering. Please report this to Excavated Variants alongside a log!"); + ExcavatedVariants.LOGGER.error("...huh? Where are we? Expected {}, but in {}", ModLifecycle.POST.name(), ModLifecycle.getLifecyclePhase().name(), e); + throw e; + } + + for (Ore ore : RegistriesImpl.ORE_REGISTRY) { + Map map = new IdentityHashMap<>(); + for (var entry : ore.getBlocks().entrySet()) { + var stone = Objects.requireNonNull(RegistriesImpl.STONE_REGISTRY.get(entry.getValue())); + var block = Objects.requireNonNull(BuiltInRegistries.BLOCK.get(entry.getKey())); + ((OreFound) block).excavated_variants$setOre(ore); + ((OreFound) block).excavated_variants$setOreStone(stone); + map.put(stone, block); + } + ORE_STONE_MAP.put(ore, map); + } + for (Stone stone : RegistriesImpl.STONE_REGISTRY) { + var block = BuiltInRegistries.BLOCK.get(stone.block); + if (block == null) continue; + ((OreFound) block).excavated_variants$setStone(stone); + } + } +} diff --git a/src/main/java/dev/lukebemish/excavatedvariants/impl/worldgen/OreFound.java b/src/main/java/dev/lukebemish/excavatedvariants/impl/worldgen/OreFound.java new file mode 100644 index 00000000..01a1ba0f --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/impl/worldgen/OreFound.java @@ -0,0 +1,18 @@ +package dev.lukebemish.excavatedvariants.impl.worldgen; + +import dev.lukebemish.excavatedvariants.api.data.Ore; +import dev.lukebemish.excavatedvariants.api.data.Stone; + +public interface OreFound { + Ore excavated_variants$getOre(); + + void excavated_variants$setOre(Ore o); + + Stone excavated_variants$getOreStone(); + + void excavated_variants$setOreStone(Stone o); + + Stone excavated_variants$getStone(); + + void excavated_variants$setStone(Stone stone); +} diff --git a/src/main/java/dev/lukebemish/excavatedvariants/impl/worldgen/OreGenMapSavedData.java b/src/main/java/dev/lukebemish/excavatedvariants/impl/worldgen/OreGenMapSavedData.java new file mode 100644 index 00000000..ecfefee1 --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/impl/worldgen/OreGenMapSavedData.java @@ -0,0 +1,103 @@ +package dev.lukebemish.excavatedvariants.impl.worldgen; + +import dev.lukebemish.excavatedvariants.impl.ExcavatedVariants; +import it.unimi.dsi.fastutil.objects.Object2IntMap; +import it.unimi.dsi.fastutil.objects.Object2IntMaps; +import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap; +import net.minecraft.core.HolderLookup; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.world.level.ServerLevelAccessor; +import net.minecraft.world.level.saveddata.SavedData; +import org.jspecify.annotations.NonNull; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; +import java.util.Set; + +public class OreGenMapSavedData extends SavedData { + public static final String DATA_KEY = ExcavatedVariants.MOD_ID + "_ore_replacement"; + private final Object2IntMap edgeCount; + private final Set ranMap = Collections.synchronizedSet(new HashSet<>()); + + public OreGenMapSavedData() { + Object2IntMap edgeMap = new Object2IntOpenHashMap<>(); + edgeMap.defaultReturnValue(0); + this.edgeCount = Object2IntMaps.synchronize(edgeMap); + } + + public int getEdgeCount(ChunkKey chunkPos) { + return edgeCount.getInt(chunkPos); + } + + public void setEdgeCount(ChunkKey chunkPos, int count) { + edgeCount.put(chunkPos, count); + this.setDirty(); + } + + public void chunkRan(ChunkKey chunkPos) { + ranMap.add(chunkPos); + this.setDirty(); + } + + public boolean didChunkRun(ChunkKey chunkPos) { + return ranMap.contains(chunkPos); + } + + public record ChunkKey(int x, int z) {} + + private static OreGenMapSavedData load(CompoundTag tag, HolderLookup.Provider provider) { + OreGenMapSavedData data = new OreGenMapSavedData(); + int[] edge1 = tag.getIntArray("edge_1"); + int[] edge2 = tag.getIntArray("edge_2"); + int[] edge3 = tag.getIntArray("edge_3"); + int[] ran1 = tag.getIntArray("ran_1"); + int[] ran2 = tag.getIntArray("ran_2"); + if (edge1.length == edge2.length && edge1.length == edge3.length && ran1.length == ran2.length) { + for (int i = 0; i < edge1.length; i++) { + data.edgeCount.put(new ChunkKey(edge1[i], edge2[i]), edge3[i]); + } + for (int i = 0; i < ran1.length; i++) { + data.ranMap.add(new ChunkKey(ran1[i], ran2[i])); + } + } + return data; + } + + private static OreGenMapSavedData create() { + return new OreGenMapSavedData(); + } + + public static OreGenMapSavedData getOrCreate(ServerLevelAccessor world) { + // (handled by a mixin) + //noinspection DataFlowIssue + return world.getLevel().getDataStorage().computeIfAbsent( + new SavedData.Factory<>(OreGenMapSavedData::create, OreGenMapSavedData::load, null), + DATA_KEY + ); + } + + @Override + public CompoundTag save(@NonNull CompoundTag tag, HolderLookup.Provider provider) { + ArrayList edge1 = new ArrayList<>(); + ArrayList edge2 = new ArrayList<>(); + ArrayList edge3 = new ArrayList<>(); + ArrayList ran1 = new ArrayList<>(); + ArrayList ran2 = new ArrayList<>(); + for (ChunkKey p : edgeCount.keySet()) { + edge1.add(p.x()); + edge2.add(p.z()); + edge3.add(edgeCount.getInt(p)); + } + for (ChunkKey p : ranMap) { + ran1.add(p.x()); + ran2.add(p.z()); + } + tag.putIntArray("edge_1", edge1.stream().mapToInt(Integer::intValue).toArray()); + tag.putIntArray("edge_2", edge2.stream().mapToInt(Integer::intValue).toArray()); + tag.putIntArray("edge_3", edge3.stream().mapToInt(Integer::intValue).toArray()); + tag.putIntArray("ran_1", ran1.stream().mapToInt(Integer::intValue).toArray()); + tag.putIntArray("ran_2", ran2.stream().mapToInt(Integer::intValue).toArray()); + return tag; + } +} diff --git a/src/main/java/dev/lukebemish/excavatedvariants/impl/worldgen/OreReplacer.java b/src/main/java/dev/lukebemish/excavatedvariants/impl/worldgen/OreReplacer.java new file mode 100644 index 00000000..b82ba116 --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/impl/worldgen/OreReplacer.java @@ -0,0 +1,110 @@ +package dev.lukebemish.excavatedvariants.impl.worldgen; + +import dev.lukebemish.excavatedvariants.api.data.Ore; +import dev.lukebemish.excavatedvariants.api.data.Stone; +import dev.lukebemish.excavatedvariants.impl.ExcavatedVariants; +import net.minecraft.core.BlockPos; +import net.minecraft.core.SectionPos; +import net.minecraft.world.level.WorldGenLevel; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.chunk.ChunkAccess; +import net.minecraft.world.level.chunk.LevelChunkSection; +import net.minecraft.world.level.levelgen.feature.Feature; +import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext; +import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration; +import org.jspecify.annotations.NonNull; +import org.jspecify.annotations.Nullable; + +public class OreReplacer extends Feature { + private static final int[] xs = new int[]{-1, 0, 1, 1, -1, -1, 0, 1}; + private static final int[] zs = new int[]{-1, -1, -1, 0, 0, 1, 1, 1}; + private static final int[] as = {1, 0, 0, -1, 0, 0}; + private static final int[] bs = {0, -1, 1, 0, 0, 0}; + private static final int[] ys = {0, 0, 0, 0, -1, 1}; + + public OreReplacer() { + super(NoneFeatureConfiguration.CODEC); + } + + @Override + public boolean place(@NonNull FeaturePlaceContext ctx) { + if (!ExcavatedVariants.getConfig().attemptWorldgenReplacement) + return true; + return modifyUnmodifiedNeighboringChunks(ctx.level(), ctx.origin()); + } + + public boolean modifyUnmodifiedNeighboringChunks(WorldGenLevel level, BlockPos pos) { + OreGenMapSavedData data = OreGenMapSavedData.getOrCreate(level); + int minY = level.getMinBuildHeight(); + int maxY = level.getMaxBuildHeight(); + BlockPos.MutableBlockPos newPos = new BlockPos.MutableBlockPos(pos.getX(), pos.getY(), pos.getZ()); + for (int i = 0; i < xs.length; i++) { + newPos.setX(pos.getX() + xs[i] * 16); + newPos.setZ(pos.getZ() + zs[i] * 16); + OreGenMapSavedData.ChunkKey chunkPos = new OreGenMapSavedData.ChunkKey(newPos.getX(), newPos.getZ()); + data.setEdgeCount(chunkPos, data.getEdgeCount(chunkPos) + 1); + if (data.getEdgeCount(chunkPos) == 8 && data.didChunkRun(chunkPos)) { + ChunkAccess chunkAccess = level.getChunk(newPos); + modifyChunk(chunkAccess, minY, maxY); + data.setEdgeCount(chunkPos, 9); + } + } + OreGenMapSavedData.ChunkKey chunkPos = new OreGenMapSavedData.ChunkKey(pos.getX(), pos.getZ()); + data.chunkRan(chunkPos); + if (data.getEdgeCount(chunkPos) == 8) { + ChunkAccess chunkAccess = level.getChunk(pos); + modifyChunk(chunkAccess, minY, maxY); + data.setEdgeCount(chunkPos, 9); + } + return true; + } + + public void modifyChunk(ChunkAccess chunkAccess, int minY, int maxY) { + LevelChunkSection chunkSection = chunkAccess.getSection(chunkAccess.getSectionIndex(minY)); + int oldSectionIndex = SectionPos.blockToSectionCoord(minY); + for (int y = minY; y < maxY; y++) { + BlockState[][][] cache = new BlockState[16][16][16]; + int sectionIndex = SectionPos.blockToSectionCoord(y); + if (oldSectionIndex != sectionIndex) { + chunkSection = chunkAccess.getSection(chunkAccess.getSectionIndex(y)); + oldSectionIndex++; + } + if (chunkSection.hasOnlyAir()) { + y += 15; + continue; + } + for (int i = 0; i < 16; i++) { + inner_loop: + for (int j = 0; j < 16; j++) { + BlockState newState = cache[i][y & 15][j] == null ? chunkSection.getBlockState(i, y & 15, j) : cache[i][y & 15][j]; + if (cache[i][y & 15][j] == null) { + cache[i][y & 15][j] = newState; + } + @Nullable Ore ore = ((OreFound) newState.getBlock()).excavated_variants$getOre(); + if (ore != null) { + @Nullable Stone oreStone = ((OreFound) newState.getBlock()).excavated_variants$getOreStone(); + for (int c = 0; c < as.length; c++) { + if (i + as[c] < 16 && i + as[c] >= 0 && j + bs[c] < 16 && j + bs[c] >= 0 && y + ys[c] >= SectionPos.sectionToBlockCoord(sectionIndex) && y + ys[c] < SectionPos.sectionToBlockCoord(sectionIndex + 1)) { + BlockState thisState = cache[i + as[c]][y + ys[c] & 15][j + bs[c]]; + if (thisState == null) { + thisState = chunkSection.getBlockState(i + as[c], y + ys[c] & 15, j + bs[c]); + cache[i + as[c]][y + ys[c] & 15][j + bs[c]] = thisState; + } + Stone stone = ((OreFound) thisState.getBlock()).excavated_variants$getStone(); + if (stone != null && stone != oreStone) { + Block newOreBlock = OreFinderUtil.getBlock(ore, stone); + if (newOreBlock != null) { + BlockState def = newOreBlock.withPropertiesOf(thisState); + chunkSection.setBlockState(i, y & 15, j, def, false); + continue inner_loop; + } + } + } + } + } + } + } + } + } +} diff --git a/src/main/java/dev/lukebemish/excavatedvariants/impl/worldgen/package-info.java b/src/main/java/dev/lukebemish/excavatedvariants/impl/worldgen/package-info.java new file mode 100644 index 00000000..e7ad43cb --- /dev/null +++ b/src/main/java/dev/lukebemish/excavatedvariants/impl/worldgen/package-info.java @@ -0,0 +1,6 @@ +@NullMarked +@ApiStatus.Internal +package dev.lukebemish.excavatedvariants.impl.worldgen; + +import org.jetbrains.annotations.ApiStatus; +import org.jspecify.annotations.NullMarked; \ No newline at end of file diff --git a/src/main/resources/assets/excavated_variants/lang/en_us.json b/src/main/resources/assets/excavated_variants/lang/en_us.json new file mode 100644 index 00000000..d7b972f1 --- /dev/null +++ b/src/main/resources/assets/excavated_variants/lang/en_us.json @@ -0,0 +1,3 @@ +{ + "itemGroup.excavated_variants.excavated_variants": "Excavated Variants" +} \ No newline at end of file diff --git a/src/main/resources/data/excavated_variants/worldgen/configured_feature/ore_replacer.json b/src/main/resources/data/excavated_variants/worldgen/configured_feature/ore_replacer.json new file mode 100644 index 00000000..aab9d033 --- /dev/null +++ b/src/main/resources/data/excavated_variants/worldgen/configured_feature/ore_replacer.json @@ -0,0 +1,4 @@ +{ + "type": "excavated_variants:ore_replacer", + "config": {} +} \ No newline at end of file diff --git a/src/main/resources/data/excavated_variants/worldgen/placed_feature/ore_replacer.json b/src/main/resources/data/excavated_variants/worldgen/placed_feature/ore_replacer.json new file mode 100644 index 00000000..7cae5b99 --- /dev/null +++ b/src/main/resources/data/excavated_variants/worldgen/placed_feature/ore_replacer.json @@ -0,0 +1,4 @@ +{ + "feature": "excavated_variants:ore_replacer", + "placement": [] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources.meta.json b/src/main/resources/defaultresources.meta.json new file mode 100644 index 00000000..c37e6a0c --- /dev/null +++ b/src/main/resources/defaultresources.meta.json @@ -0,0 +1,4 @@ +{ + "resources_path": "defaultresources", + "zip": true +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ground_type/end.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ground_type/end.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ground_type/end.json @@ -0,0 +1 @@ +{} diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ground_type/mysticalagriculture/soul.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ground_type/mysticalagriculture/soul.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ground_type/mysticalagriculture/soul.json @@ -0,0 +1 @@ +{} diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ground_type/nether.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ground_type/nether.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ground_type/nether.json @@ -0,0 +1 @@ +{} diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ground_type/overworld.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ground_type/overworld.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ground_type/overworld.json @@ -0,0 +1 @@ +{} diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/modifier/tag_attachment.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/modifier/tag_attachment.json new file mode 100644 index 00000000..6d20bca2 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/modifier/tag_attachment.json @@ -0,0 +1,24 @@ +{ + "filter": { + "type": "and", + "filters": [ + { + "type": "or", + "filters": [ + "ground_type@excavated_variants:overworld", + "ground_type@excavated_variants:nether", + "ground_type@excavated_variants:end", + "ground_type@excavated_variants:mysticalagriculture/soul" + ] + }, + "generated" + ] + }, + "tags": [ + "minecraft:blocks/mineable/pickaxe", + "forge:blocks/ores", + "forge:items/ores", + "c:blocks/ores", + "c:items/ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/betterend/amber_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/betterend/amber_ore.json new file mode 100644 index 00000000..a992f623 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/betterend/amber_ore.json @@ -0,0 +1,14 @@ +{ + "types": [ + "excavated_variants:end" + ], + "translations": { + "en_us": "Amber Ore" + }, + "blocks": { + "betterend:amber_ore": "excavated_variants:minecraft/end_stone" + }, + "tags": [ + "c:ores/amber" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/betterend/ender_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/betterend/ender_ore.json new file mode 100644 index 00000000..ad7d03e1 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/betterend/ender_ore.json @@ -0,0 +1,14 @@ +{ + "types": [ + "excavated_variants:end" + ], + "translations": { + "en_us": "Ender Ore" + }, + "blocks": { + "betterend:ender_ore": "excavated_variants:minecraft/end_stone" + }, + "tags": [ + "c:ores/ender" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/betterend/thallasium_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/betterend/thallasium_ore.json new file mode 100644 index 00000000..1ca3bf8e --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/betterend/thallasium_ore.json @@ -0,0 +1,14 @@ +{ + "types": [ + "excavated_variants:end" + ], + "translations": { + "en_us": "Thallasium Ore" + }, + "blocks": { + "betterend:thallasium_ore": "excavated_variants:minecraft/end_stone" + }, + "tags": [ + "c:ores/thallasium" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/betternether/cincinnasite_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/betternether/cincinnasite_ore.json new file mode 100644 index 00000000..f0801866 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/betternether/cincinnasite_ore.json @@ -0,0 +1,14 @@ +{ + "types": [ + "excavated_variants:nether" + ], + "translations": { + "en_us": "Cincinnasite Ore" + }, + "blocks": { + "betternether:cincinnasite_ore": "excavated_variants:minecraft/netherrack" + }, + "tags": [ + "c:ores/cincinnasite" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/betternether/ruby_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/betternether/ruby_ore.json new file mode 100644 index 00000000..32c344ce --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/betternether/ruby_ore.json @@ -0,0 +1,14 @@ +{ + "types": [ + "excavated_variants:nether" + ], + "translations": { + "en_us": "Ruby Ore" + }, + "blocks": { + "betternether:nether_ruby_ore": "excavated_variants:minecraft/netherrack" + }, + "tags": [ + "c:ores/ruby" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/bewitchment/salt_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/bewitchment/salt_ore.json new file mode 100644 index 00000000..566d4f2b --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/bewitchment/salt_ore.json @@ -0,0 +1,15 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Salt Ore" + }, + "blocks": { + "bewitchment:salt_ore": "excavated_variants:minecraft/stone", + "bewitchment:deepslate_salt_ore": "excavated_variants:minecraft/deepslate" + }, + "tags": [ + "c:ores/salt" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/bewitchment/silver_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/bewitchment/silver_ore.json new file mode 100644 index 00000000..57598615 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/bewitchment/silver_ore.json @@ -0,0 +1,15 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Silver Ore" + }, + "blocks": { + "bewitchment:silver_ore": "excavated_variants:minecraft/stone", + "bewitchment:deepslate_silver_ore": "excavated_variants:minecraft/deepslate" + }, + "tags": [ + "c:ores/silver" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/bigreactors/yellorite_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/bigreactors/yellorite_ore.json new file mode 100644 index 00000000..27c1db1c --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/bigreactors/yellorite_ore.json @@ -0,0 +1,19 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Yellorite Ore" + }, + "blocks": { + "bigreactors:yellorite_ore": "excavated_variants:minecraft/stone" + }, + "tags": [ + "forge:ores/uranium", + "c:ores/uranium", + "c:uranium_ores", + "forge:ores/yellorite", + "c:ores/yellorite", + "c:yellorite_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/byg/ametrine_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/byg/ametrine_ore.json new file mode 100644 index 00000000..fdfa93d1 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/byg/ametrine_ore.json @@ -0,0 +1,16 @@ +{ + "types": [ + "excavated_variants:end" + ], + "translations": { + "en_us": "Ametrine Ore" + }, + "blocks": { + "byg:ametrine_ore": "excavated_variants:byg/ether_stone" + }, + "tags": [ + "forge:ores/ametrine", + "c:ores/ametrine", + "c:ametrine_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/byg/anthracite_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/byg/anthracite_ore.json new file mode 100644 index 00000000..5f71d794 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/byg/anthracite_ore.json @@ -0,0 +1,16 @@ +{ + "types": [ + "excavated_variants:nether" + ], + "translations": { + "en_us": "Anthracite Ore" + }, + "blocks": { + "byg:anthracite_ore": "excavated_variants:byg/brimstone" + }, + "tags": [ + "forge:ores/anthracite", + "c:ores/anthracite", + "c:anthracite_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/byg/emeraldite_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/byg/emeraldite_ore.json new file mode 100644 index 00000000..bdd83ac2 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/byg/emeraldite_ore.json @@ -0,0 +1,16 @@ +{ + "types": [ + "excavated_variants:nether" + ], + "translations": { + "en_us": "Emeraldite Ore" + }, + "blocks": { + "byg:emeraldite_ore": "excavated_variants:byg/scoria" + }, + "tags": [ + "forge:ores/emeraldite", + "c:ores/emeraldite", + "c:emeraldite_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/byg/pendorite_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/byg/pendorite_ore.json new file mode 100644 index 00000000..6ab8a4e3 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/byg/pendorite_ore.json @@ -0,0 +1,16 @@ +{ + "types": [ + "excavated_variants:nether" + ], + "translations": { + "en_us": "Pendorite Ore" + }, + "blocks": { + "byg:pendorite_ore": "excavated_variants:byg/blue_netherrack" + }, + "tags": [ + "forge:ores/pendorite", + "c:ores/pendorite", + "c:pendorite_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/create/zinc_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/create/zinc_ore.json new file mode 100644 index 00000000..64b1ac14 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/create/zinc_ore.json @@ -0,0 +1,36 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Zinc Ore" + }, + "blocks": { + "create:zinc_ore": { + "stone": "excavated_variants:minecraft/stone", + "generating": true + }, + "create:deepslate_zinc_ore": "excavated_variants:minecraft/deepslate", + "spelunkery:granite_zinc_ore": { + "stone": "excavated_variants:minecraft/granite", + "required_mods": ["spelunkery", "create"] + }, + "spelunkery:diorite_zinc_ore": { + "stone": "excavated_variants:minecraft/diorite", + "required_mods": ["spelunkery", "create"] + }, + "spelunkery:andesite_zinc_ore": { + "stone": "excavated_variants:minecraft/andesite", + "required_mods": ["spelunkery", "create"] + }, + "spelunkery:tuff_zinc_ore": { + "stone": "excavated_variants:minecraft/tuff", + "required_mods": ["spelunkery", "create"] + } + }, + "tags": [ + "forge:ores/zinc", + "c:ores/zinc", + "c:zinc_ores" + ] +} diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/darkerdepths/silver_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/darkerdepths/silver_ore.json new file mode 100644 index 00000000..473384b7 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/darkerdepths/silver_ore.json @@ -0,0 +1,18 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Silver Ore" + }, + "blocks": { + "darkerdepths:silver_ore": "excavated_variants:minecraft/stone", + "darkerdepths:limestone_silver_ore": "excavated_variants:darkerdepths/limestone", + "darkerdepths:aridrock_silver_ore": "excavated_variants:darkerdepths/aridrock" + }, + "tags": [ + "forge:ores/silver", + "c:ores/silver", + "c:silver_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/embers/lead_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/embers/lead_ore.json new file mode 100644 index 00000000..ffe8f6c2 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/embers/lead_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Lead Ore" + }, + "blocks": { + "embers:lead_ore": "excavated_variants:minecraft/stone", + "embers:deepslate_lead_ore": "excavated_variants:minecraft/deepslate" + }, + "tags": [ + "forge:ores/lead", + "c:ores/lead", + "c:lead_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/embers/silver_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/embers/silver_ore.json new file mode 100644 index 00000000..51a49dde --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/embers/silver_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Silver Ore" + }, + "blocks": { + "embers:silver_ore": "excavated_variants:minecraft/stone", + "embers:deepslate_silver_ore": "excavated_variants:minecraft/deepslate" + }, + "tags": [ + "forge:ores/silver", + "c:ores/silver", + "c:silver_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/enriched/ruby_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/enriched/ruby_ore.json new file mode 100644 index 00000000..29bd1f46 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/enriched/ruby_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Ruby Ore" + }, + "blocks": { + "enriched:ruby_ore": "excavated_variants:minecraft/stone", + "enriched:deepslate_ruby_ore": "excavated_variants:minecraft/deepslate" + }, + "tags": [ + "forge:ores/ruby", + "c:ores/ruby", + "c:ruby_ores" + ] +} diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/enriched/sapphire_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/enriched/sapphire_ore.json new file mode 100644 index 00000000..5d0dbf65 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/enriched/sapphire_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Sapphire Ore" + }, + "blocks": { + "enriched:sapphire_ore": "excavated_variants:minecraft/stone", + "enriched:deepslate_sapphire_ore": "excavated_variants:minecraft/deepslate" + }, + "tags": [ + "forge:ores/sapphire", + "c:ores/sapphire", + "c:sapphire_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/enriched/tanzanite_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/enriched/tanzanite_ore.json new file mode 100644 index 00000000..45b17c01 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/enriched/tanzanite_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Tanzanite Ore" + }, + "blocks": { + "enriched:tanzanite_ore": "excavated_variants:minecraft/stone", + "enriched:deepslate_tanzanite_ore": "excavated_variants:minecraft/deepslate" + }, + "tags": [ + "forge:ores/tanzanite", + "c:ores/tanzanite", + "c:tanzanite_ores" + ] +} diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/galosphere/silver_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/galosphere/silver_ore.json new file mode 100644 index 00000000..9939acdc --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/galosphere/silver_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Silver Ore" + }, + "blocks": { + "galosphere:deepslate_silver_ore": "excavated_variants:minecraft/deepslate", + "galosphere:silver_ore": "excavated_variants:minecraft/stone" + }, + "tags": [ + "forge:ores/silver", + "c:ores/silver", + "c:silver_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/gemsnjewels/alexandrite_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/gemsnjewels/alexandrite_ore.json new file mode 100644 index 00000000..8e980012 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/gemsnjewels/alexandrite_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Alexandrite Ore" + }, + "blocks": { + "gemsnjewels:alexandrite_ore_block": "excavated_variants:minecraft/stone", + "gemsnjewels:alexandrite_deepslate_ore_block": "excavated_variants:minecraft/deepslate" + }, + "tags": [ + "forge:ores/alexandrite", + "c:ores/alexandrite", + "c:alexandrite_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/gemsnjewels/amethyst_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/gemsnjewels/amethyst_ore.json new file mode 100644 index 00000000..c6a841ac --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/gemsnjewels/amethyst_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Amethyst Ore" + }, + "blocks": { + "gemsnjewels:amethyst_ore_block": "excavated_variants:minecraft/stone", + "gemsnjewels:amethyst_deepslate_ore_block": "excavated_variants:minecraft/deepslate" + }, + "tags": [ + "forge:ores/amethyst", + "c:ores/amethyst", + "c:amethyst_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/gemsnjewels/ametrine_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/gemsnjewels/ametrine_ore.json new file mode 100644 index 00000000..ca673ce5 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/gemsnjewels/ametrine_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Ametrine Ore" + }, + "blocks": { + "gemsnjewels:ametrine_deepslate_ore_block": "excavated_variants:minecraft/deepslate", + "gemsnjewels:ametrine_ore_block": "excavated_variants:minecraft/stone" + }, + "tags": [ + "forge:ores/ametrine", + "c:ores/ametrine", + "c:ametrine_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/gemsnjewels/aquamarine_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/gemsnjewels/aquamarine_ore.json new file mode 100644 index 00000000..640a7a14 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/gemsnjewels/aquamarine_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Aquamarine Ore" + }, + "blocks": { + "gemsnjewels:aquamarine_ore_block": "excavated_variants:minecraft/stone", + "gemsnjewels:aquamarine_deepslate_ore_block": "excavated_variants:minecraft/deepslate" + }, + "tags": [ + "forge:ores/aquamarine", + "c:ores/aquamarine", + "c:aquamarine_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/gemsnjewels/black_opal_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/gemsnjewels/black_opal_ore.json new file mode 100644 index 00000000..ab26135a --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/gemsnjewels/black_opal_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Black Opal Ore" + }, + "blocks": { + "gemsnjewels:black_opal_deepslate_ore_block": "excavated_variants:minecraft/deepslate", + "gemsnjewels:black_opal_ore_block": "excavated_variants:minecraft/stone" + }, + "tags": [ + "forge:ores/black_opal", + "c:ores/black_opal", + "c:black_opal_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/gemsnjewels/bright_opal_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/gemsnjewels/bright_opal_ore.json new file mode 100644 index 00000000..8e3fbd08 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/gemsnjewels/bright_opal_ore.json @@ -0,0 +1,16 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Bright Opal Ore" + }, + "blocks": { + "gemsnjewels:bright_opal_ore_block": "excavated_variants:minecraft/stone" + }, + "tags": [ + "forge:ores/bright_opal", + "c:ores/bright_opal", + "c:bright_opal_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/gemsnjewels/citrine_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/gemsnjewels/citrine_ore.json new file mode 100644 index 00000000..86a6ecd0 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/gemsnjewels/citrine_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Citrine Ore" + }, + "blocks": { + "gemsnjewels:citrine_deepslate_ore_block": "excavated_variants:minecraft/deepslate", + "gemsnjewels:citrine_ore_block": "excavated_variants:minecraft/stone" + }, + "tags": [ + "forge:ores/citrine", + "c:ores/citrine", + "c:citrine_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/gemsnjewels/dusk_emerald_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/gemsnjewels/dusk_emerald_ore.json new file mode 100644 index 00000000..0415c405 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/gemsnjewels/dusk_emerald_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Dusk Emerald Ore" + }, + "blocks": { + "gemsnjewels:emerald_ore_block": "excavated_variants:minecraft/stone", + "gemsnjewels:emerald_deepslate_ore_block": "excavated_variants:minecraft/deepslate" + }, + "tags": [ + "forge:ores/dusk_emerald", + "c:ores/dusk_emerald", + "c:dusk_emerald_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/gemsnjewels/garnet_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/gemsnjewels/garnet_ore.json new file mode 100644 index 00000000..0735e76b --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/gemsnjewels/garnet_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Garnet Ore" + }, + "blocks": { + "gemsnjewels:garnet_ore_block": "excavated_variants:minecraft/stone", + "gemsnjewels:garnet_deepslate_ore_block": "excavated_variants:minecraft/deepslate" + }, + "tags": [ + "forge:ores/garnet", + "c:ores/garnet", + "c:garnet_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/gemsnjewels/iolite_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/gemsnjewels/iolite_ore.json new file mode 100644 index 00000000..7ba93d05 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/gemsnjewels/iolite_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Iolite Ore" + }, + "blocks": { + "gemsnjewels:iolite_ore_block": "excavated_variants:minecraft/stone", + "gemsnjewels:iolite_deepslate_ore_block": "excavated_variants:minecraft/deepslate" + }, + "tags": [ + "forge:ores/iolite", + "c:ores/iolite", + "c:iolite_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/gemsnjewels/kunzite_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/gemsnjewels/kunzite_ore.json new file mode 100644 index 00000000..614debac --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/gemsnjewels/kunzite_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Kunzite Ore" + }, + "blocks": { + "gemsnjewels:kunzite_deepslate_ore_block": "excavated_variants:minecraft/deepslate", + "gemsnjewels:kunzite_ore_block": "excavated_variants:minecraft/stone" + }, + "tags": [ + "forge:ores/kunzite", + "c:ores/kunzite", + "c:kunzite_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/gemsnjewels/morganite_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/gemsnjewels/morganite_ore.json new file mode 100644 index 00000000..ac9c8fc6 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/gemsnjewels/morganite_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Morganite Ore" + }, + "blocks": { + "gemsnjewels:morganite_ore_block": "excavated_variants:minecraft/stone", + "gemsnjewels:morganite_deepslate_ore_block": "excavated_variants:minecraft/deepslate" + }, + "tags": [ + "forge:ores/morganite", + "c:ores/morganite", + "c:morganite_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/gemsnjewels/opal_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/gemsnjewels/opal_ore.json new file mode 100644 index 00000000..2fff9f95 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/gemsnjewels/opal_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Opal Ore" + }, + "blocks": { + "gemsnjewels:opal_deepslate_ore_block": "excavated_variants:minecraft/deepslate", + "gemsnjewels:opal_ore_block": "excavated_variants:minecraft/stone" + }, + "tags": [ + "forge:ores/opal", + "c:ores/opal", + "c:opal_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/gemsnjewels/pale_diamond_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/gemsnjewels/pale_diamond_ore.json new file mode 100644 index 00000000..3492ea46 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/gemsnjewels/pale_diamond_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Pale Diamond Ore" + }, + "blocks": { + "gemsnjewels:pale_diamond_deepslate_ore_block": "excavated_variants:minecraft/deepslate", + "gemsnjewels:pale_diamond_ore_block": "excavated_variants:minecraft/stone" + }, + "tags": [ + "forge:ores/pale_diamond", + "c:ores/pale_diamond", + "c:pale_diamond_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/gemsnjewels/peridot_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/gemsnjewels/peridot_ore.json new file mode 100644 index 00000000..f4d5b987 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/gemsnjewels/peridot_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Peridot Ore" + }, + "blocks": { + "gemsnjewels:peridot_deepslate_ore_block": "excavated_variants:minecraft/deepslate", + "gemsnjewels:peridot_ore_block": "excavated_variants:minecraft/stone" + }, + "tags": [ + "forge:ores/peridot", + "c:ores/peridot", + "c:peridot_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/gemsnjewels/ruby_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/gemsnjewels/ruby_ore.json new file mode 100644 index 00000000..4a9340a5 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/gemsnjewels/ruby_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Ruby Ore" + }, + "blocks": { + "gemsnjewels:ruby_deepslate_ore_block": "excavated_variants:minecraft/deepslate", + "gemsnjewels:ruby_ore_block": "excavated_variants:minecraft/stone" + }, + "tags": [ + "forge:ores/ruby", + "c:ores/ruby", + "c:ruby_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/gemsnjewels/sapphire_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/gemsnjewels/sapphire_ore.json new file mode 100644 index 00000000..9dd3876c --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/gemsnjewels/sapphire_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Sapphire Ore" + }, + "blocks": { + "gemsnjewels:sapphire_deepslate_ore_block": "excavated_variants:minecraft/deepslate", + "gemsnjewels:sapphire_ore_block": "excavated_variants:minecraft/stone" + }, + "tags": [ + "forge:ores/sapphire", + "c:ores/sapphire", + "c:sapphire_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/gemsnjewels/spinel_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/gemsnjewels/spinel_ore.json new file mode 100644 index 00000000..ce85b2f4 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/gemsnjewels/spinel_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Spinel Ore" + }, + "blocks": { + "gemsnjewels:spinel_ore_block": "excavated_variants:minecraft/stone", + "gemsnjewels:spinel_deepslate_ore_block": "excavated_variants:minecraft/deepslate" + }, + "tags": [ + "forge:ores/spinel", + "c:ores/spinel", + "c:spinel_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/gemsnjewels/tanzanite_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/gemsnjewels/tanzanite_ore.json new file mode 100644 index 00000000..f1e333dd --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/gemsnjewels/tanzanite_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Tanzanite Ore" + }, + "blocks": { + "gemsnjewels:tanzanite_ore_block": "excavated_variants:minecraft/stone", + "gemsnjewels:tanzanite_deepslate_ore_block": "excavated_variants:minecraft/deepslate" + }, + "tags": [ + "forge:ores/tanzanite", + "c:ores/tanzanite", + "c:tanzanite_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/gemsnjewels/topaz_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/gemsnjewels/topaz_ore.json new file mode 100644 index 00000000..a7d7cc45 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/gemsnjewels/topaz_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Topaz Ore" + }, + "blocks": { + "gemsnjewels:topaz_deepslate_ore_block": "excavated_variants:minecraft/deepslate", + "gemsnjewels:topaz_ore_block": "excavated_variants:minecraft/stone" + }, + "tags": [ + "forge:ores/topaz", + "c:ores/topaz", + "c:topaz_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/gemsnjewels/tourmaline_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/gemsnjewels/tourmaline_ore.json new file mode 100644 index 00000000..bc1c4328 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/gemsnjewels/tourmaline_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Tourmaline Ore" + }, + "blocks": { + "gemsnjewels:tourmaline_ore_block": "excavated_variants:minecraft/stone", + "gemsnjewels:tourmaline_deepslate_ore_block": "excavated_variants:minecraft/deepslate" + }, + "tags": [ + "forge:ores/tourmaline", + "c:ores/tourmaline", + "c:tourmaline_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/gemsnjewels/zircon_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/gemsnjewels/zircon_ore.json new file mode 100644 index 00000000..c9accc87 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/gemsnjewels/zircon_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Zircon Ore" + }, + "blocks": { + "gemsnjewels:zircon_deepslate_ore_block": "excavated_variants:minecraft/deepslate", + "gemsnjewels:zircon_ore_block": "excavated_variants:minecraft/stone" + }, + "tags": [ + "forge:ores/zircon", + "c:ores/zircon", + "c:zircon_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/geolosys/ancient_debris_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/geolosys/ancient_debris_ore.json new file mode 100644 index 00000000..d2928867 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/geolosys/ancient_debris_ore.json @@ -0,0 +1,16 @@ +{ + "types": [ + "excavated_variants:nether" + ], + "translations": { + "en_us": "Ancient Debris" + }, + "blocks": { + "geolosys:ancient_debris_ore": "excavated_variants:minecraft/netherrack" + }, + "tags": [ + "forge:ores/netherite_scrap", + "c:ores/netherite_scrap", + "c:netherite_scrap_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/geolosys/anthracite_coal_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/geolosys/anthracite_coal_ore.json new file mode 100644 index 00000000..b28c7240 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/geolosys/anthracite_coal_ore.json @@ -0,0 +1,18 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Anthracite Coal" + }, + "blocks": { + "geolosys:deepslate_anthracite_coal_ore": "excavated_variants:minecraft/deepslate", + "geolosys:anthracite_coal_ore": "excavated_variants:minecraft/stone" + }, + "tags": [ + "forge:ores/coal", + "c:ores/coal", + "c:coal_ores", + "minecraft:coal_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/geolosys/autunite_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/geolosys/autunite_ore.json new file mode 100644 index 00000000..c61934b5 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/geolosys/autunite_ore.json @@ -0,0 +1,20 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Autunite" + }, + "blocks": { + "geolosys:autunite_ore": "excavated_variants:minecraft/stone", + "geolosys:deepslate_autunite_ore": "excavated_variants:minecraft/deepslate" + }, + "tags": [ + "forge:ores/yellorium", + "c:ores/yellorium", + "c:yellorium_ores", + "forge:ores/uranium", + "c:ores/uranium", + "c:uranium_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/geolosys/azurite_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/geolosys/azurite_ore.json new file mode 100644 index 00000000..6cd421fa --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/geolosys/azurite_ore.json @@ -0,0 +1,18 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Azurite" + }, + "blocks": { + "geolosys:deepslate_azurite_ore": "excavated_variants:minecraft/deepslate", + "geolosys:azurite_ore": "excavated_variants:minecraft/stone" + }, + "tags": [ + "forge:ores/copper", + "c:ores/copper", + "c:copper_ores", + "minecraft:copper_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/geolosys/bauxite_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/geolosys/bauxite_ore.json new file mode 100644 index 00000000..ea74c520 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/geolosys/bauxite_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Bauxite" + }, + "blocks": { + "geolosys:bauxite_ore": "excavated_variants:minecraft/stone", + "geolosys:deepslate_bauxite_ore": "excavated_variants:minecraft/deepslate" + }, + "tags": [ + "forge:ores/aluminum", + "c:ores/aluminum", + "c:aluminum_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/geolosys/beryl_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/geolosys/beryl_ore.json new file mode 100644 index 00000000..2d2dbc8a --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/geolosys/beryl_ore.json @@ -0,0 +1,18 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Beryl" + }, + "blocks": { + "geolosys:deepslate_beryl_ore": "excavated_variants:minecraft/deepslate", + "geolosys:beryl_ore": "excavated_variants:minecraft/stone" + }, + "tags": [ + "forge:ores/emerald", + "c:ores/emerald", + "c:emerald_ores", + "minecraft:emerald_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/geolosys/bituminous_coal_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/geolosys/bituminous_coal_ore.json new file mode 100644 index 00000000..8ad534f2 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/geolosys/bituminous_coal_ore.json @@ -0,0 +1,18 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Bituminous Coal" + }, + "blocks": { + "geolosys:deepslate_bituminous_coal_ore": "excavated_variants:minecraft/deepslate", + "geolosys:bituminous_coal_ore": "excavated_variants:minecraft/stone" + }, + "tags": [ + "forge:ores/coal", + "c:ores/coal", + "c:coal_ores", + "minecraft:coal_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/geolosys/cassiterite_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/geolosys/cassiterite_ore.json new file mode 100644 index 00000000..54328213 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/geolosys/cassiterite_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Cassiterite" + }, + "blocks": { + "geolosys:deepslate_cassiterite_ore": "excavated_variants:minecraft/deepslate", + "geolosys:cassiterite_ore": "excavated_variants:minecraft/stone" + }, + "tags": [ + "forge:ores/tin", + "c:ores/tin", + "c:tin_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/geolosys/cinnabar_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/geolosys/cinnabar_ore.json new file mode 100644 index 00000000..eab1b143 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/geolosys/cinnabar_ore.json @@ -0,0 +1,18 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Cinnabar" + }, + "blocks": { + "geolosys:cinnabar_ore": "excavated_variants:minecraft/stone", + "geolosys:deepslate_cinnabar_ore": "excavated_variants:minecraft/deepslate" + }, + "tags": [ + "forge:ores/redstone", + "c:ores/redstone", + "c:redstone_ores", + "minecraft:redstone_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/geolosys/coal_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/geolosys/coal_ore.json new file mode 100644 index 00000000..6cb66670 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/geolosys/coal_ore.json @@ -0,0 +1,18 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Coal" + }, + "blocks": { + "geolosys:deepslate_coal_ore": "excavated_variants:minecraft/deepslate", + "geolosys:coal_ore": "excavated_variants:minecraft/stone" + }, + "tags": [ + "forge:ores/coal", + "c:ores/coal", + "c:coal_ores", + "minecraft:coal_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/geolosys/galena_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/geolosys/galena_ore.json new file mode 100644 index 00000000..915738e7 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/geolosys/galena_ore.json @@ -0,0 +1,20 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Galena" + }, + "blocks": { + "geolosys:deepslate_galena_ore": "excavated_variants:minecraft/deepslate", + "geolosys:galena_ore": "excavated_variants:minecraft/stone" + }, + "tags": [ + "forge:ores/lead", + "c:ores/lead", + "c:lead_ores", + "forge:ores/silver", + "c:ores/silver", + "c:silver_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/geolosys/gold_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/geolosys/gold_ore.json new file mode 100644 index 00000000..67b92b56 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/geolosys/gold_ore.json @@ -0,0 +1,18 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Gold" + }, + "blocks": { + "geolosys:deepslate_gold_ore": "excavated_variants:minecraft/deepslate", + "geolosys:gold_ore": "excavated_variants:minecraft/stone" + }, + "tags": [ + "forge:ores/gold", + "c:ores/gold", + "c:gold_ores", + "minecraft:gold_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/geolosys/hematite_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/geolosys/hematite_ore.json new file mode 100644 index 00000000..4283185a --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/geolosys/hematite_ore.json @@ -0,0 +1,18 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Hematite" + }, + "blocks": { + "geolosys:deepslate_hematite_ore": "excavated_variants:minecraft/deepslate", + "geolosys:hematite_ore": "excavated_variants:minecraft/stone" + }, + "tags": [ + "forge:ores/iron", + "c:ores/iron", + "c:iron_ores", + "minecraft:iron_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/geolosys/kimberlite_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/geolosys/kimberlite_ore.json new file mode 100644 index 00000000..1f249b5a --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/geolosys/kimberlite_ore.json @@ -0,0 +1,18 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Kimberlite" + }, + "blocks": { + "geolosys:deepslate_kimberlite_ore": "excavated_variants:minecraft/deepslate", + "geolosys:kimberlite_ore": "excavated_variants:minecraft/stone" + }, + "tags": [ + "forge:ores/diamond", + "c:ores/diamond", + "c:diamond_ores", + "minecraft:diamond_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/geolosys/lapis_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/geolosys/lapis_ore.json new file mode 100644 index 00000000..81a5b54a --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/geolosys/lapis_ore.json @@ -0,0 +1,18 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Lapis Lazuli" + }, + "blocks": { + "geolosys:lapis_ore": "excavated_variants:minecraft/stone", + "geolosys:deepslate_lapis_ore": "excavated_variants:minecraft/deepslate" + }, + "tags": [ + "forge:ores/lapis", + "c:ores/lapis", + "c:lapis_ores", + "minecraft:lapis_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/geolosys/lignite_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/geolosys/lignite_ore.json new file mode 100644 index 00000000..417b6b50 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/geolosys/lignite_ore.json @@ -0,0 +1,18 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Lignite" + }, + "blocks": { + "geolosys:lignite_ore": "excavated_variants:minecraft/stone", + "geolosys:deepslate_lignite_ore": "excavated_variants:minecraft/deepslate" + }, + "tags": [ + "forge:ores/coal", + "c:ores/coal", + "c:coal_ores", + "minecraft:coal_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/geolosys/limonite_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/geolosys/limonite_ore.json new file mode 100644 index 00000000..8e4da0bd --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/geolosys/limonite_ore.json @@ -0,0 +1,21 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Limonite" + }, + "blocks": { + "geolosys:limonite_ore": "excavated_variants:minecraft/stone", + "geolosys:deepslate_limonite_ore": "excavated_variants:minecraft/deepslate" + }, + "tags": [ + "forge:ores/nickel", + "c:ores/nickel", + "c:nickel_ores", + "forge:ores/iron", + "c:ores/iron", + "c:iron_ores", + "minecraft:iron_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/geolosys/malachite_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/geolosys/malachite_ore.json new file mode 100644 index 00000000..5ed2c1da --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/geolosys/malachite_ore.json @@ -0,0 +1,18 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Malachite" + }, + "blocks": { + "geolosys:malachite_ore": "excavated_variants:minecraft/stone", + "geolosys:deepslate_malachite_ore": "excavated_variants:minecraft/deepslate" + }, + "tags": [ + "forge:ores/copper", + "c:ores/copper", + "c:copper_ores", + "minecraft:copper_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/geolosys/platinum_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/geolosys/platinum_ore.json new file mode 100644 index 00000000..dea08538 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/geolosys/platinum_ore.json @@ -0,0 +1,20 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Platinum" + }, + "blocks": { + "geolosys:deepslate_platinum_ore": "excavated_variants:minecraft/deepslate", + "geolosys:platinum_ore": "excavated_variants:minecraft/stone" + }, + "tags": [ + "forge:ores/platinum", + "c:ores/platinum", + "c:platinum_ores", + "forge:ores/osmium", + "c:ores/osmium", + "c:osmium_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/geolosys/poor_gold_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/geolosys/poor_gold_ore.json new file mode 100644 index 00000000..5cd6d33b --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/geolosys/poor_gold_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:nether" + ], + "translations": { + "en_us": "Poor Gold" + }, + "blocks": { + "geolosys:nether_gold_ore": "excavated_variants:minecraft/netherrack" + }, + "tags": [ + "forge:ores/gold", + "c:ores/gold", + "c:gold_ores", + "minecraft:gold_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/geolosys/quartz_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/geolosys/quartz_ore.json new file mode 100644 index 00000000..a4cdd350 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/geolosys/quartz_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Quartz" + }, + "blocks": { + "geolosys:quartz_ore": "excavated_variants:minecraft/stone", + "geolosys:deepslate_quartz_ore": "excavated_variants:minecraft/deepslate" + }, + "tags": [ + "forge:ores/quartz", + "c:ores/quartz", + "c:quartz_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/geolosys/sphalerite_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/geolosys/sphalerite_ore.json new file mode 100644 index 00000000..8790b74e --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/geolosys/sphalerite_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Sphalerite" + }, + "blocks": { + "geolosys:deepslate_sphalerite_ore": "excavated_variants:minecraft/deepslate", + "geolosys:sphalerite_ore": "excavated_variants:minecraft/stone" + }, + "tags": [ + "forge:ores/zinc", + "c:ores/zinc", + "c:zinc_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/geolosys/teallite_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/geolosys/teallite_ore.json new file mode 100644 index 00000000..f32d4139 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/geolosys/teallite_ore.json @@ -0,0 +1,21 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Teallite" + }, + "blocks": { + "geolosys:deepslate_teallite_ore": "excavated_variants:minecraft/deepslate", + "geolosys:teallite_ore": "excavated_variants:minecraft/stone" + }, + "tags": [ + "forge:ores/emerald", + "c:ores/emerald", + "c:emerald_ores", + "minecraft:emerald_ores", + "forge:ores/tin", + "c:ores/tin", + "c:tin_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/immersiveengineering/aluminum_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/immersiveengineering/aluminum_ore.json new file mode 100644 index 00000000..52709e37 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/immersiveengineering/aluminum_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Bauxite Ore" + }, + "blocks": { + "immersiveengineering:deepslate_ore_aluminum": "excavated_variants:minecraft/deepslate", + "immersiveengineering:ore_aluminum": "excavated_variants:minecraft/stone" + }, + "tags": [ + "forge:ores/aluminum", + "c:ores/aluminum", + "c:aluminum_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/immersiveengineering/lead_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/immersiveengineering/lead_ore.json new file mode 100644 index 00000000..2ebd2fd4 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/immersiveengineering/lead_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Lead Ore" + }, + "blocks": { + "immersiveengineering:ore_lead": "excavated_variants:minecraft/stone", + "immersiveengineering:deepslate_ore_lead": "excavated_variants:minecraft/deepslate" + }, + "tags": [ + "forge:ores/lead", + "c:ores/lead", + "c:lead_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/immersiveengineering/nickel_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/immersiveengineering/nickel_ore.json new file mode 100644 index 00000000..736cc5ee --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/immersiveengineering/nickel_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Nickel Ore" + }, + "blocks": { + "immersiveengineering:ore_nickel": "excavated_variants:minecraft/stone", + "immersiveengineering:deepslate_ore_nickel": "excavated_variants:minecraft/deepslate" + }, + "tags": [ + "forge:ores/nickel", + "c:ores/nickel", + "c:nickel_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/immersiveengineering/silver_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/immersiveengineering/silver_ore.json new file mode 100644 index 00000000..39dfc460 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/immersiveengineering/silver_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Silver Ore" + }, + "blocks": { + "immersiveengineering:ore_silver": "excavated_variants:minecraft/stone", + "immersiveengineering:deepslate_ore_silver": "excavated_variants:minecraft/deepslate" + }, + "tags": [ + "forge:ores/silver", + "c:ores/silver", + "c:silver_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/immersiveengineering/uranium_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/immersiveengineering/uranium_ore.json new file mode 100644 index 00000000..f2d08c66 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/immersiveengineering/uranium_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Uranium Ore" + }, + "blocks": { + "immersiveengineering:ore_uranium": "excavated_variants:minecraft/stone", + "immersiveengineering:deepslate_ore_uranium": "excavated_variants:minecraft/deepslate" + }, + "tags": [ + "forge:ores/uranium", + "c:ores/uranium", + "c:uranium_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/indrev/lead_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/indrev/lead_ore.json new file mode 100644 index 00000000..953b22b2 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/indrev/lead_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Lead Ore" + }, + "blocks": { + "indrev:lead_ore": "excavated_variants:minecraft/stone", + "indrev:deepslate_lead_ore": "excavated_variants:minecraft/deepslate" + }, + "tags": [ + "forge:ores/lead", + "c:ores/lead", + "c:lead_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/indrev/nikolite_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/indrev/nikolite_ore.json new file mode 100644 index 00000000..01868111 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/indrev/nikolite_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Nikolite Ore" + }, + "blocks": { + "indrev:nikolite_ore": "excavated_variants:minecraft/stone", + "indrev:deepslate_nikolite_ore": "excavated_variants:minecraft/deepslate" + }, + "tags": [ + "forge:ores/nikolite", + "c:ores/nikolite", + "c:nikolite_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/indrev/silver_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/indrev/silver_ore.json new file mode 100644 index 00000000..710bfa8b --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/indrev/silver_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Silver Ore" + }, + "blocks": { + "indrev:deepslate_silver_ore": "excavated_variants:minecraft/deepslate", + "indrev:silver_ore": "excavated_variants:minecraft/stone" + }, + "tags": [ + "forge:ores/silver", + "c:ores/silver", + "c:silver_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/indrev/tin_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/indrev/tin_ore.json new file mode 100644 index 00000000..345cdc6d --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/indrev/tin_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Tin Ore" + }, + "blocks": { + "indrev:deepslate_tin_ore": "excavated_variants:minecraft/deepslate", + "indrev:tin_ore": "excavated_variants:minecraft/stone" + }, + "tags": [ + "forge:ores/tin", + "c:ores/tin", + "c:tin_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/indrev/tungsten_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/indrev/tungsten_ore.json new file mode 100644 index 00000000..377e8221 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/indrev/tungsten_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Tungsten Ore" + }, + "blocks": { + "indrev:tungsten_ore": "excavated_variants:minecraft/stone", + "indrev:deepslate_tungsten_ore": "excavated_variants:minecraft/deepslate" + }, + "tags": [ + "forge:ores/tungsten", + "c:ores/tungsten", + "c:tungsten_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/magnificent_malachite/malachite_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/magnificent_malachite/malachite_ore.json new file mode 100644 index 00000000..1bd00f66 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/magnificent_malachite/malachite_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Malachite Ore" + }, + "blocks": { + "magnificent_malachite:deepslate_malachite_ore": "excavated_variants:minecraft/deepslate", + "magnificent_malachite:malachite_ore": "excavated_variants:minecraft/stone" + }, + "tags": [ + "forge:ores/malachite", + "c:ores/malachite", + "c:malachite_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/malum/blazing_quartz_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/malum/blazing_quartz_ore.json new file mode 100644 index 00000000..78511a8d --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/malum/blazing_quartz_ore.json @@ -0,0 +1,16 @@ +{ + "types": [ + "excavated_variants:nether" + ], + "translations": { + "en_us": "Blazing Quartz Ore" + }, + "blocks": { + "malum:blazing_quartz_ore": "excavated_variants:minecraft/netherrack" + }, + "tags": [ + "forge:ores/blazing_quartz", + "c:ores/blazing_quartz", + "c:blazing_quartz_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/malum/brilliant_stone.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/malum/brilliant_stone.json new file mode 100644 index 00000000..87332591 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/malum/brilliant_stone.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Brilliant %s" + }, + "blocks": { + "malum:brilliant_stone": "excavated_variants:minecraft/stone", + "malum:brilliant_deepslate": "excavated_variants:minecraft/deepslate" + }, + "tags": [ + "forge:ores/brilliant_stone", + "c:ores/brilliant_stone", + "c:brilliant_stone_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/malum/soulstone_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/malum/soulstone_ore.json new file mode 100644 index 00000000..8a271eeb --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/malum/soulstone_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Soulstone Ore" + }, + "blocks": { + "malum:soulstone_ore": "excavated_variants:minecraft/stone", + "malum:deepslate_soulstone_ore": "excavated_variants:minecraft/deepslate" + }, + "tags": [ + "forge:ores/soulstone", + "c:ores/soulstone", + "c:soulstone_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mekanism/fluorite_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mekanism/fluorite_ore.json new file mode 100644 index 00000000..ea309be7 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mekanism/fluorite_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Fluorite Ore" + }, + "blocks": { + "mekanism:deepslate_fluorite_ore": "excavated_variants:minecraft/deepslate", + "mekanism:fluorite_ore": "excavated_variants:minecraft/stone" + }, + "tags": [ + "forge:ores/fluorite", + "c:ores/fluorite", + "c:fluorite_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mekanism/osmium_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mekanism/osmium_ore.json new file mode 100644 index 00000000..f1518fd7 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mekanism/osmium_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Osmium Ore" + }, + "blocks": { + "mekanism:deepslate_osmium_ore": "excavated_variants:minecraft/deepslate", + "mekanism:osmium_ore": "excavated_variants:minecraft/stone" + }, + "tags": [ + "forge:ores/osmium", + "c:ores/osmium", + "c:osmium_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mekanism/tin_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mekanism/tin_ore.json new file mode 100644 index 00000000..0485e8c6 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mekanism/tin_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Tin Ore" + }, + "blocks": { + "mekanism:deepslate_tin_ore": "excavated_variants:minecraft/deepslate", + "mekanism:tin_ore": "excavated_variants:minecraft/stone" + }, + "tags": [ + "forge:ores/tin", + "c:ores/tin", + "c:tin_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mekanism/uranium_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mekanism/uranium_ore.json new file mode 100644 index 00000000..437b0b46 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mekanism/uranium_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Uranium Ore" + }, + "blocks": { + "mekanism:uranium_ore": "excavated_variants:minecraft/stone", + "mekanism:deepslate_uranium_ore": "excavated_variants:minecraft/deepslate" + }, + "tags": [ + "forge:ores/uranium", + "c:ores/uranium", + "c:uranium_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/minecraft/coal_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/minecraft/coal_ore.json new file mode 100644 index 00000000..cfd5708e --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/minecraft/coal_ore.json @@ -0,0 +1,45 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Coal Ore" + }, + "blocks": { + "minecraft:coal_ore": { + "stone": "excavated_variants:minecraft/stone", + "generating": true + }, + "minecraft:deepslate_coal_ore": "excavated_variants:minecraft/deepslate", + "darkerdepths:limestone_coal_ore": "excavated_variants:darkerdepths/limestone", + "darkerdepths:aridrock_coal_ore": "excavated_variants:darkerdepths/aridrock", + "unearthed:rhyolite_coal_ore": "excavated_variants:unearthed/rhyolite", + "unearthed:gabbro_coal_ore": "excavated_variants:unearthed/gabbro", + "unearthed:granodiorite_coal_ore": "excavated_variants:unearthed/granodiorite", + "unearthed:mudstone_coal_ore": "excavated_variants:unearthed/mudstone", + "unearthed:white_granite_coal_ore": "excavated_variants:unearthed/white_granite", + "unearthed:siltstone_coal_ore": "excavated_variants:unearthed/siltstone", + "unearthed:grey_limestone_coal_ore": "excavated_variants:unearthed/grey_limestone", + "unearthed:beige_limestone_coal_ore": "excavated_variants:unearthed/beige_limestone", + "unearthed:phyllite_coal_ore": "excavated_variants:unearthed/phyllite", + "unearthed:sandstone_coal_ore": "excavated_variants:minecraft/sandstone", + "unearthed:conglomerate_coal_ore": "excavated_variants:unearthed/conglomerate", + "unearthed:slate_coal_ore": "excavated_variants:unearthed/slate", + "unearthed:limestone_coal_ore": "excavated_variants:unearthed/limestone", + "universal_ores:tuff_coal_ore": "excavated_variants:minecraft/tuff", + "universal_ores:andesite_coal_ore": "excavated_variants:minecraft/andesite", + "universal_ores:granite_coal_ore": "excavated_variants:minecraft/granite", + "universal_ores:diorite_coal_ore": "excavated_variants:minecraft/diorite", + "universal_ores:calcite_coal_ore": "excavated_variants:minecraft/calcite", + "spelunkery:granite_coal_ore": "excavated_variants:minecraft/granite", + "spelunkery:andesite_coal_ore": "excavated_variants:minecraft/andesite", + "spelunkery:diorite_coal_ore": "excavated_variants:minecraft/diorite", + "spelunkery:tuff_coal_ore": "excavated_variants:minecraft/tuff" + }, + "tags": [ + "forge:ores/coal", + "c:ores/coal", + "c:coal_ores", + "minecraft:coal_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/minecraft/copper_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/minecraft/copper_ore.json new file mode 100644 index 00000000..7c987300 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/minecraft/copper_ore.json @@ -0,0 +1,43 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Copper Ore" + }, + "blocks": { + "minecraft:copper_ore": { + "stone": "excavated_variants:minecraft/stone", + "generating": true + }, + "minecraft:deepslate_copper_ore": "excavated_variants:minecraft/deepslate", + "unearthed:beige_limestone_copper_ore": "excavated_variants:unearthed/beige_limestone", + "unearthed:limestone_copper_ore": "excavated_variants:unearthed/limestone", + "unearthed:rhyolite_copper_ore": "excavated_variants:unearthed/rhyolite", + "unearthed:slate_copper_ore": "excavated_variants:unearthed/slate", + "unearthed:gabbro_copper_ore": "excavated_variants:unearthed/gabbro", + "unearthed:granodiorite_copper_ore": "excavated_variants:unearthed/granodiorite", + "unearthed:conglomerate_copper_ore": "excavated_variants:unearthed/conglomerate", + "unearthed:grey_limestone_copper_ore": "excavated_variants:unearthed/grey_limestone", + "unearthed:sandstone_copper_ore": "excavated_variants:minecraft/sandstone", + "unearthed:siltstone_copper_ore": "excavated_variants:unearthed/siltstone", + "unearthed:phyllite_copper_ore": "excavated_variants:unearthed/phyllite", + "unearthed:white_granite_copper_ore": "excavated_variants:unearthed/white_granite", + "unearthed:mudstone_copper_ore": "excavated_variants:unearthed/mudstone", + "universal_ores:calcite_copper_ore": "excavated_variants:minecraft/calcite", + "universal_ores:diorite_copper_ore": "excavated_variants:minecraft/diorite", + "universal_ores:tuff_copper_ore": "excavated_variants:minecraft/tuff", + "universal_ores:granite_copper_ore": "excavated_variants:minecraft/granite", + "universal_ores:andesite_copper_ore": "excavated_variants:minecraft/andesite", + "spelunkery:granite_copper_ore": "excavated_variants:minecraft/granite", + "spelunkery:andesite_copper_ore": "excavated_variants:minecraft/andesite", + "spelunkery:diorite_copper_ore": "excavated_variants:minecraft/diorite", + "spelunkery:tuff_copper_ore": "excavated_variants:minecraft/tuff" + }, + "tags": [ + "forge:ores/copper", + "c:ores/copper", + "c:copper_ores", + "minecraft:copper_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/minecraft/diamond_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/minecraft/diamond_ore.json new file mode 100644 index 00000000..40df5663 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/minecraft/diamond_ore.json @@ -0,0 +1,46 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Diamond Ore" + }, + "blocks": { + "minecraft:diamond_ore": { + "stone": "excavated_variants:minecraft/stone", + "generating": true + }, + "minecraft:deepslate_diamond_ore": "excavated_variants:minecraft/deepslate", + "darkerdepths:limestone_diamond_ore": "excavated_variants:darkerdepths/limestone", + "darkerdepths:aridrock_diamond_ore": "excavated_variants:darkerdepths/aridrock", + "unearthed:white_granite_diamond_ore": "excavated_variants:unearthed/white_granite", + "unearthed:beige_limestone_diamond_ore": "excavated_variants:unearthed/beige_limestone", + "unearthed:mudstone_diamond_ore": "excavated_variants:unearthed/mudstone", + "unearthed:conglomerate_diamond_ore": "excavated_variants:unearthed/conglomerate", + "unearthed:granodiorite_diamond_ore": "excavated_variants:unearthed/granodiorite", + "unearthed:sandstone_diamond_ore": "excavated_variants:minecraft/sandstone", + "unearthed:slate_diamond_ore": "excavated_variants:unearthed/slate", + "unearthed:phyllite_diamond_ore": "excavated_variants:unearthed/phyllite", + "unearthed:siltstone_diamond_ore": "excavated_variants:unearthed/siltstone", + "unearthed:grey_limestone_diamond_ore": "excavated_variants:unearthed/grey_limestone", + "unearthed:gabbro_diamond_ore": "excavated_variants:unearthed/gabbro", + "unearthed:rhyolite_diamond_ore": "excavated_variants:unearthed/rhyolite", + "unearthed:limestone_diamond_ore": "excavated_variants:unearthed/limestone", + "universal_ores:andesite_diamond_ore": "excavated_variants:minecraft/andesite", + "universal_ores:diorite_diamond_ore": "excavated_variants:minecraft/diorite", + "universal_ores:calcite_diamond_ore": "excavated_variants:minecraft/calcite", + "universal_ores:tuff_diamond_ore": "excavated_variants:minecraft/tuff", + "universal_ores:granite_diamond_ore": "excavated_variants:minecraft/granite", + "spelunkery:granite_diamond_ore": "excavated_variants:minecraft/granite", + "spelunkery:diorite_diamond_ore": "excavated_variants:minecraft/diorite", + "spelunkery:andesite_diamond_ore": "excavated_variants:minecraft/andesite", + "spelunkery:tuff_diamond_ore": "excavated_variants:minecraft/tuff", + "spelunkery:smooth_basalt_diamond_ore": "excavated_variants:minecraft/smooth_basalt" + }, + "tags": [ + "forge:ores/diamond", + "c:ores/diamond", + "c:diamond_ores", + "minecraft:diamond_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/minecraft/emerald_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/minecraft/emerald_ore.json new file mode 100644 index 00000000..6326c3fc --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/minecraft/emerald_ore.json @@ -0,0 +1,43 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Emerald Ore" + }, + "blocks": { + "minecraft:emerald_ore": { + "stone": "excavated_variants:minecraft/stone", + "generating": true + }, + "minecraft:deepslate_emerald_ore": "excavated_variants:minecraft/deepslate", + "unearthed:phyllite_emerald_ore": "excavated_variants:unearthed/phyllite", + "unearthed:white_granite_emerald_ore": "excavated_variants:unearthed/white_granite", + "unearthed:conglomerate_emerald_ore": "excavated_variants:unearthed/conglomerate", + "unearthed:slate_emerald_ore": "excavated_variants:unearthed/slate", + "unearthed:granodiorite_emerald_ore": "excavated_variants:unearthed/granodiorite", + "unearthed:gabbro_emerald_ore": "excavated_variants:unearthed/gabbro", + "unearthed:beige_limestone_emerald_ore": "excavated_variants:unearthed/beige_limestone", + "unearthed:grey_limestone_emerald_ore": "excavated_variants:unearthed/grey_limestone", + "unearthed:siltstone_emerald_ore": "excavated_variants:unearthed/siltstone", + "unearthed:sandstone_emerald_ore": "excavated_variants:minecraft/sandstone", + "unearthed:limestone_emerald_ore": "excavated_variants:unearthed/limestone", + "unearthed:rhyolite_emerald_ore": "excavated_variants:unearthed/rhyolite", + "unearthed:mudstone_emerald_ore": "excavated_variants:unearthed/mudstone", + "universal_ores:tuff_emerald_ore": "excavated_variants:minecraft/tuff", + "universal_ores:granite_emerald_ore": "excavated_variants:minecraft/granite", + "universal_ores:calcite_emerald_ore": "excavated_variants:minecraft/calcite", + "universal_ores:diorite_emerald_ore": "excavated_variants:minecraft/diorite", + "universal_ores:andesite_emerald_ore": "excavated_variants:minecraft/andesite", + "spelunkery:granite_emerald_ore": "excavated_variants:minecraft/granite", + "spelunkery:diorite_emerald_ore": "excavated_variants:minecraft/diorite", + "spelunkery:tuff_emerald_ore": "excavated_variants:minecraft/tuff", + "spelunkery:andesite_emerald_ore": "excavated_variants:minecraft/andesite" + }, + "tags": [ + "forge:ores/emerald", + "c:ores/emerald", + "c:emerald_ores", + "minecraft:emerald_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/minecraft/end_redstone_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/minecraft/end_redstone_ore.json new file mode 100644 index 00000000..5c6eb89c --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/minecraft/end_redstone_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:end" + ], + "translations": { + "en_us": "Redstone Ore" + }, + "blocks": { + "byg:cryptic_redstone_ore": "excavated_variants:byg/cryptic" + }, + "tags": [ + "forge:ores/redstone", + "c:ores/redstone", + "c:redstone_ores", + "minecraft:redstone_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/minecraft/gold_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/minecraft/gold_ore.json new file mode 100644 index 00000000..1324b417 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/minecraft/gold_ore.json @@ -0,0 +1,47 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Gold Ore" + }, + "blocks": { + "minecraft:gold_ore": { + "stone": "excavated_variants:minecraft/stone", + "generating": true + }, + "minecraft:deepslate_gold_ore": "excavated_variants:minecraft/deepslate", + "darkerdepths:limestone_gold_ore": "excavated_variants:darkerdepths/limestone", + "darkerdepths:aridrock_gold_ore": "excavated_variants:darkerdepths/aridrock", + "unearthed:granodiorite_gold_ore": "excavated_variants:unearthed/granodiorite", + "unearthed:siltstone_gold_ore": "excavated_variants:unearthed/siltstone", + "unearthed:gabbro_gold_ore": "excavated_variants:unearthed/gabbro", + "unearthed:phyllite_gold_ore": "excavated_variants:unearthed/phyllite", + "unearthed:white_granite_gold_ore": "excavated_variants:unearthed/white_granite", + "unearthed:rhyolite_gold_ore": "excavated_variants:unearthed/rhyolite", + "unearthed:mudstone_gold_ore": "excavated_variants:unearthed/mudstone", + "unearthed:slate_gold_ore": "excavated_variants:unearthed/slate", + "unearthed:limestone_gold_ore": "excavated_variants:unearthed/limestone", + "unearthed:conglomerate_gold_ore": "excavated_variants:unearthed/conglomerate", + "unearthed:beige_limestone_gold_ore": "excavated_variants:unearthed/beige_limestone", + "unearthed:sandstone_gold_ore": "excavated_variants:minecraft/sandstone", + "unearthed:grey_limestone_gold_ore": "excavated_variants:unearthed/grey_limestone", + "universal_ores:blackstone_gold_ore": "excavated_variants:minecraft/blackstone", + "universal_ores:basalt_gold_ore": "excavated_variants:minecraft/basalt", + "universal_ores:diorite_gold_ore": "excavated_variants:minecraft/diorite", + "universal_ores:andesite_gold_ore": "excavated_variants:minecraft/andesite", + "universal_ores:calcite_gold_ore": "excavated_variants:minecraft/calcite", + "universal_ores:tuff_gold_ore": "excavated_variants:minecraft/tuff", + "universal_ores:granite_gold_ore": "excavated_variants:minecraft/granite", + "spelunkery:granite_gold_ore": "excavated_variants:minecraft/granite", + "spelunkery:andesite_gold_ore": "excavated_variants:minecraft/andesite", + "spelunkery:diorite_gold_ore": "excavated_variants:minecraft/diorite", + "spelunkery:tuff_gold_ore": "excavated_variants:minecraft/tuff" + }, + "tags": [ + "forge:ores/gold", + "c:ores/gold", + "c:gold_ores", + "minecraft:gold_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/minecraft/iron_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/minecraft/iron_ore.json new file mode 100644 index 00000000..31aae620 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/minecraft/iron_ore.json @@ -0,0 +1,45 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Iron Ore" + }, + "blocks": { + "minecraft:iron_ore": { + "stone": "excavated_variants:minecraft/stone", + "generating": true + }, + "minecraft:deepslate_iron_ore": "excavated_variants:minecraft/deepslate", + "darkerdepths:limestone_iron_ore": "excavated_variants:darkerdepths/limestone", + "darkerdepths:aridrock_iron_ore": "excavated_variants:darkerdepths/aridrock", + "unearthed:gabbro_iron_ore": "excavated_variants:unearthed/gabbro", + "unearthed:conglomerate_iron_ore": "excavated_variants:unearthed/conglomerate", + "unearthed:rhyolite_iron_ore": "excavated_variants:unearthed/rhyolite", + "unearthed:siltstone_iron_ore": "excavated_variants:unearthed/siltstone", + "unearthed:granodiorite_iron_ore": "excavated_variants:unearthed/granodiorite", + "unearthed:beige_limestone_iron_ore": "excavated_variants:unearthed/beige_limestone", + "unearthed:grey_limestone_iron_ore": "excavated_variants:unearthed/grey_limestone", + "unearthed:phyllite_iron_ore": "excavated_variants:unearthed/phyllite", + "unearthed:limestone_iron_ore": "excavated_variants:unearthed/limestone", + "unearthed:sandstone_iron_ore": "excavated_variants:minecraft/sandstone", + "unearthed:white_granite_iron_ore": "excavated_variants:unearthed/white_granite", + "unearthed:mudstone_iron_ore": "excavated_variants:unearthed/mudstone", + "unearthed:slate_iron_ore": "excavated_variants:unearthed/slate", + "universal_ores:granite_iron_ore": "excavated_variants:minecraft/granite", + "universal_ores:tuff_iron_ore": "excavated_variants:minecraft/tuff", + "universal_ores:diorite_iron_ore": "excavated_variants:minecraft/diorite", + "universal_ores:calcite_iron_ore": "excavated_variants:minecraft/calcite", + "universal_ores:andesite_iron_ore": "excavated_variants:minecraft/andesite", + "spelunkery:granite_iron_ore": "excavated_variants:minecraft/granite", + "spelunkery:andesite_iron_ore": "excavated_variants:minecraft/andesite", + "spelunkery:diorite_iron_ore": "excavated_variants:minecraft/diorite", + "spelunkery:tuff_iron_ore": "excavated_variants:minecraft/tuff" + }, + "tags": [ + "forge:ores/iron", + "c:ores/iron", + "c:iron_ores", + "minecraft:iron_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/minecraft/lapis_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/minecraft/lapis_ore.json new file mode 100644 index 00000000..ab88dcc9 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/minecraft/lapis_ore.json @@ -0,0 +1,46 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Lapis Lazuli Ore" + }, + "blocks": { + "minecraft:lapis_ore": { + "stone": "excavated_variants:minecraft/stone", + "generating": true + }, + "minecraft:deepslate_lapis_ore": "excavated_variants:minecraft/deepslate", + "darkerdepths:aridrock_lapis_ore": "excavated_variants:darkerdepths/aridrock", + "darkerdepths:limestone_lapis_ore": "excavated_variants:darkerdepths/limestone", + "unearthed:siltstone_lapis_ore": "excavated_variants:unearthed/siltstone", + "unearthed:sandstone_lapis_ore": "excavated_variants:minecraft/sandstone", + "unearthed:phyllite_lapis_ore": "excavated_variants:unearthed/phyllite", + "unearthed:granodiorite_lapis_ore": "excavated_variants:unearthed/granodiorite", + "unearthed:gabbro_lapis_ore": "excavated_variants:unearthed/gabbro", + "unearthed:conglomerate_lapis_ore": "excavated_variants:unearthed/conglomerate", + "unearthed:limestone_lapis_ore": "excavated_variants:unearthed/limestone", + "unearthed:grey_limestone_lapis_ore": "excavated_variants:unearthed/grey_limestone", + "unearthed:mudstone_lapis_ore": "excavated_variants:unearthed/mudstone", + "unearthed:slate_lapis_ore": "excavated_variants:unearthed/slate", + "unearthed:beige_limestone_lapis_ore": "excavated_variants:unearthed/beige_limestone", + "unearthed:rhyolite_lapis_ore": "excavated_variants:unearthed/rhyolite", + "unearthed:white_granite_lapis_ore": "excavated_variants:unearthed/white_granite", + "universal_ores:andesite_lapis_ore": "excavated_variants:minecraft/andesite", + "universal_ores:tuff_lapis_ore": "excavated_variants:minecraft/tuff", + "universal_ores:diorite_lapis_ore": "excavated_variants:minecraft/diorite", + "universal_ores:granite_lapis_ore": "excavated_variants:minecraft/granite", + "universal_ores:calcite_lapis_ore": "excavated_variants:minecraft/calcite", + "spelunkery:granite_lapis_ore": "excavated_variants:minecraft/granite", + "spelunkery:andesite_lapis_ore": "excavated_variants:minecraft/andesite", + "spelunkery:diorite_lapis_ore": "excavated_variants:minecraft/diorite", + "spelunkery:tuff_lapis_ore": "excavated_variants:minecraft/tuff", + "spelunkery:sandstone_lapis_ore": "excavated_variants:minecraft/sandstone" + }, + "tags": [ + "forge:ores/lapis", + "c:ores/lapis", + "c:lapis_ores", + "minecraft:lapis_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/minecraft/nether_gold_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/minecraft/nether_gold_ore.json new file mode 100644 index 00000000..c025d215 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/minecraft/nether_gold_ore.json @@ -0,0 +1,22 @@ +{ + "types": [ + "excavated_variants:nether" + ], + "translations": { + "en_us": "Nether Gold Ore" + }, + "blocks": { + "minecraft:nether_gold_ore": { + "stone": "excavated_variants:minecraft/netherrack", + "generating": true + }, + "byg:brimstone_nether_gold_ore": "excavated_variants:byg/brimstone", + "byg:blue_nether_gold_ore": "excavated_variants:byg/blue_netherrack" + }, + "tags": [ + "forge:ores/gold", + "c:ores/gold", + "c:gold_ores", + "minecraft:gold_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/minecraft/nether_lapis_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/minecraft/nether_lapis_ore.json new file mode 100644 index 00000000..bd0add85 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/minecraft/nether_lapis_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:nether" + ], + "translations": { + "en_us": "Nether Lapis Lazuli Ore" + }, + "blocks": { + "betternether:nether_lapis_ore": "excavated_variants:minecraft/netherrack" + }, + "tags": [ + "forge:ores/lapis", + "c:ores/lapis", + "c:lapis_ores", + "minecraft:lapis_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/minecraft/nether_redstone_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/minecraft/nether_redstone_ore.json new file mode 100644 index 00000000..3272d05b --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/minecraft/nether_redstone_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:nether" + ], + "translations": { + "en_us": "Redstone Ore" + }, + "blocks": { + "betternether:nether_redstone_ore": "excavated_variants:minecraft/netherrack" + }, + "tags": [ + "forge:ores/redstone", + "c:ores/redstone", + "c:redstone_ores", + "minecraft:redstone_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/minecraft/overworld_quartz_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/minecraft/overworld_quartz_ore.json new file mode 100644 index 00000000..db186867 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/minecraft/overworld_quartz_ore.json @@ -0,0 +1,16 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Quartz Ore" + }, + "blocks": { + "modern_industrialization:quartz_ore": "excavated_variants:minecraft/stone" + }, + "tags": [ + "forge:ores/quartz", + "c:ores/quartz", + "c:quartz_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/minecraft/quartz_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/minecraft/quartz_ore.json new file mode 100644 index 00000000..1df54425 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/minecraft/quartz_ore.json @@ -0,0 +1,23 @@ +{ + "types": [ + "excavated_variants:nether" + ], + "translations": { + "en_us": "Quartz Ore" + }, + "blocks": { + "minecraft:nether_quartz_ore": { + "stone": "excavated_variants:minecraft/netherrack", + "generating": true + }, + "byg:brimstone_nether_quartz_ore": "excavated_variants:byg/brimstone", + "byg:blue_nether_quartz_ore": "excavated_variants:byg/blue_netherrack", + "universal_ores:blackstone_quartz_ore": "excavated_variants:minecraft/blackstone", + "universal_ores:basalt_quartz_ore": "excavated_variants:minecraft/basalt" + }, + "tags": [ + "forge:ores/quartz", + "c:ores/quartz", + "c:quartz_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/minecraft/redstone_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/minecraft/redstone_ore.json new file mode 100644 index 00000000..28c717eb --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/minecraft/redstone_ore.json @@ -0,0 +1,46 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Redstone Ore" + }, + "blocks": { + "minecraft:redstone_ore": { + "stone": "excavated_variants:minecraft/stone", + "generating": true + }, + "minecraft:deepslate_redstone_ore": "excavated_variants:minecraft/deepslate", + "darkerdepths:aridrock_redstone_ore": "excavated_variants:darkerdepths/aridrock", + "darkerdepths:limestone_redstone_ore": "excavated_variants:darkerdepths/limestone", + "unearthed:phyllite_redstone_ore": "excavated_variants:unearthed/phyllite", + "unearthed:granodiorite_redstone_ore": "excavated_variants:unearthed/granodiorite", + "unearthed:sandstone_redstone_ore": "excavated_variants:minecraft/sandstone", + "unearthed:conglomerate_redstone_ore": "excavated_variants:unearthed/conglomerate", + "unearthed:siltstone_redstone_ore": "excavated_variants:unearthed/siltstone", + "unearthed:grey_limestone_redstone_ore": "excavated_variants:unearthed/grey_limestone", + "unearthed:slate_redstone_ore": "excavated_variants:unearthed/slate", + "unearthed:beige_limestone_redstone_ore": "excavated_variants:unearthed/beige_limestone", + "unearthed:gabbro_redstone_ore": "excavated_variants:unearthed/gabbro", + "unearthed:rhyolite_redstone_ore": "excavated_variants:unearthed/rhyolite", + "unearthed:white_granite_redstone_ore": "excavated_variants:unearthed/white_granite", + "unearthed:limestone_redstone_ore": "excavated_variants:unearthed/limestone", + "unearthed:mudstone_redstone_ore": "excavated_variants:unearthed/mudstone", + "universal_ores:andesite_redstone_ore": "excavated_variants:minecraft/andesite", + "universal_ores:calcite_redstone_ore": "excavated_variants:minecraft/calcite", + "universal_ores:diorite_redstone_ore": "excavated_variants:minecraft/diorite", + "universal_ores:granite_redstone_ore": "excavated_variants:minecraft/granite", + "universal_ores:tuff_redstone_ore": "excavated_variants:minecraft/tuff", + "spelunkery:granite_redstone_ore": "excavated_variants:minecraft/granite", + "spelunkery:andesite_redstone_ore": "excavated_variants:minecraft/andesite", + "spelunkery:diorite_redstone_ore": "excavated_variants:minecraft/diorite", + "spelunkery:tuff_redstone_ore": "excavated_variants:minecraft/tuff", + "spelunkery:calciite_redstone_ore": "excavated_variants:minecraft/calcite" + }, + "tags": [ + "forge:ores/redstone", + "c:ores/redstone", + "c:redstone_ores", + "minecraft:redstone_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/miningmaster/dive_aquamarine_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/miningmaster/dive_aquamarine_ore.json new file mode 100644 index 00000000..cf417945 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/miningmaster/dive_aquamarine_ore.json @@ -0,0 +1,16 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Dive Aquamarine Ore" + }, + "blocks": { + "miningmaster:dive_aquamarine_ore": "excavated_variants:minecraft/stone" + }, + "tags": [ + "forge:ores/dive_aquamarine", + "c:ores/dive_aquamarine", + "c:dive_aquamarine_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/miningmaster/fire_ruby_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/miningmaster/fire_ruby_ore.json new file mode 100644 index 00000000..e694914f --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/miningmaster/fire_ruby_ore.json @@ -0,0 +1,16 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Fire Ruby Ore" + }, + "blocks": { + "miningmaster:fire_ruby_ore": "excavated_variants:minecraft/stone" + }, + "tags": [ + "forge:ores/fire_ruby", + "c:ores/fire_ruby", + "c:fire_ruby_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/miningmaster/haste_peridot_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/miningmaster/haste_peridot_ore.json new file mode 100644 index 00000000..6f627ee8 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/miningmaster/haste_peridot_ore.json @@ -0,0 +1,16 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Haste Peridot Ore" + }, + "blocks": { + "miningmaster:haste_peridot_ore": "excavated_variants:minecraft/stone" + }, + "tags": [ + "forge:ores/haste_peridot", + "c:ores/haste_peridot", + "c:haste_peridot_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/miningmaster/heart_rhodonite_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/miningmaster/heart_rhodonite_ore.json new file mode 100644 index 00000000..82ab128c --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/miningmaster/heart_rhodonite_ore.json @@ -0,0 +1,16 @@ +{ + "types": [ + "excavated_variants:nether" + ], + "translations": { + "en_us": "Heart Rhodonite Ore" + }, + "blocks": { + "miningmaster:heart_rhodonite_ore": "excavated_variants:minecraft/netherrack" + }, + "tags": [ + "forge:ores/heart_rhodonite", + "c:ores/heart_rhodonite", + "c:heart_rhodonite_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/miningmaster/ice_sapphire_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/miningmaster/ice_sapphire_ore.json new file mode 100644 index 00000000..a367a109 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/miningmaster/ice_sapphire_ore.json @@ -0,0 +1,16 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Ice Sapphire Ore" + }, + "blocks": { + "miningmaster:ice_sapphire_ore": "excavated_variants:minecraft/stone" + }, + "tags": [ + "forge:ores/ice_sapphire", + "c:ores/ice_sapphire", + "c:ice_sapphire_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/miningmaster/kinetic_opal_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/miningmaster/kinetic_opal_ore.json new file mode 100644 index 00000000..e4cbe187 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/miningmaster/kinetic_opal_ore.json @@ -0,0 +1,16 @@ +{ + "types": [ + "excavated_variants:nether" + ], + "translations": { + "en_us": "Kinetic Opal Ore" + }, + "blocks": { + "miningmaster:kinetic_opal_ore": "excavated_variants:minecraft/netherrack" + }, + "tags": [ + "forge:ores/kinetic_opal", + "c:ores/kinetic_opal", + "c:kinetic_opal_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/miningmaster/lucky_citrine_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/miningmaster/lucky_citrine_ore.json new file mode 100644 index 00000000..97dab808 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/miningmaster/lucky_citrine_ore.json @@ -0,0 +1,16 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Lucky Citrine Ore" + }, + "blocks": { + "miningmaster:lucky_citrine_ore": "excavated_variants:minecraft/stone" + }, + "tags": [ + "forge:ores/lucky_citrine", + "c:ores/lucky_citrine", + "c:lucky_citrine_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/miningmaster/power_pyrite_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/miningmaster/power_pyrite_ore.json new file mode 100644 index 00000000..54615b95 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/miningmaster/power_pyrite_ore.json @@ -0,0 +1,16 @@ +{ + "types": [ + "excavated_variants:nether" + ], + "translations": { + "en_us": "Power Pyrite Ore" + }, + "blocks": { + "miningmaster:power_pyrite_ore": "excavated_variants:minecraft/netherrack" + }, + "tags": [ + "forge:ores/power_pyrite", + "c:ores/power_pyrite", + "c:power_pyrite_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/miningmaster/spirit_garnet_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/miningmaster/spirit_garnet_ore.json new file mode 100644 index 00000000..1307b3bf --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/miningmaster/spirit_garnet_ore.json @@ -0,0 +1,16 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Spirit Garnet Ore" + }, + "blocks": { + "miningmaster:spirit_garnet_ore": "excavated_variants:minecraft/stone" + }, + "tags": [ + "forge:ores/spirit_garnet", + "c:ores/spirit_garnet", + "c:spirit_garnet_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/modern_industrialization/antimony_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/modern_industrialization/antimony_ore.json new file mode 100644 index 00000000..8d18cb81 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/modern_industrialization/antimony_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Antimony Ore" + }, + "blocks": { + "modern_industrialization:antimony_ore": "excavated_variants:minecraft/stone", + "modern_industrialization:deepslate_antimony_ore": "excavated_variants:minecraft/deepslate" + }, + "tags": [ + "forge:ores/antimony", + "c:ores/antimony", + "c:antimony_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/modern_industrialization/bauxite_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/modern_industrialization/bauxite_ore.json new file mode 100644 index 00000000..9b25e220 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/modern_industrialization/bauxite_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Bauxite Ore" + }, + "blocks": { + "modern_industrialization:deepslate_bauxite_ore": "excavated_variants:minecraft/deepslate", + "modern_industrialization:bauxite_ore": "excavated_variants:minecraft/stone" + }, + "tags": [ + "forge:ores/bauxite", + "c:ores/bauxite", + "c:bauxite_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/modern_industrialization/iridium_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/modern_industrialization/iridium_ore.json new file mode 100644 index 00000000..4b04e0c0 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/modern_industrialization/iridium_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Iridium Ore" + }, + "blocks": { + "modern_industrialization:iridium_ore": "excavated_variants:minecraft/stone", + "modern_industrialization:deepslate_iridium_ore": "excavated_variants:minecraft/deepslate" + }, + "tags": [ + "forge:ores/iridium", + "c:ores/iridium", + "c:iridium_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/modern_industrialization/lead_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/modern_industrialization/lead_ore.json new file mode 100644 index 00000000..d3bf11c0 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/modern_industrialization/lead_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Lead Ore" + }, + "blocks": { + "modern_industrialization:lead_ore": "excavated_variants:minecraft/stone", + "modern_industrialization:deepslate_lead_ore": "excavated_variants:minecraft/deepslate" + }, + "tags": [ + "forge:ores/lead", + "c:ores/lead", + "c:lead_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/modern_industrialization/lignite_coal_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/modern_industrialization/lignite_coal_ore.json new file mode 100644 index 00000000..ac1ba60a --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/modern_industrialization/lignite_coal_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Lignite Coal Ore" + }, + "blocks": { + "modern_industrialization:deepslate_lignite_coal_ore": "excavated_variants:minecraft/deepslate", + "modern_industrialization:lignite_coal_ore": "excavated_variants:minecraft/stone" + }, + "tags": [ + "forge:ores/lignite_coal", + "c:ores/lignite_coal", + "c:lignite_coal_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/modern_industrialization/mozanite_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/modern_industrialization/mozanite_ore.json new file mode 100644 index 00000000..c15902e7 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/modern_industrialization/mozanite_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Mozanite Ore" + }, + "blocks": { + "modern_industrialization:deepslate_mozanite_ore": "excavated_variants:minecraft/deepslate", + "modern_industrialization:mozanite_ore": "excavated_variants:minecraft/stone" + }, + "tags": [ + "forge:ores/mozanite", + "c:ores/mozanite", + "c:mozanite_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/modern_industrialization/nickel_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/modern_industrialization/nickel_ore.json new file mode 100644 index 00000000..8835ff5e --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/modern_industrialization/nickel_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Nickel Ore" + }, + "blocks": { + "modern_industrialization:nickel_ore": "excavated_variants:minecraft/stone", + "modern_industrialization:deepslate_nickel_ore": "excavated_variants:minecraft/deepslate" + }, + "tags": [ + "forge:ores/nickel", + "c:ores/nickel", + "c:nickel_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/modern_industrialization/platinum_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/modern_industrialization/platinum_ore.json new file mode 100644 index 00000000..b564891b --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/modern_industrialization/platinum_ore.json @@ -0,0 +1,16 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Platinum Ore" + }, + "blocks": { + "modern_industrialization:platinum_ore": "excavated_variants:minecraft/stone" + }, + "tags": [ + "forge:ores/platinum", + "c:ores/platinum", + "c:platinum_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/modern_industrialization/salt_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/modern_industrialization/salt_ore.json new file mode 100644 index 00000000..6ad62c3a --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/modern_industrialization/salt_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Salt Ore" + }, + "blocks": { + "modern_industrialization:salt_ore": "excavated_variants:minecraft/stone", + "modern_industrialization:deepslate_salt_ore": "excavated_variants:minecraft/deepslate" + }, + "tags": [ + "forge:ores/salt", + "c:ores/salt", + "c:salt_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/modern_industrialization/tin_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/modern_industrialization/tin_ore.json new file mode 100644 index 00000000..7e5aa9b9 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/modern_industrialization/tin_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Tin Ore" + }, + "blocks": { + "modern_industrialization:deepslate_tin_ore": "excavated_variants:minecraft/deepslate", + "modern_industrialization:tin_ore": "excavated_variants:minecraft/stone" + }, + "tags": [ + "forge:ores/tin", + "c:ores/tin", + "c:tin_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/modern_industrialization/titanium_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/modern_industrialization/titanium_ore.json new file mode 100644 index 00000000..92f8991f --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/modern_industrialization/titanium_ore.json @@ -0,0 +1,16 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Titanium Ore" + }, + "blocks": { + "modern_industrialization:titanium_ore": "excavated_variants:minecraft/stone" + }, + "tags": [ + "forge:ores/titanium", + "c:ores/titanium", + "c:titanium_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/modern_industrialization/tungsten_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/modern_industrialization/tungsten_ore.json new file mode 100644 index 00000000..55188f83 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/modern_industrialization/tungsten_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Tungsten Ore" + }, + "blocks": { + "modern_industrialization:deepslate_tungsten_ore": "excavated_variants:minecraft/deepslate", + "modern_industrialization:tungsten_ore": "excavated_variants:minecraft/stone" + }, + "tags": [ + "forge:ores/tungsten", + "c:ores/tungsten", + "c:tungsten_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/modern_industrialization/uranium_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/modern_industrialization/uranium_ore.json new file mode 100644 index 00000000..ee1e6dc3 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/modern_industrialization/uranium_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Uranium Ore" + }, + "blocks": { + "modern_industrialization:uranium_ore": "excavated_variants:minecraft/stone", + "modern_industrialization:deepslate_uranium_ore": "excavated_variants:minecraft/deepslate" + }, + "tags": [ + "forge:ores/uranium", + "c:ores/uranium", + "c:uranium_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mysticalagriculture/inferium_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mysticalagriculture/inferium_ore.json new file mode 100644 index 00000000..256732ab --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mysticalagriculture/inferium_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Inferium Ore" + }, + "blocks": { + "mysticalagriculture:deepslate_inferium_ore": "excavated_variants:minecraft/deepslate", + "mysticalagriculture:inferium_ore": "excavated_variants:minecraft/stone" + }, + "tags": [ + "forge:ores/inferium", + "c:ores/inferium", + "c:inferium_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mysticalagriculture/prosperity_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mysticalagriculture/prosperity_ore.json new file mode 100644 index 00000000..08c344f4 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mysticalagriculture/prosperity_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Prosperity Ore" + }, + "blocks": { + "mysticalagriculture:prosperity_ore": "excavated_variants:minecraft/stone", + "mysticalagriculture:deepslate_prosperity_ore": "excavated_variants:minecraft/deepslate" + }, + "tags": [ + "forge:ores/prosperity", + "c:ores/prosperity", + "c:prosperity_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mysticalagriculture/soulium_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mysticalagriculture/soulium_ore.json new file mode 100644 index 00000000..084aeb81 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mysticalagriculture/soulium_ore.json @@ -0,0 +1,16 @@ +{ + "types": [ + "excavated_variants:mysticalagriculture/soul" + ], + "translations": { + "en_us": "Soulium Ore" + }, + "blocks": { + "mysticalagriculture:soulium_ore": "excavated_variants:mysticalagriculture/soulstone" + }, + "tags": [ + "forge:ores/soulium", + "c:ores/soulium", + "c:soulium_ores" + ] +} diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mythicmetals/adamantite_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mythicmetals/adamantite_ore.json new file mode 100644 index 00000000..79d55acd --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mythicmetals/adamantite_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Adamantite Ore" + }, + "blocks": { + "mythicmetals:deepslate_adamantite_ore": "excavated_variants:minecraft/deepslate", + "mythicmetals:adamantite_ore": "excavated_variants:minecraft/stone" + }, + "tags": [ + "forge:ores/adamantite", + "c:ores/adamantite", + "c:adamantite_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mythicmetals/aquarium_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mythicmetals/aquarium_ore.json new file mode 100644 index 00000000..eecb6638 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mythicmetals/aquarium_ore.json @@ -0,0 +1,16 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Aquarium Ore" + }, + "blocks": { + "mythicmetals:aquarium_ore": "excavated_variants:minecraft/stone" + }, + "tags": [ + "forge:ores/aquarium", + "c:ores/aquarium", + "c:aquarium_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mythicmetals/banglum_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mythicmetals/banglum_ore.json new file mode 100644 index 00000000..55392f53 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mythicmetals/banglum_ore.json @@ -0,0 +1,18 @@ +{ + "types": [ + "excavated_variants:overworld", + "excavated_variants:nether" + ], + "translations": { + "en_us": "Banglum Ore" + }, + "blocks": { + "mythicmetals:nether_banglum_ore": "excavated_variants:minecraft/netherrack", + "mythicmetals:banglum_ore": "excavated_variants:minecraft/stone" + }, + "tags": [ + "forge:ores/banglum", + "c:ores/banglum", + "c:banglum_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mythicmetals/carmot_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mythicmetals/carmot_ore.json new file mode 100644 index 00000000..d5bab6f9 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mythicmetals/carmot_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Carmot Ore" + }, + "blocks": { + "mythicmetals:deepslate_carmot_ore": "excavated_variants:minecraft/deepslate", + "mythicmetals:carmot_ore": "excavated_variants:minecraft/stone" + }, + "tags": [ + "forge:ores/carmot", + "c:ores/carmot", + "c:carmot_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mythicmetals/kyber_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mythicmetals/kyber_ore.json new file mode 100644 index 00000000..e052b2e9 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mythicmetals/kyber_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Kyber Ore" + }, + "blocks": { + "mythicmetals:calcite_kyber_ore": "excavated_variants:minecraft/calcite", + "mythicmetals:kyber_ore": "excavated_variants:minecraft/stone" + }, + "tags": [ + "forge:ores/kyber", + "c:ores/kyber", + "c:kyber_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mythicmetals/manganese_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mythicmetals/manganese_ore.json new file mode 100644 index 00000000..1886609d --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mythicmetals/manganese_ore.json @@ -0,0 +1,16 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Manganese Ore" + }, + "blocks": { + "mythicmetals:manganese_ore": "excavated_variants:minecraft/stone" + }, + "tags": [ + "forge:ores/manganese", + "c:ores/manganese", + "c:manganese_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mythicmetals/midas_gold_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mythicmetals/midas_gold_ore.json new file mode 100644 index 00000000..d31a8bb7 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mythicmetals/midas_gold_ore.json @@ -0,0 +1,16 @@ +{ + "types": [ + "excavated_variants:nether" + ], + "translations": { + "en_us": "Midas Gold Ore" + }, + "blocks": { + "mythicmetals:midas_gold_ore": "excavated_variants:minecraft/netherrack" + }, + "tags": [ + "forge:ores/midas_gold", + "c:ores/midas_gold", + "c:midas_gold_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mythicmetals/morkite_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mythicmetals/morkite_ore.json new file mode 100644 index 00000000..64b4d8c1 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mythicmetals/morkite_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Morkite Ore" + }, + "blocks": { + "mythicmetals:morkite_ore": "excavated_variants:minecraft/stone", + "mythicmetals:deepslate_morkite_ore": "excavated_variants:minecraft/deepslate" + }, + "tags": [ + "forge:ores/morkite", + "c:ores/morkite", + "c:morkite_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mythicmetals/mythril_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mythicmetals/mythril_ore.json new file mode 100644 index 00000000..c57b19e9 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mythicmetals/mythril_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Mythril Ore" + }, + "blocks": { + "mythicmetals:deepslate_mythril_ore": "excavated_variants:minecraft/deepslate", + "mythicmetals:mythril_ore": "excavated_variants:minecraft/stone" + }, + "tags": [ + "forge:ores/mythril", + "c:ores/mythril", + "c:mythril_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mythicmetals/orichalcum_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mythicmetals/orichalcum_ore.json new file mode 100644 index 00000000..bac8c02e --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mythicmetals/orichalcum_ore.json @@ -0,0 +1,19 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Orichalcum Ore" + }, + "blocks": { + "mythicmetals:deepslate_orichalcum_ore": "excavated_variants:minecraft/deepslate", + "mythicmetals:smooth_basalt_orichalcum_ore": "excavated_variants:minecraft/smooth_basalt", + "mythicmetals:orichalcum_ore": "excavated_variants:minecraft/stone", + "mythicmetals:tuff_orichalcum_ore": "excavated_variants:minecraft/tuff" + }, + "tags": [ + "forge:ores/orichalcum", + "c:ores/orichalcum", + "c:orichalcum_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mythicmetals/osmium_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mythicmetals/osmium_ore.json new file mode 100644 index 00000000..0e73a0d8 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mythicmetals/osmium_ore.json @@ -0,0 +1,16 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Osmium Ore" + }, + "blocks": { + "mythicmetals:osmium_ore": "excavated_variants:minecraft/stone" + }, + "tags": [ + "forge:ores/osmium", + "c:ores/osmium", + "c:osmium_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mythicmetals/palladium_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mythicmetals/palladium_ore.json new file mode 100644 index 00000000..a3c1729b --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mythicmetals/palladium_ore.json @@ -0,0 +1,16 @@ +{ + "types": [ + "excavated_variants:nether" + ], + "translations": { + "en_us": "Palladium Ore" + }, + "blocks": { + "mythicmetals:palladium_ore": "excavated_variants:minecraft/netherrack" + }, + "tags": [ + "forge:ores/palladium", + "c:ores/palladium", + "c:palladium_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mythicmetals/platinum_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mythicmetals/platinum_ore.json new file mode 100644 index 00000000..2df8457f --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mythicmetals/platinum_ore.json @@ -0,0 +1,16 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Platinum Ore" + }, + "blocks": { + "mythicmetals:platinum_ore": "excavated_variants:minecraft/stone" + }, + "tags": [ + "forge:ores/platinum", + "c:ores/platinum", + "c:platinum_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mythicmetals/prometheum_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mythicmetals/prometheum_ore.json new file mode 100644 index 00000000..3e5ba507 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mythicmetals/prometheum_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Prometheum Ore" + }, + "blocks": { + "mythicmetals:prometheum_ore": "excavated_variants:minecraft/stone", + "mythicmetals:deepslate_prometheum_ore": "excavated_variants:minecraft/deepslate" + }, + "tags": [ + "forge:ores/prometheum", + "c:ores/prometheum", + "c:prometheum_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mythicmetals/quadrillum_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mythicmetals/quadrillum_ore.json new file mode 100644 index 00000000..208a8318 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mythicmetals/quadrillum_ore.json @@ -0,0 +1,16 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Quadrillum Ore" + }, + "blocks": { + "mythicmetals:quadrillum_ore": "excavated_variants:minecraft/stone" + }, + "tags": [ + "forge:ores/quadrillum", + "c:ores/quadrillum", + "c:quadrillum_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mythicmetals/runite_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mythicmetals/runite_ore.json new file mode 100644 index 00000000..88617e37 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mythicmetals/runite_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Runite Ore" + }, + "blocks": { + "mythicmetals:deepslate_runite_ore": "excavated_variants:minecraft/deepslate", + "mythicmetals:runite_ore": "excavated_variants:minecraft/stone" + }, + "tags": [ + "forge:ores/runite", + "c:ores/runite", + "c:runite_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mythicmetals/silver_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mythicmetals/silver_ore.json new file mode 100644 index 00000000..339059b8 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mythicmetals/silver_ore.json @@ -0,0 +1,16 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Silver Ore" + }, + "blocks": { + "mythicmetals:silver_ore": "excavated_variants:minecraft/stone" + }, + "tags": [ + "forge:ores/silver", + "c:ores/silver", + "c:silver_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mythicmetals/starrite_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mythicmetals/starrite_ore.json new file mode 100644 index 00000000..8ba893fa --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mythicmetals/starrite_ore.json @@ -0,0 +1,19 @@ +{ + "types": [ + "excavated_variants:overworld", + "excavated_variants:end" + ], + "translations": { + "en_us": "Starrite Ore" + }, + "blocks": { + "mythicmetals:end_stone_starrite_ore": "excavated_variants:minecraft/end_stone", + "mythicmetals:calcite_starrite_ore": "excavated_variants:minecraft/calcite", + "mythicmetals:starrite_ore": "excavated_variants:minecraft/stone" + }, + "tags": [ + "forge:ores/starrite", + "c:ores/starrite", + "c:starrite_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mythicmetals/stormyx_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mythicmetals/stormyx_ore.json new file mode 100644 index 00000000..4413bc89 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mythicmetals/stormyx_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:nether" + ], + "translations": { + "en_us": "Stormyx Ore" + }, + "blocks": { + "mythicmetals:stormyx_ore": "excavated_variants:minecraft/netherrack", + "mythicmetals:blackstone_stormyx_ore": "excavated_variants:minecraft/blackstone" + }, + "tags": [ + "forge:ores/stormyx", + "c:ores/stormyx", + "c:stormyx_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mythicmetals/tin_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mythicmetals/tin_ore.json new file mode 100644 index 00000000..125efe30 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mythicmetals/tin_ore.json @@ -0,0 +1,16 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Tin Ore" + }, + "blocks": { + "mythicmetals:tin_ore": "excavated_variants:minecraft/stone" + }, + "tags": [ + "forge:ores/tin", + "c:ores/tin", + "c:tin_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mythicmetals/unobtainium_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mythicmetals/unobtainium_ore.json new file mode 100644 index 00000000..5c48c9ae --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/mythicmetals/unobtainium_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Unobtainium Ore" + }, + "blocks": { + "mythicmetals:unobtainium_ore": "excavated_variants:minecraft/stone", + "mythicmetals:deepslate_unobtainium_ore": "excavated_variants:minecraft/deepslate" + }, + "tags": [ + "forge:ores/unobtainium", + "c:ores/unobtainium", + "c:unobtainium_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/oreganized/lead_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/oreganized/lead_ore.json new file mode 100644 index 00000000..1b61b971 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/oreganized/lead_ore.json @@ -0,0 +1,36 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Lead Ore" + }, + "blocks": { + "oreganized:lead_ore": { + "stone": "excavated_variants:minecraft/stone", + "generating": true + }, + "oreganized:deepslate_lead_ore": "excavated_variants:minecraft/deepslate", + "spelunkery:granite_lead_ore": { + "stone": "excavated_variants:minecraft/granite", + "required_mods": ["spelunkery", "oreganized"] + }, + "spelunkery:diorite_lead_ore": { + "stone": "excavated_variants:minecraft/diorite", + "required_mods": ["spelunkery", "oreganized"] + }, + "spelunkery:andesite_lead_ore": { + "stone": "excavated_variants:minecraft/andesite", + "required_mods": ["spelunkery", "oreganized"] + }, + "spelunkery:tuff_lead_ore": { + "stone": "excavated_variants:minecraft/tuff", + "required_mods": ["spelunkery", "oreganized"] + } + }, + "tags": [ + "forge:ores/lead", + "c:ores/lead", + "c:lead_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/oreganized/silver_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/oreganized/silver_ore.json new file mode 100644 index 00000000..acc8041c --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/oreganized/silver_ore.json @@ -0,0 +1,39 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Silver Ore" + }, + "blocks": { + "oreganized:silver_ore": { + "stone": "excavated_variants:minecraft/stone", + "generating": true + }, + "oreganized:deepslate_silver_ore": { + "stone": "excavated_variants:minecraft/deepslate", + "generating": true + }, + "spelunkery:granite_silver_ore": { + "stone": "excavated_variants:minecraft/granite", + "required_mods": ["spelunkery", "oreganized"] + }, + "spelunkery:diorite_silver_ore": { + "stone": "excavated_variants:minecraft/diorite", + "required_mods": ["spelunkery", "oreganized"] + }, + "spelunkery:andesite_silver_ore": { + "stone": "excavated_variants:minecraft/andesite", + "required_mods": ["spelunkery", "oreganized"] + }, + "spelunkery:tuff_silver_ore": { + "stone": "excavated_variants:minecraft/tuff", + "required_mods": ["spelunkery", "oreganized"] + } + }, + "tags": [ + "forge:ores/silver", + "c:ores/silver", + "c:silver_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/powah/uraninite_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/powah/uraninite_ore.json new file mode 100644 index 00000000..34eef8e2 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/powah/uraninite_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Uraninite Ore" + }, + "blocks": { + "powah:uraninite_ore": "excavated_variants:minecraft/stone", + "powah:deepslate_uraninite_ore": "excavated_variants:minecraft/deepslate" + }, + "tags": [ + "forge:ores/uraninite", + "c:ores/uraninite", + "c:uraninite_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/powah/uraninite_ore_dense.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/powah/uraninite_ore_dense.json new file mode 100644 index 00000000..eacc53c8 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/powah/uraninite_ore_dense.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Uraninite Ore (Dense)" + }, + "blocks": { + "powah:uraninite_ore_dense": "excavated_variants:minecraft/stone", + "powah:deepslate_uraninite_ore_dense": "excavated_variants:minecraft/deepslate" + }, + "tags": [ + "forge:ores/uraninite_dense", + "c:ores/uraninite_dense", + "c:uraninite_dense_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/powah/uraninite_ore_poor.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/powah/uraninite_ore_poor.json new file mode 100644 index 00000000..3e03f072 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/powah/uraninite_ore_poor.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Uraninite Ore (Poor)" + }, + "blocks": { + "powah:uraninite_ore_poor": "excavated_variants:minecraft/stone", + "powah:deepslate_uraninite_ore_poor": "excavated_variants:minecraft/deepslate" + }, + "tags": [ + "forge:ores/uraninite_poor", + "c:ores/uraninite_poor", + "c:uraninite_poor_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/purpeille/purpur_remnants.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/purpeille/purpur_remnants.json new file mode 100644 index 00000000..9a93c1b2 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/purpeille/purpur_remnants.json @@ -0,0 +1,16 @@ +{ + "types": [ + "excavated_variants:end" + ], + "translations": { + "en_us": "Purpur Remnants" + }, + "blocks": { + "purpeille:purpur_remnants": "excavated_variants:minecraft/end_stone" + }, + "tags": [ + "forge:ores/purpur_remnants", + "c:ores/purpur_remnants", + "c:purpur_remnants_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/randomite/randomite_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/randomite/randomite_ore.json new file mode 100644 index 00000000..40bbd0b9 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/randomite/randomite_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Randomite Ore" + }, + "blocks": { + "randomite:randomite_ore": "excavated_variants:minecraft/stone", + "randomite:deepslate_randomite_ore": "excavated_variants:minecraft/deepslate" + }, + "tags": [ + "forge:ores/randomite", + "c:ores/randomite", + "c:randomite_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/randomium/randomium_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/randomium/randomium_ore.json new file mode 100644 index 00000000..7d835667 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/randomium/randomium_ore.json @@ -0,0 +1,19 @@ +{ + "types": [ + "excavated_variants:overworld", + "excavated_variants:end" + ], + "translations": { + "en_us": "Randomium Ore" + }, + "blocks": { + "randomium:randomium_ore_end": "excavated_variants:minecraft/end_stone", + "randomium:randomium_ore_deepslate": "excavated_variants:minecraft/deepslate", + "randomium:randomium_ore": "excavated_variants:minecraft/stone" + }, + "tags": [ + "forge:ores/randomium", + "c:ores/randomium", + "c:randomium_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/salt/rock_salt.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/salt/rock_salt.json new file mode 100644 index 00000000..9a0b0d64 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/salt/rock_salt.json @@ -0,0 +1,16 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Rock Salt" + }, + "blocks": { + "salt:rock_salt_ore": "excavated_variants:minecraft/stone" + }, + "tags": [ + "forge:ores/rock_salt", + "c:ores/rock_salt", + "c:rock_salt_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/sulfurpotassiummod/potassium_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/sulfurpotassiummod/potassium_ore.json new file mode 100644 index 00000000..cdca7b29 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/sulfurpotassiummod/potassium_ore.json @@ -0,0 +1,16 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Potassium Ore" + }, + "blocks": { + "sulfurpotassiummod:potassium_ore": "excavated_variants:minecraft/stone" + }, + "tags": [ + "forge:ores/potassium", + "c:ores/potassium", + "c:potassium_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/sulfurpotassiummod/sulfur_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/sulfurpotassiummod/sulfur_ore.json new file mode 100644 index 00000000..c9439c56 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/sulfurpotassiummod/sulfur_ore.json @@ -0,0 +1,18 @@ +{ + "types": [ + "excavated_variants:overworld", + "excavated_variants:nether" + ], + "translations": { + "en_us": "Sulfur Ore" + }, + "blocks": { + "sulfurpotassiummod:sulfur_ore": "excavated_variants:minecraft/deepslate", + "sulfurpotassiummod:sulfur_nether_ore": "excavated_variants:minecraft/netherrack" + }, + "tags": [ + "forge:ores/sulfur", + "c:ores/sulfur", + "c:sulfur_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/sullysmod/jade_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/sullysmod/jade_ore.json new file mode 100644 index 00000000..6fff4461 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/sullysmod/jade_ore.json @@ -0,0 +1,36 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Jade Ore" + }, + "blocks": { + "sullysmod:deepslate_jade_ore": "excavated_variants:minecraft/deepslate", + "sullysmod:jade_ore": { + "stone": "excavated_variants:minecraft/stone", + "generating": true + }, + "spelunkery:granite_jade_ore": { + "stone": "excavated_variants:minecraft/granite", + "required_mods": ["spelunkery", "sullysmod"] + }, + "spelunkery:diorite_jade_ore": { + "stone": "excavated_variants:minecraft/diorite", + "required_mods": ["spelunkery", "sullysmod"] + }, + "spelunkery:andesite_jade_ore": { + "stone": "excavated_variants:minecraft/andesite", + "required_mods": ["spelunkery", "sullysmod"] + }, + "spelunkery:tuff_jade_ore": { + "stone": "excavated_variants:minecraft/tuff", + "required_mods": ["spelunkery", "sullysmod"] + } + }, + "tags": [ + "forge:ores/jade", + "c:ores/jade", + "c:jade_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/techreborn/bauxite_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/techreborn/bauxite_ore.json new file mode 100644 index 00000000..4a4ff9cb --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/techreborn/bauxite_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Bauxite Ore" + }, + "blocks": { + "techreborn:bauxite_ore": "excavated_variants:minecraft/stone", + "techreborn:deepslate_bauxite_ore": "excavated_variants:minecraft/deepslate" + }, + "tags": [ + "forge:ores/bauxite", + "c:ores/bauxite", + "c:bauxite_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/techreborn/cinnabar_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/techreborn/cinnabar_ore.json new file mode 100644 index 00000000..75961b29 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/techreborn/cinnabar_ore.json @@ -0,0 +1,16 @@ +{ + "types": [ + "excavated_variants:nether" + ], + "translations": { + "en_us": "Cinnabar Ore" + }, + "blocks": { + "techreborn:cinnabar_ore": "excavated_variants:minecraft/netherrack" + }, + "tags": [ + "forge:ores/cinnabar", + "c:ores/cinnabar", + "c:cinnabar_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/techreborn/galena_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/techreborn/galena_ore.json new file mode 100644 index 00000000..930324df --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/techreborn/galena_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Galena Ore" + }, + "blocks": { + "techreborn:deepslate_galena_ore": "excavated_variants:minecraft/deepslate", + "techreborn:galena_ore": "excavated_variants:minecraft/stone" + }, + "tags": [ + "forge:ores/galena", + "c:ores/galena", + "c:galena_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/techreborn/iridium_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/techreborn/iridium_ore.json new file mode 100644 index 00000000..0eff231d --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/techreborn/iridium_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Iridium Ore" + }, + "blocks": { + "techreborn:iridium_ore": "excavated_variants:minecraft/stone", + "techreborn:deepslate_iridium_ore": "excavated_variants:minecraft/deepslate" + }, + "tags": [ + "forge:ores/iridium", + "c:ores/iridium", + "c:iridium_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/techreborn/lead_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/techreborn/lead_ore.json new file mode 100644 index 00000000..0fe1c5be --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/techreborn/lead_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Lead Ore" + }, + "blocks": { + "techreborn:deepslate_lead_ore": "excavated_variants:minecraft/deepslate", + "techreborn:lead_ore": "excavated_variants:minecraft/stone" + }, + "tags": [ + "forge:ores/lead", + "c:ores/lead", + "c:lead_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/techreborn/peridot_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/techreborn/peridot_ore.json new file mode 100644 index 00000000..3095c517 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/techreborn/peridot_ore.json @@ -0,0 +1,16 @@ +{ + "types": [ + "excavated_variants:end" + ], + "translations": { + "en_us": "Peridot Ore" + }, + "blocks": { + "techreborn:peridot_ore": "excavated_variants:minecraft/end_stone" + }, + "tags": [ + "forge:ores/peridot", + "c:ores/peridot", + "c:peridot_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/techreborn/pyrite_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/techreborn/pyrite_ore.json new file mode 100644 index 00000000..670f9662 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/techreborn/pyrite_ore.json @@ -0,0 +1,16 @@ +{ + "types": [ + "excavated_variants:nether" + ], + "translations": { + "en_us": "Pyrite Ore" + }, + "blocks": { + "techreborn:pyrite_ore": "excavated_variants:minecraft/netherrack" + }, + "tags": [ + "forge:ores/pyrite", + "c:ores/pyrite", + "c:pyrite_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/techreborn/ruby_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/techreborn/ruby_ore.json new file mode 100644 index 00000000..4109e77d --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/techreborn/ruby_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Ruby Ore" + }, + "blocks": { + "techreborn:deepslate_ruby_ore": "excavated_variants:minecraft/deepslate", + "techreborn:ruby_ore": "excavated_variants:minecraft/stone" + }, + "tags": [ + "forge:ores/ruby", + "c:ores/ruby", + "c:ruby_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/techreborn/sapphire_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/techreborn/sapphire_ore.json new file mode 100644 index 00000000..2c5b2b34 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/techreborn/sapphire_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Sapphire Ore" + }, + "blocks": { + "techreborn:sapphire_ore": "excavated_variants:minecraft/stone", + "techreborn:deepslate_sapphire_ore": "excavated_variants:minecraft/deepslate" + }, + "tags": [ + "forge:ores/sapphire", + "c:ores/sapphire", + "c:sapphire_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/techreborn/sheldonite_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/techreborn/sheldonite_ore.json new file mode 100644 index 00000000..67c82afc --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/techreborn/sheldonite_ore.json @@ -0,0 +1,16 @@ +{ + "types": [ + "excavated_variants:end" + ], + "translations": { + "en_us": "Sheldonite Ore" + }, + "blocks": { + "techreborn:sheldonite_ore": "excavated_variants:minecraft/end_stone" + }, + "tags": [ + "forge:ores/sheldonite", + "c:ores/sheldonite", + "c:sheldonite_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/techreborn/silver_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/techreborn/silver_ore.json new file mode 100644 index 00000000..2cd42371 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/techreborn/silver_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Silver Ore" + }, + "blocks": { + "techreborn:deepslate_silver_ore": "excavated_variants:minecraft/deepslate", + "techreborn:silver_ore": "excavated_variants:minecraft/stone" + }, + "tags": [ + "forge:ores/silver", + "c:ores/silver", + "c:silver_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/techreborn/sodalite_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/techreborn/sodalite_ore.json new file mode 100644 index 00000000..f2a504a3 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/techreborn/sodalite_ore.json @@ -0,0 +1,16 @@ +{ + "types": [ + "excavated_variants:end" + ], + "translations": { + "en_us": "Sodalite Ore" + }, + "blocks": { + "techreborn:sodalite_ore": "excavated_variants:minecraft/end_stone" + }, + "tags": [ + "forge:ores/sodalite", + "c:ores/sodalite", + "c:sodalite_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/techreborn/sphalerite_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/techreborn/sphalerite_ore.json new file mode 100644 index 00000000..3f036f65 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/techreborn/sphalerite_ore.json @@ -0,0 +1,16 @@ +{ + "types": [ + "excavated_variants:nether" + ], + "translations": { + "en_us": "Sphalerite Ore" + }, + "blocks": { + "techreborn:sphalerite_ore": "excavated_variants:minecraft/netherrack" + }, + "tags": [ + "forge:ores/sphalerite", + "c:ores/sphalerite", + "c:sphalerite_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/techreborn/tin_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/techreborn/tin_ore.json new file mode 100644 index 00000000..005ce050 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/techreborn/tin_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Tin Ore" + }, + "blocks": { + "techreborn:deepslate_tin_ore": "excavated_variants:minecraft/deepslate", + "techreborn:tin_ore": "excavated_variants:minecraft/stone" + }, + "tags": [ + "forge:ores/tin", + "c:ores/tin", + "c:tin_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/techreborn/tungsten_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/techreborn/tungsten_ore.json new file mode 100644 index 00000000..4afd7e97 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/techreborn/tungsten_ore.json @@ -0,0 +1,16 @@ +{ + "types": [ + "excavated_variants:end" + ], + "translations": { + "en_us": "Tungsten Ore" + }, + "blocks": { + "techreborn:tungsten_ore": "excavated_variants:minecraft/end_stone" + }, + "tags": [ + "forge:ores/tungsten", + "c:ores/tungsten", + "c:tungsten_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/things/gleaming_ore.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/things/gleaming_ore.json new file mode 100644 index 00000000..630d339c --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/ore/things/gleaming_ore.json @@ -0,0 +1,17 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Gleaming Ore" + }, + "blocks": { + "things:gleaming_ore": "excavated_variants:minecraft/stone", + "things:deepslate_gleaming_ore": "excavated_variants:minecraft/deepslate" + }, + "tags": [ + "forge:ores/gleaming", + "c:ores/gleaming", + "c:gleaming_ores" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/betterend/azure_jadestone.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/betterend/azure_jadestone.json new file mode 100644 index 00000000..a397711e --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/betterend/azure_jadestone.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:end" + ], + "translations": { + "en_us": "Azure Jadestone" + }, + "block": "betterend:azure_jadestone", + "ore_tags": [ + "forge:ores_in_ground/azure_jadestone" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/betterend/brimstone.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/betterend/brimstone.json new file mode 100644 index 00000000..847f336e --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/betterend/brimstone.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:end" + ], + "translations": { + "en_us": "Brimstone" + }, + "block": "betterend:brimstone", + "ore_tags": [ + "forge:ores_in_ground/brimstone" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/betterend/flavolite.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/betterend/flavolite.json new file mode 100644 index 00000000..7abd3588 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/betterend/flavolite.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:end" + ], + "translations": { + "en_us": "Flavolite" + }, + "block": "betterend:flavolite", + "ore_tags": [ + "forge:ores_in_ground/flavolite" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/betterend/sandy_jadestone.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/betterend/sandy_jadestone.json new file mode 100644 index 00000000..5b23d400 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/betterend/sandy_jadestone.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:end" + ], + "translations": { + "en_us": "Sandy Jadestone" + }, + "block": "betterend:sandy_jadestone", + "ore_tags": [ + "forge:ores_in_ground/sandy_jadestone" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/betterend/sulphuric_rock.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/betterend/sulphuric_rock.json new file mode 100644 index 00000000..b119e703 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/betterend/sulphuric_rock.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:end" + ], + "translations": { + "en_us": "Sulfuric Rock" + }, + "block": "betterend:sulphuric_rock", + "ore_tags": [ + "forge:ores_in_ground/sulphuric_rock" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/betterend/umbralith.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/betterend/umbralith.json new file mode 100644 index 00000000..480b501b --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/betterend/umbralith.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:end" + ], + "translations": { + "en_us": "Umbralith" + }, + "block": "betterend:umbralith", + "ore_tags": [ + "forge:ores_in_ground/umbralith" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/betterend/violecite.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/betterend/violecite.json new file mode 100644 index 00000000..b786c87a --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/betterend/violecite.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:end" + ], + "translations": { + "en_us": "Violecite" + }, + "block": "betterend:violecite", + "ore_tags": [ + "forge:ores_in_ground/violecite" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/betterend/virid_jadestone.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/betterend/virid_jadestone.json new file mode 100644 index 00000000..06f498e4 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/betterend/virid_jadestone.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:end" + ], + "translations": { + "en_us": "Virid Jadestone" + }, + "block": "betterend:virid_jadestone", + "ore_tags": [ + "forge:ores_in_ground/virid_jadestone" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/biomesoplenty/black_sandstone.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/biomesoplenty/black_sandstone.json new file mode 100644 index 00000000..b2b4978b --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/biomesoplenty/black_sandstone.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Black Sandstone" + }, + "block": "biomesoplenty:black_sandstone", + "ore_tags": [ + "forge:ores_in_ground/black_sandstone" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/biomesoplenty/orange_sandstone.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/biomesoplenty/orange_sandstone.json new file mode 100644 index 00000000..61450aa7 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/biomesoplenty/orange_sandstone.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Orange Sandstone" + }, + "block": "biomesoplenty:orange_sandstone", + "ore_tags": [ + "forge:ores_in_ground/orange_sandstone" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/biomesoplenty/white_sandstone.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/biomesoplenty/white_sandstone.json new file mode 100644 index 00000000..47f6300b --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/biomesoplenty/white_sandstone.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "White Sandstone" + }, + "block": "biomesoplenty:white_sandstone", + "ore_tags": [ + "forge:ores_in_ground/white_sandstone" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/blockus/bluestone.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/blockus/bluestone.json new file mode 100644 index 00000000..e4c3e1b3 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/blockus/bluestone.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Bluestone" + }, + "block": "blockus:bluestone", + "ore_tags": [ + "forge:ores_in_ground/bluestone" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/blockus/limestone.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/blockus/limestone.json new file mode 100644 index 00000000..fb14af86 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/blockus/limestone.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Limestone" + }, + "block": "blockus:limestone", + "ore_tags": [ + "forge:ores_in_ground/limestone" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/blockus/marble.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/blockus/marble.json new file mode 100644 index 00000000..27b23399 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/blockus/marble.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Marble" + }, + "block": "blockus:marble", + "ore_tags": [ + "forge:ores_in_ground/marble" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/blockus/viridite.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/blockus/viridite.json new file mode 100644 index 00000000..a539664c --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/blockus/viridite.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Viridite" + }, + "block": "blockus:viridite", + "ore_tags": [ + "forge:ores_in_ground/viridite" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/byg/blue_netherrack.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/byg/blue_netherrack.json new file mode 100644 index 00000000..807440d4 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/byg/blue_netherrack.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:nether" + ], + "translations": { + "en_us": "Blue Netherrack" + }, + "block": "byg:blue_netherrack", + "ore_tags": [ + "forge:ores_in_ground/blue_netherrack" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/byg/brimstone.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/byg/brimstone.json new file mode 100644 index 00000000..be229656 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/byg/brimstone.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:nether" + ], + "translations": { + "en_us": "Brimstone" + }, + "block": "byg:brimstone", + "ore_tags": [ + "forge:ores_in_ground/brimstone" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/byg/cryptic.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/byg/cryptic.json new file mode 100644 index 00000000..dbd45944 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/byg/cryptic.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:end" + ], + "translations": { + "en_us": "Cryptic" + }, + "block": "byg:cryptic_stone", + "ore_tags": [ + "forge:ores_in_ground/cryptic" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/byg/dacite.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/byg/dacite.json new file mode 100644 index 00000000..2b016052 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/byg/dacite.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Dacite" + }, + "block": "byg:dacite", + "ore_tags": [ + "forge:ores_in_ground/dacite" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/byg/ether_stone.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/byg/ether_stone.json new file mode 100644 index 00000000..848b8c26 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/byg/ether_stone.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:end" + ], + "translations": { + "en_us": "Ether Stone" + }, + "block": "byg:ether_stone", + "ore_tags": [ + "forge:ores_in_ground/ether_stone" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/byg/mossy_stone.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/byg/mossy_stone.json new file mode 100644 index 00000000..f17c8af3 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/byg/mossy_stone.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Mossy Stone" + }, + "block": "byg:mossy_stone", + "ore_tags": [ + "forge:ores_in_ground/mossy_stone" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/byg/purpur.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/byg/purpur.json new file mode 100644 index 00000000..da14d6e4 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/byg/purpur.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:end" + ], + "translations": { + "en_us": "Purpur" + }, + "block": "byg:purpur_stone", + "ore_tags": [ + "forge:ores_in_ground/purpur" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/byg/red_rock.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/byg/red_rock.json new file mode 100644 index 00000000..ba976a02 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/byg/red_rock.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Red Rock" + }, + "block": "byg:red_rock", + "ore_tags": [ + "forge:ores_in_ground/red_rock" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/byg/rocky.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/byg/rocky.json new file mode 100644 index 00000000..2bc5a5fc --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/byg/rocky.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Rocky" + }, + "block": "byg:rocky_stone", + "ore_tags": [ + "forge:ores_in_ground/rocky" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/byg/scoria.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/byg/scoria.json new file mode 100644 index 00000000..fd0ee8f4 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/byg/scoria.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:nether" + ], + "translations": { + "en_us": "Scoria" + }, + "block": "byg:scoria_stone", + "ore_tags": [ + "forge:ores_in_ground/scoria" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/byg/soapstone.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/byg/soapstone.json new file mode 100644 index 00000000..26ff3233 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/byg/soapstone.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Soapstone" + }, + "block": "byg:soapstone", + "ore_tags": [ + "forge:ores_in_ground/soapstone" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/byg/travertine.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/byg/travertine.json new file mode 100644 index 00000000..6ec00141 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/byg/travertine.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Travertine" + }, + "block": "byg:travertine", + "ore_tags": [ + "forge:ores_in_ground/travertine" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/create/asurine.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/create/asurine.json new file mode 100644 index 00000000..d7aa2c89 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/create/asurine.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Asurine" + }, + "block": "create:asurine", + "ore_tags": [ + "forge:ores_in_ground/asurine" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/create/crimsite.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/create/crimsite.json new file mode 100644 index 00000000..90bbe5b7 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/create/crimsite.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Crimsite" + }, + "block": "create:crimsite", + "ore_tags": [ + "forge:ores_in_ground/crimsite" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/create/limestone.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/create/limestone.json new file mode 100644 index 00000000..f01b6cbd --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/create/limestone.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Limestone" + }, + "block": "create:limestone", + "ore_tags": [ + "forge:ores_in_ground/limestone" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/create/ochrum.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/create/ochrum.json new file mode 100644 index 00000000..8f65bba8 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/create/ochrum.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Ochrum" + }, + "block": "create:ochrum", + "ore_tags": [ + "forge:ores_in_ground/ochrum" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/create/scorchia.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/create/scorchia.json new file mode 100644 index 00000000..e2b210d7 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/create/scorchia.json @@ -0,0 +1,13 @@ +{ + "types": [ + "excavated_variants:overworld", + "excavated_variants:nether" + ], + "translations": { + "en_us": "Scorchia" + }, + "block": "create:scorchia", + "ore_tags": [ + "forge:ores_in_ground/scorchia" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/create/scoria.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/create/scoria.json new file mode 100644 index 00000000..bd94a68a --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/create/scoria.json @@ -0,0 +1,13 @@ +{ + "types": [ + "excavated_variants:overworld", + "excavated_variants:nether" + ], + "translations": { + "en_us": "Scoria" + }, + "block": "create:scoria", + "ore_tags": [ + "forge:ores_in_ground/scoria" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/create/smooth_basalt.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/create/smooth_basalt.json new file mode 100644 index 00000000..3cbf0f03 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/create/smooth_basalt.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:nether" + ], + "translations": { + "en_us": "Smooth Basalt" + }, + "block": "minecraft:smooth_basalt", + "ore_tags": [ + "forge:ores_in_ground/smooth_basalt" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/create/veridium.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/create/veridium.json new file mode 100644 index 00000000..71f58ad6 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/create/veridium.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Veridium" + }, + "block": "create:veridium", + "ore_tags": [ + "forge:ores_in_ground/veridium" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/darkerdepths/aridrock.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/darkerdepths/aridrock.json new file mode 100644 index 00000000..8cb67b00 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/darkerdepths/aridrock.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Aridrock" + }, + "block": "darkerdepths:aridrock", + "ore_tags": [ + "forge:ores_in_ground/aridrock" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/darkerdepths/grimestone.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/darkerdepths/grimestone.json new file mode 100644 index 00000000..88f9133e --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/darkerdepths/grimestone.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Grimestone" + }, + "block": "darkerdepths:grimestone", + "ore_tags": [ + "forge:ores_in_ground/grimestone" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/darkerdepths/limestone.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/darkerdepths/limestone.json new file mode 100644 index 00000000..9582b53a --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/darkerdepths/limestone.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Limestone" + }, + "block": "darkerdepths:limestone", + "ore_tags": [ + "forge:ores_in_ground/limestone" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/darkerdepths/shale.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/darkerdepths/shale.json new file mode 100644 index 00000000..27d04587 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/darkerdepths/shale.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Shale" + }, + "block": "darkerdepths:shale", + "ore_tags": [ + "forge:ores_in_ground/shale" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/enriched/dark_granite.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/enriched/dark_granite.json new file mode 100644 index 00000000..ea860baf --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/enriched/dark_granite.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Dark Granite" + }, + "block": "enriched:dark_granite", + "ore_tags": [ + "forge:ores_in_ground/dark_granite" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/enriched/marble.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/enriched/marble.json new file mode 100644 index 00000000..57c1b0e8 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/enriched/marble.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Marble" + }, + "block": "enriched:marble", + "ore_tags": [ + "forge:ores_in_ground/marble" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/minecraft/andesite.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/minecraft/andesite.json new file mode 100644 index 00000000..d0ad69f9 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/minecraft/andesite.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Andesite" + }, + "block": "minecraft:andesite", + "ore_tags": [ + "forge:ores_in_ground/andesite" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/minecraft/basalt.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/minecraft/basalt.json new file mode 100644 index 00000000..2b3a826d --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/minecraft/basalt.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:nether" + ], + "translations": { + "en_us": "Basalt" + }, + "block": "minecraft:basalt", + "ore_tags": [ + "forge:ores_in_ground/basalt" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/minecraft/blackstone.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/minecraft/blackstone.json new file mode 100644 index 00000000..0657316c --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/minecraft/blackstone.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:nether" + ], + "translations": { + "en_us": "Blackstone" + }, + "block": "minecraft:blackstone", + "ore_tags": [ + "forge:ores_in_ground/blackstone" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/minecraft/calcite.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/minecraft/calcite.json new file mode 100644 index 00000000..dc683ba0 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/minecraft/calcite.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Calcite" + }, + "block": "minecraft:calcite", + "ore_tags": [ + "forge:ores_in_ground/calcite" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/minecraft/deepslate.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/minecraft/deepslate.json new file mode 100644 index 00000000..6fa58090 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/minecraft/deepslate.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Deepslate" + }, + "block": "minecraft:deepslate", + "ore_tags": [ + "forge:ores_in_ground/deepslate" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/minecraft/diorite.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/minecraft/diorite.json new file mode 100644 index 00000000..5ba4ce3e --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/minecraft/diorite.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Diorite" + }, + "block": "minecraft:diorite", + "ore_tags": [ + "forge:ores_in_ground/diorite" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/minecraft/dripstone.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/minecraft/dripstone.json new file mode 100644 index 00000000..fed60293 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/minecraft/dripstone.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Dripstone" + }, + "block": "minecraft:dripstone_block", + "ore_tags": [ + "forge:ores_in_ground/dripstone" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/minecraft/end_stone.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/minecraft/end_stone.json new file mode 100644 index 00000000..d08c44cd --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/minecraft/end_stone.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:end" + ], + "translations": { + "en_us": "End Stone" + }, + "block": "minecraft:end_stone", + "ore_tags": [ + "forge:ores_in_ground/end_stone" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/minecraft/granite.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/minecraft/granite.json new file mode 100644 index 00000000..3cd7581e --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/minecraft/granite.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Granite" + }, + "block": "minecraft:granite", + "ore_tags": [ + "forge:ores_in_ground/granite" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/minecraft/netherrack.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/minecraft/netherrack.json new file mode 100644 index 00000000..55ef0600 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/minecraft/netherrack.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:nether" + ], + "translations": { + "en_us": "Netherrack" + }, + "block": "minecraft:netherrack", + "ore_tags": [ + "forge:ores_in_ground/netherrack" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/minecraft/red_sandstone.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/minecraft/red_sandstone.json new file mode 100644 index 00000000..420620b0 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/minecraft/red_sandstone.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Red Sandstone" + }, + "block": "minecraft:red_sandstone", + "ore_tags": [ + "forge:ores_in_ground/red_sandstone" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/minecraft/sandstone.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/minecraft/sandstone.json new file mode 100644 index 00000000..d6d4a8d4 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/minecraft/sandstone.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Sandstone" + }, + "block": "minecraft:sandstone", + "ore_tags": [ + "forge:ores_in_ground/sandstone" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/minecraft/smooth_basalt.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/minecraft/smooth_basalt.json new file mode 100644 index 00000000..9fc1237e --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/minecraft/smooth_basalt.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Smooth Basalt" + }, + "block": "minecraft:smooth_basalt", + "ore_tags": [ + "forge:ores_in_ground/smooth_basalt" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/minecraft/stone.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/minecraft/stone.json new file mode 100644 index 00000000..9e09b4ae --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/minecraft/stone.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Stone" + }, + "block": "minecraft:stone", + "ore_tags": [ + "forge:ores_in_ground/stone" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/minecraft/tuff.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/minecraft/tuff.json new file mode 100644 index 00000000..57e15780 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/minecraft/tuff.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Tuff" + }, + "block": "minecraft:tuff", + "ore_tags": [ + "forge:ores_in_ground/tuff" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/mysticalagriculture/soulstone.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/mysticalagriculture/soulstone.json new file mode 100644 index 00000000..303bb8e6 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/mysticalagriculture/soulstone.json @@ -0,0 +1,13 @@ +{ + "types": [ + "excavated_variants:nether", + "excavated_variants:mysticalagriculture/soul" + ], + "translations": { + "en_us": "Soulstone" + }, + "block": "mysticalagriculture:soulstone", + "ore_tags": [ + "forge:ores_in_ground/soulstone" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/promenade/asphalt.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/promenade/asphalt.json new file mode 100644 index 00000000..daaa77c9 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/promenade/asphalt.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Asphalt" + }, + "block": "promenade:asphalt", + "ore_tags": [ + "forge:ores_in_ground/asphalt" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/promenade/blunite.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/promenade/blunite.json new file mode 100644 index 00000000..50f8463d --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/promenade/blunite.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Blunite" + }, + "block": "promenade:blunite", + "ore_tags": [ + "forge:ores_in_ground/blunite" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/quark/jasper.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/quark/jasper.json new file mode 100644 index 00000000..a3224391 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/quark/jasper.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Jasper" + }, + "block": "quark:jasper", + "ore_tags": [ + "forge:ores_in_ground/jasper" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/quark/limestone.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/quark/limestone.json new file mode 100644 index 00000000..8e7ae621 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/quark/limestone.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Limestone" + }, + "block": "quark:limestone", + "ore_tags": [ + "forge:ores_in_ground/limestone" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/quark/shale.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/quark/shale.json new file mode 100644 index 00000000..2ed6cd29 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/quark/shale.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Shale" + }, + "block": "quark:shale", + "ore_tags": [ + "forge:ores_in_ground/shale" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/twigs/bloodstone.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/twigs/bloodstone.json new file mode 100644 index 00000000..a05bfd9a --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/twigs/bloodstone.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:nether" + ], + "translations": { + "en_us": "Bloodstone" + }, + "block": "twigs:bloodstone", + "ore_tags": [ + "forge:ores_in_ground/bloodstone" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/twigs/rhyolite.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/twigs/rhyolite.json new file mode 100644 index 00000000..b644310a --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/twigs/rhyolite.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Rhyolite" + }, + "block": "twigs:rhyolite", + "ore_tags": [ + "forge:ores_in_ground/rhyolite" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/twigs/schist.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/twigs/schist.json new file mode 100644 index 00000000..eb6ef5cf --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/twigs/schist.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Schist" + }, + "block": "twigs:schist", + "ore_tags": [ + "forge:ores_in_ground/schist" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/unearthed/beige_limestone.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/unearthed/beige_limestone.json new file mode 100644 index 00000000..b423ffe0 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/unearthed/beige_limestone.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Beige Limestone" + }, + "block": "unearthed:beige_limestone", + "ore_tags": [ + "forge:ores_in_ground/beige_limestone" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/unearthed/conglomerate.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/unearthed/conglomerate.json new file mode 100644 index 00000000..336e4031 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/unearthed/conglomerate.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Conglomerate" + }, + "block": "unearthed:conglomerate", + "ore_tags": [ + "forge:ores_in_ground/conglomerate" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/unearthed/dacite.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/unearthed/dacite.json new file mode 100644 index 00000000..1eaa159b --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/unearthed/dacite.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Dacite" + }, + "block": "unearthed:dacite", + "ore_tags": [ + "forge:ores_in_ground/dacite" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/unearthed/dolerite.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/unearthed/dolerite.json new file mode 100644 index 00000000..98f44c5d --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/unearthed/dolerite.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Dolerite" + }, + "block": "unearthed:dolerite", + "ore_tags": [ + "forge:ores_in_ground/dolerite" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/unearthed/gabbro.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/unearthed/gabbro.json new file mode 100644 index 00000000..08505f74 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/unearthed/gabbro.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Gabbro" + }, + "block": "unearthed:gabbro", + "ore_tags": [ + "forge:ores_in_ground/gabbro" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/unearthed/granodiorite.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/unearthed/granodiorite.json new file mode 100644 index 00000000..efd505cf --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/unearthed/granodiorite.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Granodiorite" + }, + "block": "unearthed:granodiorite", + "ore_tags": [ + "forge:ores_in_ground/granodiorite" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/unearthed/grey_limestone.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/unearthed/grey_limestone.json new file mode 100644 index 00000000..1428f2f3 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/unearthed/grey_limestone.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Grey Limestone" + }, + "block": "unearthed:grey_limestone", + "ore_tags": [ + "forge:ores_in_ground/grey_limestone" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/unearthed/limestone.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/unearthed/limestone.json new file mode 100644 index 00000000..84211ca7 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/unearthed/limestone.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Limestone" + }, + "block": "unearthed:limestone", + "ore_tags": [ + "forge:ores_in_ground/limestone" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/unearthed/mudstone.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/unearthed/mudstone.json new file mode 100644 index 00000000..4260ffb9 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/unearthed/mudstone.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Mudstone" + }, + "block": "unearthed:mudstone", + "ore_tags": [ + "forge:ores_in_ground/mudstone" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/unearthed/phyllite.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/unearthed/phyllite.json new file mode 100644 index 00000000..02eb1b8a --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/unearthed/phyllite.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Phyllite" + }, + "block": "unearthed:phyllite", + "ore_tags": [ + "forge:ores_in_ground/phyllite" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/unearthed/pillow_basalt.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/unearthed/pillow_basalt.json new file mode 100644 index 00000000..bb421628 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/unearthed/pillow_basalt.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Pillow Basalt" + }, + "block": "unearthed:pillow_basalt", + "ore_tags": [ + "forge:ores_in_ground/pillow_basalt" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/unearthed/quartzite.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/unearthed/quartzite.json new file mode 100644 index 00000000..1922a61f --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/unearthed/quartzite.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Quartzite" + }, + "block": "unearthed:quartzite", + "ore_tags": [ + "forge:ores_in_ground/quartzite" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/unearthed/rhyolite.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/unearthed/rhyolite.json new file mode 100644 index 00000000..35298d45 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/unearthed/rhyolite.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Rhyolite" + }, + "block": "unearthed:rhyolite", + "ore_tags": [ + "forge:ores_in_ground/rhyolite" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/unearthed/schist.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/unearthed/schist.json new file mode 100644 index 00000000..3690dd60 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/unearthed/schist.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Schist" + }, + "block": "unearthed:schist", + "ore_tags": [ + "forge:ores_in_ground/schist" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/unearthed/siltstone.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/unearthed/siltstone.json new file mode 100644 index 00000000..ae36c090 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/unearthed/siltstone.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Siltstone" + }, + "block": "unearthed:siltstone", + "ore_tags": [ + "forge:ores_in_ground/siltstone" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/unearthed/slate.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/unearthed/slate.json new file mode 100644 index 00000000..6d0225cd --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/unearthed/slate.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Slate" + }, + "block": "unearthed:slate", + "ore_tags": [ + "forge:ores_in_ground/slate" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/unearthed/weathered_rhyolite.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/unearthed/weathered_rhyolite.json new file mode 100644 index 00000000..e53e54f4 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/unearthed/weathered_rhyolite.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Weathered Rhyolite" + }, + "block": "unearthed:weathered_rhyolite", + "ore_tags": [ + "forge:ores_in_ground/weathered_rhyolite" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/unearthed/white_granite.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/unearthed/white_granite.json new file mode 100644 index 00000000..46b8de86 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/unearthed/white_granite.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "White Granite" + }, + "block": "unearthed:white_granite", + "ore_tags": [ + "forge:ores_in_ground/white_granite" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/what_is_stone/anthracite.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/what_is_stone/anthracite.json new file mode 100644 index 00000000..a647889c --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/what_is_stone/anthracite.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Anthracite" + }, + "block": "what_is_stone:anthracite", + "ore_tags": [ + "forge:ores_in_ground/anthracite" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/what_is_stone/arkosic_sandstone.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/what_is_stone/arkosic_sandstone.json new file mode 100644 index 00000000..2e18ca77 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/what_is_stone/arkosic_sandstone.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Arkosic Sandstone" + }, + "block": "what_is_stone:arkosic_sandstone", + "ore_tags": [ + "forge:ores_in_ground/arkosic_sandstone" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/what_is_stone/black_marble.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/what_is_stone/black_marble.json new file mode 100644 index 00000000..fd084c57 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/what_is_stone/black_marble.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Black Marble" + }, + "block": "what_is_stone:black_marble", + "ore_tags": [ + "forge:ores_in_ground/black_marble" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/what_is_stone/breccia.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/what_is_stone/breccia.json new file mode 100644 index 00000000..b6dc45b1 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/what_is_stone/breccia.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Breccia" + }, + "block": "what_is_stone:breccia", + "ore_tags": [ + "forge:ores_in_ground/breccia" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/what_is_stone/conglomerate.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/what_is_stone/conglomerate.json new file mode 100644 index 00000000..b6d6d2eb --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/what_is_stone/conglomerate.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Conglomerate" + }, + "block": "what_is_stone:conglomerate", + "ore_tags": [ + "forge:ores_in_ground/conglomerate" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/what_is_stone/dacite.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/what_is_stone/dacite.json new file mode 100644 index 00000000..77f953ae --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/what_is_stone/dacite.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Dacite" + }, + "block": "what_is_stone:dacite", + "ore_tags": [ + "forge:ores_in_ground/dacite" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/what_is_stone/gabbro.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/what_is_stone/gabbro.json new file mode 100644 index 00000000..6a744792 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/what_is_stone/gabbro.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Gabbro" + }, + "block": "what_is_stone:gabbro", + "ore_tags": [ + "forge:ores_in_ground/gabbro" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/what_is_stone/gneiss.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/what_is_stone/gneiss.json new file mode 100644 index 00000000..7b4a7fff --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/what_is_stone/gneiss.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Gneiss" + }, + "block": "what_is_stone:gneiss", + "ore_tags": [ + "forge:ores_in_ground/gneiss" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/what_is_stone/grey_limestone.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/what_is_stone/grey_limestone.json new file mode 100644 index 00000000..ba277a60 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/what_is_stone/grey_limestone.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Gray Limestone" + }, + "block": "what_is_stone:grey_limestone", + "ore_tags": [ + "forge:ores_in_ground/grey_limestone" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/what_is_stone/limestone.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/what_is_stone/limestone.json new file mode 100644 index 00000000..21838f17 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/what_is_stone/limestone.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Beige Limestone" + }, + "block": "what_is_stone:limestone", + "ore_tags": [ + "forge:ores_in_ground/limestone" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/what_is_stone/marble.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/what_is_stone/marble.json new file mode 100644 index 00000000..f51add2b --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/what_is_stone/marble.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "White Marble" + }, + "block": "what_is_stone:marble", + "ore_tags": [ + "forge:ores_in_ground/marble" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/what_is_stone/mudstone.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/what_is_stone/mudstone.json new file mode 100644 index 00000000..18ab78c0 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/what_is_stone/mudstone.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Mudstone" + }, + "block": "what_is_stone:mudstone", + "ore_tags": [ + "forge:ores_in_ground/mudstone" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/what_is_stone/pegmatite.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/what_is_stone/pegmatite.json new file mode 100644 index 00000000..8a396fde --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/what_is_stone/pegmatite.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Pegmatite" + }, + "block": "what_is_stone:pegmatite", + "ore_tags": [ + "forge:ores_in_ground/pegmatite" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/what_is_stone/peridotite.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/what_is_stone/peridotite.json new file mode 100644 index 00000000..4477b1e2 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/what_is_stone/peridotite.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Peridotite" + }, + "block": "what_is_stone:peridotite", + "ore_tags": [ + "forge:ores_in_ground/peridotite" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/what_is_stone/pumice.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/what_is_stone/pumice.json new file mode 100644 index 00000000..b910f190 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/what_is_stone/pumice.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Pumice" + }, + "block": "what_is_stone:pumice", + "ore_tags": [ + "forge:ores_in_ground/pumice" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/what_is_stone/rhyolite.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/what_is_stone/rhyolite.json new file mode 100644 index 00000000..9e495f4e --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/what_is_stone/rhyolite.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Rhyolite" + }, + "block": "what_is_stone:rhyolite", + "ore_tags": [ + "forge:ores_in_ground/rhyolite" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/what_is_stone/schist.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/what_is_stone/schist.json new file mode 100644 index 00000000..960481f1 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/what_is_stone/schist.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Schist" + }, + "block": "what_is_stone:schist", + "ore_tags": [ + "forge:ores_in_ground/schist" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/what_is_stone/scoria.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/what_is_stone/scoria.json new file mode 100644 index 00000000..d6285ea4 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/what_is_stone/scoria.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Scoria" + }, + "block": "what_is_stone:scoria", + "ore_tags": [ + "forge:ores_in_ground/scoria" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/what_is_stone/serpentinite.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/what_is_stone/serpentinite.json new file mode 100644 index 00000000..8b72f6c7 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/what_is_stone/serpentinite.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Serpentinite" + }, + "block": "what_is_stone:serpentinite", + "ore_tags": [ + "forge:ores_in_ground/serpentinite" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/what_is_stone/shale.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/what_is_stone/shale.json new file mode 100644 index 00000000..b2c2c260 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/what_is_stone/shale.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Shale" + }, + "block": "what_is_stone:shale", + "ore_tags": [ + "forge:ores_in_ground/shale" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/what_is_stone/slate.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/what_is_stone/slate.json new file mode 100644 index 00000000..5e78a1e9 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/what_is_stone/slate.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Slate" + }, + "block": "what_is_stone:slate", + "ore_tags": [ + "forge:ores_in_ground/slate" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/what_is_stone/soapstone.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/what_is_stone/soapstone.json new file mode 100644 index 00000000..df644209 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/what_is_stone/soapstone.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "Soapstone" + }, + "block": "what_is_stone:soapstone", + "ore_tags": [ + "forge:ores_in_ground/soapstone" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/what_is_stone/white_granite.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/what_is_stone/white_granite.json new file mode 100644 index 00000000..0ab29daa --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/what_is_stone/white_granite.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "White Granite" + }, + "block": "what_is_stone:white_granite", + "ore_tags": [ + "forge:ores_in_ground/white_granite" + ] +} \ No newline at end of file diff --git a/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/what_is_stone/white_limestone.json b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/what_is_stone/white_limestone.json new file mode 100644 index 00000000..1ed7d018 --- /dev/null +++ b/src/main/resources/defaultresources/globaldata/excavated_variants/excavated_variants/stone/what_is_stone/white_limestone.json @@ -0,0 +1,12 @@ +{ + "types": [ + "excavated_variants:overworld" + ], + "translations": { + "en_us": "White Limestone" + }, + "block": "what_is_stone:white_limestone", + "ore_tags": [ + "forge:ores_in_ground/white_limestone" + ] +} \ No newline at end of file diff --git a/src/main/resources/mixin.excavated_variants.json b/src/main/resources/mixin.excavated_variants.json new file mode 100644 index 00000000..249d6fba --- /dev/null +++ b/src/main/resources/mixin.excavated_variants.json @@ -0,0 +1,21 @@ +{ + "required": true, + "minVersion": "0.8", + "package": "dev.lukebemish.excavatedvariants.impl.mixin", + "compatibilityLevel": "JAVA_17", + "mixins": [ + "BlockMixin", + "CreativeModeTabMixin", + "BlockPropertiesMixin", + "BuiltInRegistriesMixin", + "MappedRegistryMixin", + "MappedRegistryAccessor", + "BlockBehaviorAccessor", + "TieredItemMixin" + ], + "client": [], + "server": [], + "injectors": { + "defaultRequire": 1 + } +} \ No newline at end of file diff --git a/src/main/resources/mods.groovy b/src/main/resources/mods.groovy new file mode 100644 index 00000000..5a94b229 --- /dev/null +++ b/src/main/resources/mods.groovy @@ -0,0 +1,70 @@ +MultiplatformModsDotGroovy.make { + modLoader = 'javafml' + loaderVersion = '[1,)' + + license = 'LGPL-3.0-or-later' + issueTrackerUrl = 'https://github.com/lukebemishprojects/ExcavatedVariants/issues' + + mod { + modId = buildProperties.mod_id + displayName = buildProperties.mod_name + version = environmentInfo.version + displayUrl = 'https://github.com/lukebemishprojects/ExcavatedVariants' + description = 'Adds data-defined ore variants for stone/ore combinations missing them' + author = buildProperties.mod_author + + dependencies { + mod('minecraft') { + versionRange = ">=${libs.versions.minecraft}" + } + + onNeoForge { + mod('neoforge') { + versionRange = ">=${libs.versions.neoforge}" + } + } + + onFabric { + mod('fabricloader') { + versionRange = ">=${libs.versions.fabric_loader}" + } + mod('fabric-api') { + versionRange = ">=${libs.versions.fabric_api.split(/\+/)[0]}" + } + } + + mod('dynamic_asset_generator') { + versionRange = ">=${libs.versions.dynassetgen}" + } + mod('defaultresources') { + versionRange = ">=${libs.versions.defaultresources}" + } + } + + entrypoints { + entrypoint 'main', 'dev.lukebemish.excavatedvariants.impl.fabriquilt.fabric.ExcavatedVariantsFabric' + entrypoint 'main', 'dev.lukebemish.excavatedvariants.impl.fabriquilt.StateCapturer' + entrypoint 'client', 'dev.lukebemish.excavatedvariants.impl.fabriquilt.ExcavatedVariantsClientFabriQuilt' + } + } + onNeoForge { + mixins { + mixin { + config = 'mixin.excavated_variants.json' + } + mixin { + config = 'mixin.excavated_variants_neoforge.json' + } + } + } + onFabric { + mixins { + mixin { + config = 'mixin.excavated_variants.json' + } + mixin { + config = 'mixin.excavated_variants_fabriquilt.json' + } + } + } +} diff --git a/src/neoforge/java/dev/lukebemish/excavatedvariants/impl/neoforge/AddFeatureLateModifier.java b/src/neoforge/java/dev/lukebemish/excavatedvariants/impl/neoforge/AddFeatureLateModifier.java new file mode 100644 index 00000000..2803adf1 --- /dev/null +++ b/src/neoforge/java/dev/lukebemish/excavatedvariants/impl/neoforge/AddFeatureLateModifier.java @@ -0,0 +1,26 @@ +package dev.lukebemish.excavatedvariants.impl.neoforge; + +import com.mojang.serialization.MapCodec; +import net.minecraft.core.Holder; +import net.minecraft.core.HolderSet; +import net.minecraft.world.level.biome.Biome; +import net.minecraft.world.level.levelgen.GenerationStep; +import net.minecraft.world.level.levelgen.placement.PlacedFeature; +import net.neoforged.neoforge.common.world.BiomeModifier; +import net.neoforged.neoforge.common.world.ModifiableBiomeInfo; + +public record AddFeatureLateModifier(HolderSet feature) implements BiomeModifier { + + @Override + public void modify(Holder biome, Phase phase, ModifiableBiomeInfo.BiomeInfo.Builder builder) { + if (phase == Phase.AFTER_EVERYTHING) { + feature.forEach(holder -> + builder.getGenerationSettings().addFeature(GenerationStep.Decoration.TOP_LAYER_MODIFICATION, holder)); + } + } + + @Override + public MapCodec codec() { + return ExcavatedVariantsNeoForge.ADD_FEATURE_LATE_MODIFIER.value(); + } +} diff --git a/src/neoforge/java/dev/lukebemish/excavatedvariants/impl/neoforge/CreativeTabLoaderImpl.java b/src/neoforge/java/dev/lukebemish/excavatedvariants/impl/neoforge/CreativeTabLoaderImpl.java new file mode 100644 index 00000000..cd49c95e --- /dev/null +++ b/src/neoforge/java/dev/lukebemish/excavatedvariants/impl/neoforge/CreativeTabLoaderImpl.java @@ -0,0 +1,42 @@ +package dev.lukebemish.excavatedvariants.impl.neoforge; + +import com.google.auto.service.AutoService; +import dev.lukebemish.excavatedvariants.impl.ExcavatedVariants; +import dev.lukebemish.excavatedvariants.impl.platform.services.CreativeTabLoader; +import net.minecraft.core.registries.BuiltInRegistries; +import net.minecraft.network.chat.Component; +import net.minecraft.world.item.CreativeModeTab; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Items; + +import java.util.Objects; + +@SuppressWarnings("unused") +@AutoService(CreativeTabLoader.class) +public class CreativeTabLoaderImpl implements CreativeTabLoader { + + private static void setup(CreativeModeTab.Builder builder) { + builder + .title(Component.translatable("itemGroup."+CREATIVE_TAB_ID.getNamespace()+"."+CREATIVE_TAB_ID.getPath())) + .icon(() -> new ItemStack(Items.DEEPSLATE_COPPER_ORE)) + .displayItems((displayParameters, output) -> { + for (var supplier : ExcavatedVariants.ITEMS) { + output.accept(supplier.get()); + } + }); + } + + @Override + public void registerCreativeTab() { + ExcavatedVariantsNeoForge.CREATIVE_TABS.register(CREATIVE_TAB_ID.getPath(), () -> { + var builder = CreativeModeTab.builder(); + setup(builder); + return builder.build(); + }); + } + + @Override + public CreativeModeTab getCreativeTab() { + return Objects.requireNonNull(BuiltInRegistries.CREATIVE_MODE_TAB.get(CREATIVE_TAB_ID)); + } +} diff --git a/src/neoforge/java/dev/lukebemish/excavatedvariants/impl/neoforge/EventHandler.java b/src/neoforge/java/dev/lukebemish/excavatedvariants/impl/neoforge/EventHandler.java new file mode 100644 index 00000000..355dea53 --- /dev/null +++ b/src/neoforge/java/dev/lukebemish/excavatedvariants/impl/neoforge/EventHandler.java @@ -0,0 +1,42 @@ +package dev.lukebemish.excavatedvariants.impl.neoforge; + + +import dev.lukebemish.excavatedvariants.impl.worldgen.OreFinderUtil; +import net.neoforged.bus.api.EventPriority; +import net.neoforged.bus.api.SubscribeEvent; +import net.neoforged.neoforge.event.server.ServerAboutToStartEvent; + +public class EventHandler { + @SubscribeEvent(priority = EventPriority.LOWEST) + public static void onServerStarting(ServerAboutToStartEvent event) { + //Ore Gen + OreFinderUtil.setupBlocks(); + } + + // Look into alternatives in the future + /* + @SubscribeEvent + public static void mapMissingVariants(MissingMappingsEvent missingMappingsEvent) { + missingMappingsEvent.getAllMappings(ForgeRegistries.Keys.ITEMS).forEach(EventHandler::remap); + missingMappingsEvent.getAllMappings(ForgeRegistries.Keys.BLOCKS).forEach(EventHandler::remap); + } + + + private static void remap(MissingMappingsEvent.Mapping mapping) { + if (mapping.getKey().getNamespace().equals(ExcavatedVariants.MOD_ID)) { + List locations = ExcavatedVariants.MAPPINGS_CACHE.get(mapping.getKey().getPath()); + T target = null; + for (ResourceLocation location : locations) { + T value = mapping.getRegistry().getValue(location); + if (value != null) { + target = value; + break; + } + } + if (target != null) { + mapping.remap(target); + } + } + } + */ +} diff --git a/src/neoforge/java/dev/lukebemish/excavatedvariants/impl/neoforge/ExcavatedVariantsNeoForge.java b/src/neoforge/java/dev/lukebemish/excavatedvariants/impl/neoforge/ExcavatedVariantsNeoForge.java new file mode 100644 index 00000000..5004991b --- /dev/null +++ b/src/neoforge/java/dev/lukebemish/excavatedvariants/impl/neoforge/ExcavatedVariantsNeoForge.java @@ -0,0 +1,128 @@ +package dev.lukebemish.excavatedvariants.impl.neoforge; + +import com.mojang.serialization.MapCodec; +import com.mojang.serialization.codecs.RecordCodecBuilder; +import dev.lukebemish.excavatedvariants.impl.BlockAddedCallback; +import dev.lukebemish.excavatedvariants.impl.ExcavatedVariants; +import dev.lukebemish.excavatedvariants.impl.ExcavatedVariantsClient; +import dev.lukebemish.excavatedvariants.impl.RegistriesImpl; +import dev.lukebemish.excavatedvariants.impl.network.AckOresPayload; +import dev.lukebemish.excavatedvariants.impl.network.SyncOresPayload; +import dev.lukebemish.excavatedvariants.impl.worldgen.OreReplacer; +import net.minecraft.core.Holder; +import net.minecraft.core.registries.BuiltInRegistries; +import net.minecraft.core.registries.Registries; +import net.minecraft.network.chat.Component; +import net.minecraft.network.protocol.common.custom.CustomPacketPayload; +import net.minecraft.world.item.CreativeModeTab; +import net.minecraft.world.item.Item; +import net.minecraft.world.level.levelgen.feature.Feature; +import net.minecraft.world.level.levelgen.placement.PlacedFeature; +import net.neoforged.api.distmarker.Dist; +import net.neoforged.bus.api.IEventBus; +import net.neoforged.fml.common.Mod; +import net.neoforged.fml.event.lifecycle.FMLCommonSetupEvent; +import net.neoforged.fml.loading.FMLLoader; +import net.neoforged.neoforge.common.NeoForge; +import net.neoforged.neoforge.common.world.BiomeModifier; +import net.neoforged.neoforge.network.configuration.ICustomConfigurationTask; +import net.neoforged.neoforge.network.event.RegisterConfigurationTasksEvent; +import net.neoforged.neoforge.network.event.RegisterPayloadHandlersEvent; +import net.neoforged.neoforge.network.handling.IPayloadContext; +import net.neoforged.neoforge.registries.DeferredRegister; +import net.neoforged.neoforge.registries.NeoForgeRegistries; +import net.neoforged.neoforge.registries.RegisterEvent; +import org.apache.commons.lang3.mutable.MutableBoolean; + +import java.util.function.Consumer; +import java.util.stream.Collectors; + +@Mod(ExcavatedVariants.MOD_ID) +public class ExcavatedVariantsNeoForge { + public static final DeferredRegister TO_REGISTER = DeferredRegister.create(Registries.ITEM, ExcavatedVariants.MOD_ID); + public static final DeferredRegister> FEATURES = DeferredRegister.create(Registries.FEATURE, ExcavatedVariants.MOD_ID); + public static final DeferredRegister CREATIVE_TABS = DeferredRegister.create(Registries.CREATIVE_MODE_TAB, ExcavatedVariants.MOD_ID); + public static final DeferredRegister> BIOME_MODIFIERS = DeferredRegister.create(NeoForgeRegistries.Keys.BIOME_MODIFIER_SERIALIZERS, ExcavatedVariants.MOD_ID); + public static final Holder> ADD_FEATURE_LATE_MODIFIER = BIOME_MODIFIERS.register("add_feature_late", () -> + RecordCodecBuilder.mapCodec(i -> i.group( + PlacedFeature.LIST_CODEC.fieldOf("features").forGetter(AddFeatureLateModifier::feature) + ).apply(i, AddFeatureLateModifier::new)) + ); + + public ExcavatedVariantsNeoForge(IEventBus modbus) { + ExcavatedVariants.init(); + if (FMLLoader.getDist() == Dist.CLIENT) { + ExcavatedVariantsClient.init(); + } + modbus.addListener(FMLCommonSetupEvent.class, ExcavatedVariantsNeoForge::commonSetup); + modbus.addListener(RegisterEvent.class, ExcavatedVariantsNeoForge::registerListener); + modbus.addListener(RegisterPayloadHandlersEvent.class, ExcavatedVariantsNeoForge::onRegisterPayloads); + modbus.addListener(ExcavatedVariantsNeoForge::onCollectConfigTasks); + TO_REGISTER.register(modbus); + BIOME_MODIFIERS.register(modbus); + FEATURES.register(modbus); + CREATIVE_TABS.register(modbus); + modbus.addListener(FMLCommonSetupEvent.class, e -> { + //no more race conditions... thanks FML + e.enqueueWork(() -> NeoForge.EVENT_BUS.register(EventHandler.class)); + }); + //ModList.get().getModContainerById("hyle").ifPresent(container -> MinecraftForge.EVENT_BUS.register(new HyleCompat())); + + FEATURES.register("ore_replacer", OreReplacer::new); + } + + public static void commonSetup(FMLCommonSetupEvent event) { + event.enqueueWork(RegistriesImpl::registerRegistries); + } + + public static void registerListener(RegisterEvent event) { + event.register(Registries.BLOCK, helper -> { + BuiltInRegistries.BLOCK.holders().forEach(reference -> + BlockAddedCallback.onRegister(reference.value(), reference.key())); + BlockAddedCallback.setReady(); + BlockAddedCallback.register(); + }); + event.register(Registries.ITEM, helper -> + ExcavatedVariants.initPostRegister()); + } + + private static final String NEtWORK_VERSION = "1"; + + public static void onRegisterPayloads(final RegisterPayloadHandlersEvent event) { + event.registrar(NEtWORK_VERSION) + .configurationToClient(SyncOresPayload.TYPE, SyncOresPayload.CODEC, OresConfigTask::handleSync) + .configurationToServer(AckOresPayload.TYPE, AckOresPayload.CODEC, (payload, ctx) -> ctx.finishCurrentTask(OresConfigTask.TYPE)); + } + + private static final class OresConfigTask implements ICustomConfigurationTask { + public static final Type TYPE = new Type(ExcavatedVariants.id("ores")); + @Override + public void run(Consumer sender) { + var payload = new SyncOresPayload(ExcavatedVariants.COMPLETE_VARIANTS.stream().map(v -> v.fullId).collect(Collectors.toSet())); + sender.accept(payload); + } + + @Override + public Type type() { + return TYPE; + } + + public static void handleSync(SyncOresPayload payload, IPayloadContext ctx) { + MutableBoolean disconnect = new MutableBoolean(false); + payload.consumeMessage(string -> { + disconnect.setTrue(); + ctx.disconnect(Component.literal(string)); + }); + + if (!disconnect.isTrue()) { + ctx.reply(new AckOresPayload()); + } + } + } + + public static void onCollectConfigTasks(final RegisterConfigurationTasksEvent event) { + if (!event.getListener().getConnection().isMemoryConnection()) { + event.register(new OresConfigTask()); + } + } +} diff --git a/src/neoforge/java/dev/lukebemish/excavatedvariants/impl/neoforge/PlatformImpl.java b/src/neoforge/java/dev/lukebemish/excavatedvariants/impl/neoforge/PlatformImpl.java new file mode 100644 index 00000000..9dc8f436 --- /dev/null +++ b/src/neoforge/java/dev/lukebemish/excavatedvariants/impl/neoforge/PlatformImpl.java @@ -0,0 +1,53 @@ +package dev.lukebemish.excavatedvariants.impl.neoforge; + +import com.google.auto.service.AutoService; +import com.google.common.base.Suppliers; +import dev.lukebemish.excavatedvariants.impl.ExcavatedVariants; +import dev.lukebemish.excavatedvariants.impl.platform.services.Platform; +import net.minecraft.core.Registry; +import net.minecraft.core.registries.BuiltInRegistries; +import net.neoforged.api.distmarker.Dist; +import net.neoforged.fml.ModList; +import net.neoforged.fml.loading.FMLLoader; +import net.neoforged.fml.loading.FMLPaths; +import net.neoforged.neoforgespi.language.IModInfo; + +import java.nio.file.Path; +import java.util.Set; +import java.util.function.Supplier; + +@AutoService(Platform.class) +public class PlatformImpl implements Platform { + private static final String MOD_VERSION = ModList.get().getModFileById(ExcavatedVariants.MOD_ID).versionString(); + + @Override + public Path getConfigFolder() { + return FMLPaths.CONFIGDIR.get(); + } + @Override + public Path getModDataFolder() { + return FMLPaths.GAMEDIR.get().resolve(".cache").resolve(ExcavatedVariants.MOD_ID); + } + + @Override + public String getModVersion() { + return MOD_VERSION; + } + + @Override + public boolean isClient() { + return FMLLoader.getDist() == Dist.CLIENT; + } + + private static final Supplier> MOD_IDS = Suppliers.memoize(() -> Set.copyOf(ModList.get().getMods().stream().map(IModInfo::getModId).toList())); + @Override + public Set getModIds() { + return MOD_IDS.get(); + } + + public void register(ExcavatedVariants.VariantFuture future) { + ExcavatedVariants.registerBlockAndItem((rlr, bl) -> { + Registry.register(BuiltInRegistries.BLOCK, rlr, bl); + }, (rlr, it) -> ExcavatedVariantsNeoForge.TO_REGISTER.register(rlr.getPath(), it), future); + } +} diff --git a/src/neoforge/java/dev/lukebemish/excavatedvariants/impl/neoforge/client/RenderTypeHandlerImpl.java b/src/neoforge/java/dev/lukebemish/excavatedvariants/impl/neoforge/client/RenderTypeHandlerImpl.java new file mode 100644 index 00000000..80f0d04c --- /dev/null +++ b/src/neoforge/java/dev/lukebemish/excavatedvariants/impl/neoforge/client/RenderTypeHandlerImpl.java @@ -0,0 +1,11 @@ +package dev.lukebemish.excavatedvariants.impl.neoforge.client; + +import com.google.auto.service.AutoService; +import dev.lukebemish.excavatedvariants.impl.client.RenderTypeHandler; +import net.minecraft.world.level.block.Block; + +@AutoService(RenderTypeHandler.class) +public class RenderTypeHandlerImpl implements RenderTypeHandler { + public void setRenderTypeMipped(Block block) { + } +} diff --git a/src/neoforge/java/dev/lukebemish/excavatedvariants/impl/neoforge/client/package-info.java b/src/neoforge/java/dev/lukebemish/excavatedvariants/impl/neoforge/client/package-info.java new file mode 100644 index 00000000..cd0f641e --- /dev/null +++ b/src/neoforge/java/dev/lukebemish/excavatedvariants/impl/neoforge/client/package-info.java @@ -0,0 +1,6 @@ +@NullMarked +@ApiStatus.Internal +package dev.lukebemish.excavatedvariants.impl.neoforge.client; + +import org.jetbrains.annotations.ApiStatus; +import org.jspecify.annotations.NullMarked; \ No newline at end of file diff --git a/src/neoforge/java/dev/lukebemish/excavatedvariants/impl/neoforge/compat/HyleCompat.java.disabled b/src/neoforge/java/dev/lukebemish/excavatedvariants/impl/neoforge/compat/HyleCompat.java.disabled new file mode 100644 index 00000000..bef51a78 --- /dev/null +++ b/src/neoforge/java/dev/lukebemish/excavatedvariants/impl/neoforge/compat/HyleCompat.java.disabled @@ -0,0 +1,38 @@ +package dev.lukebemish.excavatedvariants.impl.neoforge.compat; + +import dev.lukebemish.excavatedvariants.impl.ExcavatedVariants; +import dev.lukebemish.excavatedvariants.impl.platform.Services; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.level.block.Block; +import net.minecraftforge.eventbus.api.SubscribeEvent; + +import java.util.IdentityHashMap; + +public class HyleCompat { + private Map>> excavatedVariantsOres; + + @SubscribeEvent + public void onStoneTypeEvent(StoneTypeEvent event) { + if (excavatedVariantsOres == null) { + excavatedVariantsOres = new IdentityHashMap<>(); + for (Pair> p : ExcavatedVariants.oreStoneList) { + for (ResourceLocation block_id : p.getFirst().block_id) { + Block baseOreBlock = Services.REGISTRY_UTIL.getBlockById(block_id); + excavatedVariantsOres.put(baseOreBlock, p); + } + } + } + + IStoneType stoneType = event.getStoneType(); + Block baseBlock = stoneType.getBaseBlock().getBlock(); + excavatedVariantsOres.forEach((baseOreBlock, pair) -> { + HashSet stones = pair.getSecond(); + stones.stream().variantFilter(stone -> Services.REGISTRY_UTIL.getBlockById(stone.block_id) == baseBlock).findAny().ifPresent(stone -> { + Block oreBlock = Services.REGISTRY_UTIL.getBlockById(new ResourceLocation(ExcavatedVariants.MOD_ID, stone.id + "_" + pair.getFirst().id)); + if (oreBlock != null) { + stoneType.getOreMap().put(baseOreBlock, oreBlock.defaultBlockState()); + } + }); + }); + } +} diff --git a/src/neoforge/java/dev/lukebemish/excavatedvariants/impl/neoforge/compat/package-info.java b/src/neoforge/java/dev/lukebemish/excavatedvariants/impl/neoforge/compat/package-info.java new file mode 100644 index 00000000..e0219867 --- /dev/null +++ b/src/neoforge/java/dev/lukebemish/excavatedvariants/impl/neoforge/compat/package-info.java @@ -0,0 +1,6 @@ +@NullMarked +@ApiStatus.Internal +package dev.lukebemish.excavatedvariants.impl.neoforge.compat; + +import org.jetbrains.annotations.ApiStatus; +import org.jspecify.annotations.NullMarked; \ No newline at end of file diff --git a/src/neoforge/java/dev/lukebemish/excavatedvariants/impl/neoforge/mixin/ModifiedOreBlockMixin.java b/src/neoforge/java/dev/lukebemish/excavatedvariants/impl/neoforge/mixin/ModifiedOreBlockMixin.java new file mode 100644 index 00000000..23bdba8d --- /dev/null +++ b/src/neoforge/java/dev/lukebemish/excavatedvariants/impl/neoforge/mixin/ModifiedOreBlockMixin.java @@ -0,0 +1,40 @@ +package dev.lukebemish.excavatedvariants.impl.neoforge.mixin; + +import dev.lukebemish.excavatedvariants.impl.ModifiedOreBlock; +import net.minecraft.core.BlockPos; +import net.minecraft.util.RandomSource; +import net.minecraft.util.valueproviders.IntProvider; +import net.minecraft.world.level.LevelReader; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.DropExperienceBlock; +import net.minecraft.world.level.block.state.BlockState; +import net.neoforged.neoforge.common.extensions.IBlockExtension; +import org.jspecify.annotations.NonNull; +import org.spongepowered.asm.mixin.Final; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.Shadow; + +@Mixin(value = ModifiedOreBlock.class, remap = false) +public abstract class ModifiedOreBlockMixin extends DropExperienceBlock implements IBlockExtension { + @Shadow + @Final + protected Block target; + + @Shadow + @Final + protected boolean delegateSpecialDrops; + + public ModifiedOreBlockMixin(IntProvider arg, Properties pProperties) { + super(arg, pProperties); + throw new IllegalStateException(); + } + + @Override + public int getExpDrop(@NonNull BlockState state, @NonNull LevelReader level, @NonNull RandomSource randomSource, @NonNull BlockPos pos, int fortune, int silktouch) { + if (target != null && this.delegateSpecialDrops) { + return target.getExpDrop(target.defaultBlockState(), level, randomSource, pos, fortune, silktouch); + } else { + return super.getExpDrop(state, level, randomSource, pos, fortune, silktouch); + } + } +} diff --git a/src/neoforge/java/dev/lukebemish/excavatedvariants/impl/neoforge/mixin/package-info.java b/src/neoforge/java/dev/lukebemish/excavatedvariants/impl/neoforge/mixin/package-info.java new file mode 100644 index 00000000..005c2bf6 --- /dev/null +++ b/src/neoforge/java/dev/lukebemish/excavatedvariants/impl/neoforge/mixin/package-info.java @@ -0,0 +1,6 @@ +@NullMarked +@ApiStatus.Internal +package dev.lukebemish.excavatedvariants.impl.neoforge.mixin; + +import org.jetbrains.annotations.ApiStatus; +import org.jspecify.annotations.NullMarked; \ No newline at end of file diff --git a/src/neoforge/java/dev/lukebemish/excavatedvariants/impl/neoforge/package-info.java b/src/neoforge/java/dev/lukebemish/excavatedvariants/impl/neoforge/package-info.java new file mode 100644 index 00000000..9a940fa5 --- /dev/null +++ b/src/neoforge/java/dev/lukebemish/excavatedvariants/impl/neoforge/package-info.java @@ -0,0 +1,6 @@ +@NullMarked +@ApiStatus.Internal +package dev.lukebemish.excavatedvariants.impl.neoforge; + +import org.jetbrains.annotations.ApiStatus; +import org.jspecify.annotations.NullMarked; \ No newline at end of file diff --git a/src/neoforge/resources/data/excavated_variants/neoforge/biome_modifier/ore_replacer.json b/src/neoforge/resources/data/excavated_variants/neoforge/biome_modifier/ore_replacer.json new file mode 100644 index 00000000..ff565539 --- /dev/null +++ b/src/neoforge/resources/data/excavated_variants/neoforge/biome_modifier/ore_replacer.json @@ -0,0 +1,4 @@ +{ + "type": "excavated_variants:add_feature_late", + "features": "excavated_variants:ore_replacer" +} \ No newline at end of file diff --git a/src/neoforge/resources/mixin.excavated_variants_neoforge.json b/src/neoforge/resources/mixin.excavated_variants_neoforge.json new file mode 100644 index 00000000..c9a49cf3 --- /dev/null +++ b/src/neoforge/resources/mixin.excavated_variants_neoforge.json @@ -0,0 +1,14 @@ +{ + "required": true, + "minVersion": "0.8", + "package": "dev.lukebemish.excavatedvariants.impl.neoforge.mixin", + "compatibilityLevel": "JAVA_17", + "mixins": [ + "ModifiedOreBlockMixin" + ], + "client": [], + "server": [], + "injectors": { + "defaultRequire": 1 + } +} \ No newline at end of file diff --git a/src/neoforge/resources/pack.mcmeta b/src/neoforge/resources/pack.mcmeta new file mode 100644 index 00000000..789816e1 --- /dev/null +++ b/src/neoforge/resources/pack.mcmeta @@ -0,0 +1,8 @@ +{ + "pack": { + "description": "Excavated Variants", + "pack_format": 15, + "forge:data_pack_format": 15, + "forge:resource_pack_format": 15 + } +}