From 05c52f0510343fa776b891a9c4930bd5a47e895e Mon Sep 17 00:00:00 2001 From: mrsterner Date: Sat, 28 Oct 2023 22:16:01 +0200 Subject: [PATCH] clean up imports --- src/main/java/com/sammy/malum/MalumMod.java | 23 -------- .../WeaversWorkbenchContainerScreen.java | 10 +--- .../block/nature/MalumSaplingBlock.java | 9 ++- .../curiosities/curios/MalumCurioItem.java | 1 - .../common/worldgen/WeepingWellStructure.java | 11 ++-- .../com/sammy/malum/config/CommonConfig.java | 3 - .../malum/core/events/WorldgenEvents.java | 58 ------------------- .../com/sammy/malum/data/DataGenerators.java | 9 --- .../com/sammy/malum/data/MalumBiomeTags.java | 2 - .../java/com/sammy/malum/data/MalumLang.java | 1 - .../com/sammy/malum/data/MalumRecipes.java | 10 ++-- .../malum/data/RegistryDataGenerator.java | 15 ----- .../data/block/MalumBlockLootTables.java | 6 +- .../MalumVanillaRecipeReplacements.java | 1 - .../StackedMalumCookingRecipeBuilder.java | 2 - .../com/sammy/malum/mixin/ExplosionMixin.java | 4 +- .../malum/registry/client/ShaderRegistry.java | 3 - .../registry/common/block/BlockRegistry.java | 1 - .../common/block/WoodTypeRegistry.java | 2 - .../common/entity/EntityRegistry.java | 1 - .../worldgen/ConfiguredFeatureRegistry.java | 13 ++--- .../common/worldgen/FeatureRegistry.java | 26 --------- .../worldgen/PlacedFeatureRegistry.java | 12 +--- .../common/worldgen/StructureRegistry.java | 2 +- 24 files changed, 30 insertions(+), 195 deletions(-) delete mode 100644 src/main/java/com/sammy/malum/core/events/WorldgenEvents.java diff --git a/src/main/java/com/sammy/malum/MalumMod.java b/src/main/java/com/sammy/malum/MalumMod.java index 55fcca08c..684b48851 100644 --- a/src/main/java/com/sammy/malum/MalumMod.java +++ b/src/main/java/com/sammy/malum/MalumMod.java @@ -4,28 +4,10 @@ import com.sammy.malum.compability.farmersdelight.FarmersDelightCompat; import com.sammy.malum.config.ClientConfig; import com.sammy.malum.config.CommonConfig; -import com.sammy.malum.data.MalumBiomeTags; -import com.sammy.malum.data.MalumLang; -import com.sammy.malum.data.RegistryDataGenerator; -import com.sammy.malum.data.block.MalumBlockLootTables; -import com.sammy.malum.data.block.MalumBlockStates; -import com.sammy.malum.data.block.MalumBlockTags; -import com.sammy.malum.data.item.MalumItemModels; import com.sammy.malum.registry.common.item.tabs.CreativeTabRegistry; -import net.minecraft.DetectedVersion; -import net.minecraft.core.HolderLookup; -import net.minecraft.data.DataGenerator; -import net.minecraft.data.PackOutput; -import net.minecraft.data.metadata.PackMetadataGenerator; -import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; -import net.minecraft.server.packs.PackType; -import net.minecraft.server.packs.metadata.pack.PackMetadataSection; import net.minecraft.util.RandomSource; -import net.minecraftforge.common.data.ExistingFileHelper; -import net.minecraftforge.data.event.GatherDataEvent; import net.minecraftforge.eventbus.api.IEventBus; -import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.ModLoadingContext; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.config.ModConfig; @@ -33,11 +15,6 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import java.util.Arrays; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; -import java.util.stream.Collectors; - import static com.sammy.malum.registry.client.ParticleRegistry.PARTICLES; import static com.sammy.malum.registry.common.AttributeRegistry.ATTRIBUTES; import static com.sammy.malum.registry.common.ContainerRegistry.CONTAINERS; diff --git a/src/main/java/com/sammy/malum/client/screen/container/WeaversWorkbenchContainerScreen.java b/src/main/java/com/sammy/malum/client/screen/container/WeaversWorkbenchContainerScreen.java index e276fda61..ab29cd7cb 100644 --- a/src/main/java/com/sammy/malum/client/screen/container/WeaversWorkbenchContainerScreen.java +++ b/src/main/java/com/sammy/malum/client/screen/container/WeaversWorkbenchContainerScreen.java @@ -1,36 +1,28 @@ package com.sammy.malum.client.screen.container; -import com.mojang.blaze3d.platform.Lighting; import com.mojang.blaze3d.systems.RenderSystem; -import com.mojang.blaze3d.vertex.PoseStack; import com.sammy.malum.MalumMod; import com.sammy.malum.common.container.WeaversWorkbenchContainer; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.gui.screens.inventory.AbstractContainerScreen; import net.minecraft.client.gui.screens.inventory.InventoryScreen; -import net.minecraft.client.gui.screens.inventory.SmithingScreen; import net.minecraft.client.renderer.GameRenderer; -import net.minecraft.client.renderer.MultiBufferSource; -import net.minecraft.client.renderer.entity.EntityRenderDispatcher; import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.EquipmentSlot; -import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.decoration.ArmorStand; import net.minecraft.world.entity.player.Inventory; import net.minecraft.world.item.ArmorItem; import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; -import org.joml.Matrix4f; import org.joml.Quaternionf; import javax.annotation.Nonnull; -import javax.annotation.Nullable; public class WeaversWorkbenchContainerScreen extends AbstractContainerScreen { - public static final Quaternionf ROTATION = (new Quaternionf()).rotationXYZ(0.43633232F, 0.0F, (float)Math.PI); + public static final Quaternionf ROTATION = (new Quaternionf()).rotationXYZ(0.43633232F, 0.0F, (float) Math.PI); private static final ResourceLocation TEXTURE = MalumMod.malumPath("textures/gui/weavers_workbench.png"); private final WeaversWorkbenchContainer weaversWorkbenchContainer; diff --git a/src/main/java/com/sammy/malum/common/block/nature/MalumSaplingBlock.java b/src/main/java/com/sammy/malum/common/block/nature/MalumSaplingBlock.java index 3792120dc..a3635aa87 100644 --- a/src/main/java/com/sammy/malum/common/block/nature/MalumSaplingBlock.java +++ b/src/main/java/com/sammy/malum/common/block/nature/MalumSaplingBlock.java @@ -2,7 +2,6 @@ import com.sammy.malum.registry.common.block.BlockTagRegistry; import com.sammy.malum.registry.common.worldgen.ConfiguredFeatureRegistry; -import com.sammy.malum.registry.common.worldgen.FeatureRegistry; import net.minecraft.core.BlockPos; import net.minecraft.core.Holder; import net.minecraft.core.registries.Registries; @@ -41,10 +40,10 @@ public void advanceTree(ServerLevel level, BlockPos pos, BlockState state, Rando if (state.getValue(STAGE) == 0) { level.setBlock(pos, state.cycle(STAGE), 4); } else { - Holder> holder = level.registryAccess().registryOrThrow(Registries.CONFIGURED_FEATURE).getHolder(ConfiguredFeatureRegistry.CONFIGURED_RUNEWOOD_TREE).orElse(null); - if (!ForgeEventFactory.blockGrowFeature(level, rand, pos, holder).getResult().equals(Event.Result.DENY)) { - return; - } + Holder> holder = level.registryAccess().registryOrThrow(Registries.CONFIGURED_FEATURE).getHolder(ConfiguredFeatureRegistry.CONFIGURED_RUNEWOOD_TREE).orElse(null); + if (!ForgeEventFactory.blockGrowFeature(level, rand, pos, holder).getResult().equals(Event.Result.DENY)) { + return; + } tree.get().place(NoneFeatureConfiguration.INSTANCE, level, level.getChunkSource().getGenerator(), rand, pos); } } diff --git a/src/main/java/com/sammy/malum/common/item/curiosities/curios/MalumCurioItem.java b/src/main/java/com/sammy/malum/common/item/curiosities/curios/MalumCurioItem.java index cea200798..58732c4a2 100644 --- a/src/main/java/com/sammy/malum/common/item/curiosities/curios/MalumCurioItem.java +++ b/src/main/java/com/sammy/malum/common/item/curiosities/curios/MalumCurioItem.java @@ -6,7 +6,6 @@ import net.minecraft.Util; import net.minecraft.sounds.SoundEvent; import net.minecraft.sounds.SoundSource; -import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.ai.attributes.Attribute; import net.minecraft.world.entity.ai.attributes.AttributeModifier; import net.minecraft.world.item.Item; diff --git a/src/main/java/com/sammy/malum/common/worldgen/WeepingWellStructure.java b/src/main/java/com/sammy/malum/common/worldgen/WeepingWellStructure.java index 19b8c40f5..6d1962947 100644 --- a/src/main/java/com/sammy/malum/common/worldgen/WeepingWellStructure.java +++ b/src/main/java/com/sammy/malum/common/worldgen/WeepingWellStructure.java @@ -11,7 +11,6 @@ import net.minecraft.world.level.levelgen.structure.StructureType; import net.minecraft.world.level.levelgen.structure.pools.JigsawPlacement; import net.minecraft.world.level.levelgen.structure.pools.StructureTemplatePool; -import org.intellij.lang.annotations.Identifier; import java.util.ArrayList; import java.util.List; @@ -60,22 +59,22 @@ protected Optional findGenerationPoint(GenerationContext pContex public boolean isSufficientlyFlat(GenerationContext context, BlockPos origin, int check) { List blockPosList = new ArrayList<>(); - for(int x = -check; x < check; x++){ - for(int z = -check; z < check; z++){ + for (int x = -check; x < check; x++) { + for (int z = -check; z < check; z++) { blockPosList.add(origin.offset(x, 0, z)); } } int count = 0; - for(BlockPos pos : blockPosList){ + for (BlockPos pos : blockPosList) { NoiseColumn blockView = context.chunkGenerator().getBaseColumn(pos.getX(), pos.getZ(), context.heightAccessor(), context.randomState()); - if(blockView.getBlock(pos.getY()).isAir() && !blockView.getBlock(pos.below().getY()).isAir()){ + if (blockView.getBlock(pos.getY()).isAir() && !blockView.getBlock(pos.below().getY()).isAir()) { count++; } } return count >= check * check * 2; } - public int getValidY(NoiseColumn sample){ + public int getValidY(NoiseColumn sample) { int maxLength = 0; int currentLength = 0; int maxIndex = min - 1; diff --git a/src/main/java/com/sammy/malum/config/CommonConfig.java b/src/main/java/com/sammy/malum/config/CommonConfig.java index 0cb50b46b..e1bfad681 100644 --- a/src/main/java/com/sammy/malum/config/CommonConfig.java +++ b/src/main/java/com/sammy/malum/config/CommonConfig.java @@ -4,9 +4,6 @@ import org.apache.commons.lang3.tuple.Pair; import team.lodestar.lodestone.systems.config.LodestoneConfig; -import java.util.ArrayList; -import java.util.List; - import static com.sammy.malum.MalumMod.MALUM; public class CommonConfig extends LodestoneConfig { diff --git a/src/main/java/com/sammy/malum/core/events/WorldgenEvents.java b/src/main/java/com/sammy/malum/core/events/WorldgenEvents.java deleted file mode 100644 index cfa59ca9d..000000000 --- a/src/main/java/com/sammy/malum/core/events/WorldgenEvents.java +++ /dev/null @@ -1,58 +0,0 @@ -package com.sammy.malum.core.events; - -import com.sammy.malum.config.CommonConfig; -import com.sammy.malum.registry.common.worldgen.FeatureRegistry; -import net.minecraft.world.level.biome.Biome; -import net.minecraft.world.level.levelgen.GenerationStep; -import net.minecraftforge.eventbus.api.SubscribeEvent; -import net.minecraftforge.fml.common.Mod; - -@Mod.EventBusSubscriber -public class WorldgenEvents { -/* - @SubscribeEvent - public static void addFeatures(BiomeLoadingEvent event) { - if (event.getCategory().equals(Biome.BiomeCategory.PLAINS) || event.getCategory().equals(Biome.BiomeCategory.EXTREME_HILLS)) { - if (CommonConfig.GENERATE_RUNEWOOD_TREES.getConfigValue()) { - event.getGeneration().addFeature(GenerationStep.Decoration.VEGETAL_DECORATION, FeatureRegistry.PlacedFeatures.RUNEWOOD_TREE); - } - } - if (event.getCategory().equals(Biome.BiomeCategory.FOREST)) { - if (CommonConfig.GENERATE_RUNEWOOD_TREES.getConfigValue()) { - event.getGeneration().addFeature(GenerationStep.Decoration.VEGETAL_DECORATION, FeatureRegistry.PlacedFeatures.RARE_RUNEWOOD_TREE); - } - } - - if (CommonConfig.GENERATE_WEEPING_WELLS.getConfigValue()) { - event.getGeneration().addFeature(GenerationStep.Decoration.LOCAL_MODIFICATIONS, FeatureRegistry.PlacedFeatures.WEEPING_WELL_FEATURE); - } - - if (event.getCategory().equals(Biome.BiomeCategory.NETHER)) { - if (CommonConfig.GENERATE_BLAZE_QUARTZ.getConfigValue()) { - event.getGeneration().addFeature(GenerationStep.Decoration.UNDERGROUND_ORES, FeatureRegistry.PlacedFeatures.BLAZING_QUARTZ_FEATURE); - } - } - if (CommonConfig.GENERATE_SOULSTONE.getConfigValue()) { - event.getGeneration().addFeature(GenerationStep.Decoration.UNDERGROUND_ORES, FeatureRegistry.PlacedFeatures.SOULSTONE_FEATURE); - } - if (CommonConfig.GENERATE_SURFACE_SOULSTONE.getConfigValue()) { - event.getGeneration().addFeature(GenerationStep.Decoration.UNDERGROUND_ORES, FeatureRegistry.PlacedFeatures.SURFACE_SOULSTONE_FEATURE); - } - if (CommonConfig.GENERATE_BRILLIANT_STONE.getConfigValue()) { - event.getGeneration().addFeature(GenerationStep.Decoration.UNDERGROUND_ORES, FeatureRegistry.PlacedFeatures.BRILLIANCE_FEATURE); - } - if (CommonConfig.GENERATE_NATURAL_QUARTZ.getConfigValue()) { - event.getGeneration().addFeature(GenerationStep.Decoration.UNDERGROUND_ORES, FeatureRegistry.PlacedFeatures.NATURAL_QUARTZ_FEATURE); - } - - if (CommonConfig.GENERATE_QUARTZ_GEODES.getConfigValue()) { - event.getGeneration().addFeature(GenerationStep.Decoration.LOCAL_MODIFICATIONS, FeatureRegistry.PlacedFeatures.QUARTZ_GEODE_FEATURE); - event.getGeneration().addFeature(GenerationStep.Decoration.LOCAL_MODIFICATIONS, FeatureRegistry.PlacedFeatures.DEEPSLATE_QUARTZ_GEODE_FEATURE); - } - if (CommonConfig.GENERATE_CTHONIC_GOLD.getConfigValue()) { - event.getGeneration().addFeature(GenerationStep.Decoration.LOCAL_MODIFICATIONS, FeatureRegistry.PlacedFeatures.CTHONIC_GOLD_GEODE_FEATURE); - } - } - - */ -} \ No newline at end of file diff --git a/src/main/java/com/sammy/malum/data/DataGenerators.java b/src/main/java/com/sammy/malum/data/DataGenerators.java index ec6d278e3..772406e5b 100644 --- a/src/main/java/com/sammy/malum/data/DataGenerators.java +++ b/src/main/java/com/sammy/malum/data/DataGenerators.java @@ -6,24 +6,15 @@ import com.sammy.malum.data.block.MalumBlockTags; import com.sammy.malum.data.item.MalumItemModels; import com.sammy.malum.data.recipe.*; -import net.minecraft.DetectedVersion; import net.minecraft.core.HolderLookup; import net.minecraft.data.DataGenerator; import net.minecraft.data.PackOutput; -import net.minecraft.data.metadata.PackMetadataGenerator; -import net.minecraft.network.chat.Component; -import net.minecraft.server.packs.PackType; -import net.minecraft.server.packs.metadata.pack.PackMetadataSection; -import net.minecraftforge.common.data.DatapackBuiltinEntriesProvider; import net.minecraftforge.common.data.ExistingFileHelper; import net.minecraftforge.data.event.GatherDataEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; -import java.util.Arrays; import java.util.concurrent.CompletableFuture; -import java.util.function.Function; -import java.util.stream.Collectors; @Mod.EventBusSubscriber(modid = MalumMod.MALUM, bus = Mod.EventBusSubscriber.Bus.MOD) public class DataGenerators { diff --git a/src/main/java/com/sammy/malum/data/MalumBiomeTags.java b/src/main/java/com/sammy/malum/data/MalumBiomeTags.java index dad368b94..e712110d1 100644 --- a/src/main/java/com/sammy/malum/data/MalumBiomeTags.java +++ b/src/main/java/com/sammy/malum/data/MalumBiomeTags.java @@ -3,11 +3,9 @@ import com.sammy.malum.MalumMod; import com.sammy.malum.registry.common.worldgen.BiomeTagRegistry; import net.minecraft.core.HolderLookup; -import net.minecraft.core.registries.Registries; import net.minecraft.data.PackOutput; import net.minecraft.data.tags.BiomeTagsProvider; import net.minecraft.tags.BiomeTags; -import net.minecraft.world.level.biome.Biome; import net.minecraftforge.common.Tags; import net.minecraftforge.common.data.ExistingFileHelper; import org.jetbrains.annotations.Nullable; diff --git a/src/main/java/com/sammy/malum/data/MalumLang.java b/src/main/java/com/sammy/malum/data/MalumLang.java index bc660ba5e..213dce2de 100644 --- a/src/main/java/com/sammy/malum/data/MalumLang.java +++ b/src/main/java/com/sammy/malum/data/MalumLang.java @@ -12,7 +12,6 @@ import com.sammy.malum.registry.common.SpiritRiteRegistry; import com.sammy.malum.registry.common.SpiritTypeRegistry; import com.sammy.malum.registry.common.block.BlockRegistry; -import net.minecraft.data.DataGenerator; import net.minecraft.data.PackOutput; import net.minecraft.sounds.SoundEvent; import net.minecraft.world.effect.MobEffect; diff --git a/src/main/java/com/sammy/malum/data/MalumRecipes.java b/src/main/java/com/sammy/malum/data/MalumRecipes.java index e17fe9e8c..e870273d8 100644 --- a/src/main/java/com/sammy/malum/data/MalumRecipes.java +++ b/src/main/java/com/sammy/malum/data/MalumRecipes.java @@ -79,13 +79,13 @@ protected void buildRecipes(Consumer consumer) { //NODES smeltingWithCount(Ingredient.of(ItemRegistry.IRON_NODE.get()), RecipeCategory.MISC, Items.IRON_NUGGET, 6, 0.25f, 200).unlockedBy("has_impetus", has(ItemRegistry.IRON_IMPETUS.get())).save(consumer, malumPath("iron_from_node_smelting")); - blastingWithCount(Ingredient.of(ItemRegistry.IRON_NODE.get()), RecipeCategory.MISC,Items.IRON_NUGGET, 6, 0.25f, 100).unlockedBy("has_impetus", has(ItemRegistry.IRON_IMPETUS.get())).save(consumer, malumPath("iron_from_node_blasting")); + blastingWithCount(Ingredient.of(ItemRegistry.IRON_NODE.get()), RecipeCategory.MISC, Items.IRON_NUGGET, 6, 0.25f, 100).unlockedBy("has_impetus", has(ItemRegistry.IRON_IMPETUS.get())).save(consumer, malumPath("iron_from_node_blasting")); - smeltingWithCount(Ingredient.of(ItemRegistry.GOLD_NODE.get()), RecipeCategory.MISC,Items.GOLD_NUGGET, 6, 0.25f, 200).unlockedBy("has_impetus", has(ItemRegistry.GOLD_IMPETUS.get())).save(consumer, malumPath("gold_from_node_smelting")); - blastingWithCount(Ingredient.of(ItemRegistry.GOLD_NODE.get()), RecipeCategory.MISC,Items.GOLD_NUGGET, 6, 0.25f, 100).unlockedBy("has_impetus", has(ItemRegistry.GOLD_IMPETUS.get())).save(consumer, malumPath("gold_from_node_blasting")); + smeltingWithCount(Ingredient.of(ItemRegistry.GOLD_NODE.get()), RecipeCategory.MISC, Items.GOLD_NUGGET, 6, 0.25f, 200).unlockedBy("has_impetus", has(ItemRegistry.GOLD_IMPETUS.get())).save(consumer, malumPath("gold_from_node_smelting")); + blastingWithCount(Ingredient.of(ItemRegistry.GOLD_NODE.get()), RecipeCategory.MISC, Items.GOLD_NUGGET, 6, 0.25f, 100).unlockedBy("has_impetus", has(ItemRegistry.GOLD_IMPETUS.get())).save(consumer, malumPath("gold_from_node_blasting")); - smeltingWithCount(Ingredient.of(ItemRegistry.COPPER_NODE.get()), RecipeCategory.MISC,ItemRegistry.COPPER_NUGGET.get(), 6, 0.25f, 200).unlockedBy("has_impetus", has(ItemRegistry.COPPER_IMPETUS.get())).save(consumer, malumPath("copper_from_node_smelting")); - blastingWithCount(Ingredient.of(ItemRegistry.COPPER_NODE.get()), RecipeCategory.MISC,ItemRegistry.COPPER_NUGGET.get(), 6, 0.25f, 100).unlockedBy("has_impetus", has(ItemRegistry.COPPER_IMPETUS.get())).save(consumer, malumPath("copper_from_node_blasting")); + smeltingWithCount(Ingredient.of(ItemRegistry.COPPER_NODE.get()), RecipeCategory.MISC, ItemRegistry.COPPER_NUGGET.get(), 6, 0.25f, 200).unlockedBy("has_impetus", has(ItemRegistry.COPPER_IMPETUS.get())).save(consumer, malumPath("copper_from_node_smelting")); + blastingWithCount(Ingredient.of(ItemRegistry.COPPER_NODE.get()), RecipeCategory.MISC, ItemRegistry.COPPER_NUGGET.get(), 6, 0.25f, 100).unlockedBy("has_impetus", has(ItemRegistry.COPPER_IMPETUS.get())).save(consumer, malumPath("copper_from_node_blasting")); nodeSmelting(consumer, ItemRegistry.LEAD_IMPETUS, ItemRegistry.LEAD_NODE, NUGGETS_LEAD); nodeSmelting(consumer, ItemRegistry.SILVER_IMPETUS, ItemRegistry.SILVER_NODE, NUGGETS_SILVER); diff --git a/src/main/java/com/sammy/malum/data/RegistryDataGenerator.java b/src/main/java/com/sammy/malum/data/RegistryDataGenerator.java index d20c03302..5a2e35ab1 100644 --- a/src/main/java/com/sammy/malum/data/RegistryDataGenerator.java +++ b/src/main/java/com/sammy/malum/data/RegistryDataGenerator.java @@ -1,32 +1,17 @@ package com.sammy.malum.data; import com.sammy.malum.MalumMod; -import com.sammy.malum.registry.common.worldgen.BiomeTagRegistry; import com.sammy.malum.registry.common.worldgen.ConfiguredFeatureRegistry; import com.sammy.malum.registry.common.worldgen.PlacedFeatureRegistry; -import com.sammy.malum.registry.common.worldgen.StructureRegistry; -import net.minecraft.core.Holder; import net.minecraft.core.HolderLookup; -import net.minecraft.core.HolderSet; import net.minecraft.core.RegistrySetBuilder; import net.minecraft.core.registries.Registries; import net.minecraft.data.PackOutput; -import net.minecraft.data.worldgen.BootstapContext; -import net.minecraft.resources.ResourceKey; -import net.minecraft.tags.TagKey; -import net.minecraft.world.level.biome.Biome; -import net.minecraft.world.level.levelgen.GenerationStep; -import net.minecraft.world.level.levelgen.placement.PlacedFeature; import net.minecraftforge.common.data.DatapackBuiltinEntriesProvider; -import net.minecraftforge.common.world.BiomeModifier; -import net.minecraftforge.common.world.ForgeBiomeModifiers; import net.minecraftforge.registries.ForgeRegistries; -import java.util.ArrayList; -import java.util.List; import java.util.Set; import java.util.concurrent.CompletableFuture; -import java.util.function.Supplier; public class RegistryDataGenerator extends DatapackBuiltinEntriesProvider { diff --git a/src/main/java/com/sammy/malum/data/block/MalumBlockLootTables.java b/src/main/java/com/sammy/malum/data/block/MalumBlockLootTables.java index 4df5a1b1b..b588d2e3c 100644 --- a/src/main/java/com/sammy/malum/data/block/MalumBlockLootTables.java +++ b/src/main/java/com/sammy/malum/data/block/MalumBlockLootTables.java @@ -2,7 +2,6 @@ import com.google.common.collect.ImmutableSet; import com.mojang.datafixers.util.Pair; -import com.sammy.malum.MalumMod; import com.sammy.malum.common.block.ether.EtherBlock; import com.sammy.malum.common.block.storage.jar.SpiritJarBlock; import com.sammy.malum.common.block.storage.vial.SoulVialBlock; @@ -42,7 +41,10 @@ import net.minecraftforge.registries.RegistryObject; import team.lodestar.lodestone.systems.block.LodestoneBlockProperties; -import java.util.*; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Set; import java.util.function.BiConsumer; import java.util.function.Consumer; import java.util.function.Function; diff --git a/src/main/java/com/sammy/malum/data/recipe/MalumVanillaRecipeReplacements.java b/src/main/java/com/sammy/malum/data/recipe/MalumVanillaRecipeReplacements.java index 4654c9944..731174b65 100644 --- a/src/main/java/com/sammy/malum/data/recipe/MalumVanillaRecipeReplacements.java +++ b/src/main/java/com/sammy/malum/data/recipe/MalumVanillaRecipeReplacements.java @@ -2,7 +2,6 @@ import net.minecraft.data.PackOutput; import net.minecraft.data.recipes.FinishedRecipe; -import net.minecraft.data.recipes.RecipeProvider; import net.minecraft.data.recipes.ShapedRecipeBuilder; import net.minecraft.data.recipes.ShapelessRecipeBuilder; import net.minecraft.data.recipes.packs.VanillaRecipeProvider; diff --git a/src/main/java/com/sammy/malum/data/recipe/builder/vanilla/StackedMalumCookingRecipeBuilder.java b/src/main/java/com/sammy/malum/data/recipe/builder/vanilla/StackedMalumCookingRecipeBuilder.java index 4d14f703a..27cf92216 100644 --- a/src/main/java/com/sammy/malum/data/recipe/builder/vanilla/StackedMalumCookingRecipeBuilder.java +++ b/src/main/java/com/sammy/malum/data/recipe/builder/vanilla/StackedMalumCookingRecipeBuilder.java @@ -6,7 +6,6 @@ import net.minecraft.advancements.CriterionTriggerInstance; import net.minecraft.advancements.RequirementsStrategy; import net.minecraft.advancements.critereon.RecipeUnlockedTrigger; -import net.minecraft.core.Registry; import net.minecraft.data.recipes.FinishedRecipe; import net.minecraft.data.recipes.RecipeBuilder; import net.minecraft.data.recipes.RecipeCategory; @@ -15,7 +14,6 @@ import net.minecraft.world.item.crafting.AbstractCookingRecipe; import net.minecraft.world.item.crafting.Ingredient; import net.minecraft.world.item.crafting.RecipeSerializer; -import net.minecraft.world.item.crafting.SimpleCookingSerializer; import net.minecraft.world.level.ItemLike; import net.minecraftforge.registries.ForgeRegistries; diff --git a/src/main/java/com/sammy/malum/mixin/ExplosionMixin.java b/src/main/java/com/sammy/malum/mixin/ExplosionMixin.java index e62574a1b..42391f4ba 100644 --- a/src/main/java/com/sammy/malum/mixin/ExplosionMixin.java +++ b/src/main/java/com/sammy/malum/mixin/ExplosionMixin.java @@ -34,7 +34,9 @@ public abstract class ExplosionMixin { @Final private float radius; - @Shadow @Nullable public abstract LivingEntity getIndirectSourceEntity(); + @Shadow + @Nullable + public abstract LivingEntity getIndirectSourceEntity(); @ModifyArg(method = "finalizeExplosion", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/block/state/BlockState;getDrops(Lnet/minecraft/world/level/storage/loot/LootParams$Builder;)Ljava/util/List;")) private LootParams.Builder malum$getBlockDrops(LootParams.Builder builder) { diff --git a/src/main/java/com/sammy/malum/registry/client/ShaderRegistry.java b/src/main/java/com/sammy/malum/registry/client/ShaderRegistry.java index a4dd0c2c9..4e1fa0e65 100644 --- a/src/main/java/com/sammy/malum/registry/client/ShaderRegistry.java +++ b/src/main/java/com/sammy/malum/registry/client/ShaderRegistry.java @@ -2,7 +2,6 @@ import com.mojang.blaze3d.vertex.DefaultVertexFormat; import com.sammy.malum.MalumMod; -import net.minecraft.server.packs.resources.ResourceManager; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.client.event.RegisterShadersEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; @@ -12,8 +11,6 @@ import java.io.IOException; -import static team.lodestar.lodestone.setup.LodestoneShaderRegistry.registerShader; - @Mod.EventBusSubscriber(value = Dist.CLIENT, modid = MalumMod.MALUM, bus = Mod.EventBusSubscriber.Bus.MOD) public class ShaderRegistry { public static ShaderHolder TOUCH_OF_DARKNESS = new ShaderHolder(MalumMod.malumPath("touch_of_darkness"), DefaultVertexFormat.POSITION_COLOR_TEX, "Speed", "Zoom", "Distortion", "Intensity", "Wibble"); diff --git a/src/main/java/com/sammy/malum/registry/common/block/BlockRegistry.java b/src/main/java/com/sammy/malum/registry/common/block/BlockRegistry.java index b6876006d..50a8ee62d 100644 --- a/src/main/java/com/sammy/malum/registry/common/block/BlockRegistry.java +++ b/src/main/java/com/sammy/malum/registry/common/block/BlockRegistry.java @@ -46,7 +46,6 @@ import net.minecraft.world.level.block.*; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.properties.BlockSetType; -import net.minecraft.world.level.block.state.properties.WoodType; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.client.event.RegisterColorHandlersEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; diff --git a/src/main/java/com/sammy/malum/registry/common/block/WoodTypeRegistry.java b/src/main/java/com/sammy/malum/registry/common/block/WoodTypeRegistry.java index 9e4fa5093..944410c47 100644 --- a/src/main/java/com/sammy/malum/registry/common/block/WoodTypeRegistry.java +++ b/src/main/java/com/sammy/malum/registry/common/block/WoodTypeRegistry.java @@ -1,6 +1,5 @@ package com.sammy.malum.registry.common.block; -import net.minecraft.world.level.block.state.properties.BlockSetType; import net.minecraft.world.level.block.state.properties.WoodType; import java.util.ArrayList; @@ -16,5 +15,4 @@ public class WoodTypeRegistry { public static final WoodType SOULWOOD = WoodType.register(new WoodType("soulwood", MalumBlockSetTypes.SOULWOOD)); - } diff --git a/src/main/java/com/sammy/malum/registry/common/entity/EntityRegistry.java b/src/main/java/com/sammy/malum/registry/common/entity/EntityRegistry.java index f4c35be4e..ad6670fa7 100644 --- a/src/main/java/com/sammy/malum/registry/common/entity/EntityRegistry.java +++ b/src/main/java/com/sammy/malum/registry/common/entity/EntityRegistry.java @@ -13,7 +13,6 @@ import net.minecraft.world.entity.MobCategory; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.client.event.EntityRenderersEvent; -import net.minecraftforge.common.Tags; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.registries.DeferredRegister; diff --git a/src/main/java/com/sammy/malum/registry/common/worldgen/ConfiguredFeatureRegistry.java b/src/main/java/com/sammy/malum/registry/common/worldgen/ConfiguredFeatureRegistry.java index 536aeb86b..fd366180f 100644 --- a/src/main/java/com/sammy/malum/registry/common/worldgen/ConfiguredFeatureRegistry.java +++ b/src/main/java/com/sammy/malum/registry/common/worldgen/ConfiguredFeatureRegistry.java @@ -1,13 +1,9 @@ package com.sammy.malum.registry.common.worldgen; import com.sammy.malum.MalumMod; -import com.sammy.malum.common.worldgen.RunewoodTreeFeature; import com.sammy.malum.registry.common.block.BlockRegistry; -import net.minecraft.core.Holder; -import net.minecraft.core.HolderGetter; import net.minecraft.core.registries.Registries; import net.minecraft.data.worldgen.BootstapContext; -import net.minecraft.data.worldgen.features.FeatureUtils; import net.minecraft.resources.ResourceKey; import net.minecraft.tags.BlockTags; import net.minecraft.util.valueproviders.UniformInt; @@ -17,13 +13,15 @@ import net.minecraft.world.level.levelgen.GeodeLayerSettings; import net.minecraft.world.level.levelgen.feature.ConfiguredFeature; import net.minecraft.world.level.levelgen.feature.Feature; -import net.minecraft.world.level.levelgen.feature.configurations.*; +import net.minecraft.world.level.levelgen.feature.configurations.FeatureConfiguration; +import net.minecraft.world.level.levelgen.feature.configurations.GeodeConfiguration; +import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration; +import net.minecraft.world.level.levelgen.feature.configurations.OreConfiguration; import net.minecraft.world.level.levelgen.feature.stateproviders.BlockStateProvider; import net.minecraft.world.level.levelgen.structure.templatesystem.RuleTest; import net.minecraft.world.level.levelgen.structure.templatesystem.TagMatchTest; import java.util.List; -import java.util.function.Supplier; public class ConfiguredFeatureRegistry { @@ -70,7 +68,6 @@ public static void bootstrap(BootstapContext> context) { context.register(ConfiguredFeatureRegistry.CONFIGURED_SOULWOOD_TREE, addTreeConfig(FeatureRegistry.SOULWOOD_TREE.get())); - context.register(ConfiguredFeatureRegistry.CONFIGURED_QUARTZ_GEODE_FEATURE, new ConfiguredFeature<>(Feature.GEODE, new GeodeConfiguration( new GeodeBlockSettings( BlockStateProvider.simple(Blocks.AIR), @@ -142,7 +139,7 @@ public static void bootstrap(BootstapContext> context) { } - private static ConfiguredFeature addTreeConfig(Feature feature) { + private static ConfiguredFeature addTreeConfig(Feature feature) { return new ConfiguredFeature<>(feature, FeatureConfiguration.NONE); } diff --git a/src/main/java/com/sammy/malum/registry/common/worldgen/FeatureRegistry.java b/src/main/java/com/sammy/malum/registry/common/worldgen/FeatureRegistry.java index e94712687..a44280471 100644 --- a/src/main/java/com/sammy/malum/registry/common/worldgen/FeatureRegistry.java +++ b/src/main/java/com/sammy/malum/registry/common/worldgen/FeatureRegistry.java @@ -1,42 +1,16 @@ package com.sammy.malum.registry.common.worldgen; -import com.sammy.malum.MalumMod; import com.sammy.malum.common.worldgen.RareEarthsGeode; import com.sammy.malum.common.worldgen.RunewoodTreeFeature; import com.sammy.malum.common.worldgen.SoulwoodTreeFeature; import com.sammy.malum.common.worldgen.WeepingWellFeature; -import com.sammy.malum.config.CommonConfig; -import com.sammy.malum.registry.common.block.BlockRegistry; -import net.minecraft.core.Holder; -import net.minecraft.data.worldgen.features.FeatureUtils; -import net.minecraft.data.worldgen.features.OreFeatures; -import net.minecraft.data.worldgen.placement.PlacementUtils; -import net.minecraft.tags.BlockTags; -import net.minecraft.util.valueproviders.UniformInt; -import net.minecraft.world.level.block.Blocks; -import net.minecraft.world.level.levelgen.GeodeBlockSettings; -import net.minecraft.world.level.levelgen.GeodeCrackSettings; -import net.minecraft.world.level.levelgen.GeodeLayerSettings; -import net.minecraft.world.level.levelgen.VerticalAnchor; -import net.minecraft.world.level.levelgen.feature.ConfiguredFeature; import net.minecraft.world.level.levelgen.feature.Feature; import net.minecraft.world.level.levelgen.feature.configurations.GeodeConfiguration; -import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration; -import net.minecraft.world.level.levelgen.feature.configurations.OreConfiguration; -import net.minecraft.world.level.levelgen.feature.stateproviders.BlockStateProvider; -import net.minecraft.world.level.levelgen.heightproviders.ConstantHeight; -import net.minecraft.world.level.levelgen.placement.*; -import net.minecraftforge.fml.common.Mod; import net.minecraftforge.registries.DeferredRegister; import net.minecraftforge.registries.ForgeRegistries; import net.minecraftforge.registries.RegistryObject; -import team.lodestar.lodestone.systems.worldgen.ChancePlacementFilter; -import team.lodestar.lodestone.systems.worldgen.DimensionPlacementFilter; - -import java.util.List; import static com.sammy.malum.MalumMod.MALUM; -import static net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration.INSTANCE; public class FeatureRegistry { diff --git a/src/main/java/com/sammy/malum/registry/common/worldgen/PlacedFeatureRegistry.java b/src/main/java/com/sammy/malum/registry/common/worldgen/PlacedFeatureRegistry.java index 63d041dc1..f78576969 100644 --- a/src/main/java/com/sammy/malum/registry/common/worldgen/PlacedFeatureRegistry.java +++ b/src/main/java/com/sammy/malum/registry/common/worldgen/PlacedFeatureRegistry.java @@ -2,7 +2,6 @@ import com.google.common.collect.ImmutableList; import com.sammy.malum.MalumMod; -import com.sammy.malum.config.CommonConfig; import net.minecraft.core.Holder; import net.minecraft.core.HolderGetter; import net.minecraft.core.registries.Registries; @@ -12,10 +11,7 @@ import net.minecraft.world.level.levelgen.VerticalAnchor; import net.minecraft.world.level.levelgen.feature.ConfiguredFeature; import net.minecraft.world.level.levelgen.placement.*; -import team.lodestar.lodestone.systems.worldgen.ChancePlacementFilter; -import team.lodestar.lodestone.systems.worldgen.DimensionPlacementFilter; -import java.util.ArrayList; import java.util.List; public class PlacedFeatureRegistry { @@ -43,7 +39,6 @@ public static void bootstrap(BootstapContext context) { context.register(ORE_NATURAL_QUARTZ, addOreFeature(features.getOrThrow(ConfiguredFeatureRegistry.CONFIGURED_NATURAL_QUARTZ_ORE), -64, 10, 2)); context.register(ORE_BLAZING_QUARTZ, addOreFeature(features.getOrThrow(ConfiguredFeatureRegistry.CONFIGURED_BLAZING_QUARTZ_ORE), -16, 112, 16)); - context.register(RUNEWOOD_TREE, new PlacedFeature(features.getOrThrow(ConfiguredFeatureRegistry.CONFIGURED_RUNEWOOD_TREE), ImmutableList.builder().add( @@ -66,7 +61,6 @@ public static void bootstrap(BootstapContext context) { ) ); - context.register(QUARTZ_GEODE_FEATURE, new PlacedFeature(features.getOrThrow(ConfiguredFeatureRegistry.CONFIGURED_QUARTZ_GEODE_FEATURE), ImmutableList.builder().add( @@ -83,7 +77,7 @@ public static void bootstrap(BootstapContext context) { context.register(DEEPSLATE_QUARTZ_GEODE_FEATURE, new PlacedFeature(features.getOrThrow(ConfiguredFeatureRegistry.CONFIGURED_DEEPSLATE_QUARTZ_GEODE_FEATURE), ImmutableList.builder().add( - RarityFilter.onAverageOnceEvery(24), + RarityFilter.onAverageOnceEvery(24), InSquarePlacement.spread(), HeightRangePlacement.uniform( VerticalAnchor.aboveBottom(6), @@ -95,7 +89,7 @@ public static void bootstrap(BootstapContext context) { context.register(CTHONIC_GOLD_GEODE_FEATURE, new PlacedFeature(features.getOrThrow(ConfiguredFeatureRegistry.CONFIGURED_CTHONIC_GOLD_GEODE_FEATURE), ImmutableList.builder().add( - RarityFilter.onAverageOnceEvery(30), + RarityFilter.onAverageOnceEvery(30), InSquarePlacement.spread(), HeightRangePlacement.uniform( VerticalAnchor.aboveBottom(6), @@ -103,8 +97,6 @@ public static void bootstrap(BootstapContext context) { BiomeFilter.biome()) .build() )); - - } diff --git a/src/main/java/com/sammy/malum/registry/common/worldgen/StructureRegistry.java b/src/main/java/com/sammy/malum/registry/common/worldgen/StructureRegistry.java index 31a64dff0..2797bee43 100644 --- a/src/main/java/com/sammy/malum/registry/common/worldgen/StructureRegistry.java +++ b/src/main/java/com/sammy/malum/registry/common/worldgen/StructureRegistry.java @@ -10,6 +10,6 @@ public class StructureRegistry { public static final DeferredRegister> STRUCTURES = DeferredRegister.create(Registries.STRUCTURE_TYPE, MalumMod.MALUM); - public static final RegistryObject> WEEPING_WELL = STRUCTURES.register("weeping_well", () -> () ->(WeepingWellStructure.CODEC)); + public static final RegistryObject> WEEPING_WELL = STRUCTURES.register("weeping_well", () -> () -> (WeepingWellStructure.CODEC)); }