diff --git a/src/main/java/com/portingdeadmods/nautec/api/blockentities/LaserBlockEntity.java b/src/main/java/com/portingdeadmods/nautec/api/blockentities/LaserBlockEntity.java index dd7239a7..1763113d 100644 --- a/src/main/java/com/portingdeadmods/nautec/api/blockentities/LaserBlockEntity.java +++ b/src/main/java/com/portingdeadmods/nautec/api/blockentities/LaserBlockEntity.java @@ -3,7 +3,7 @@ import com.portingdeadmods.nautec.NTConfig; import com.portingdeadmods.nautec.content.recipes.ItemTransformationRecipe; import com.portingdeadmods.nautec.content.recipes.inputs.ItemTransformationRecipeInput; -import com.portingdeadmods.nautec.utils.ParticlesUtils; +import com.portingdeadmods.nautec.utils.ParticleUtils; import it.unimi.dsi.fastutil.objects.*; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; @@ -204,7 +204,7 @@ private void processItemCrafting(AABB box, Direction direction) { iterator.remove(); } else { activeTransformation.put(cookingItem, cookTime + 1); - ParticlesUtils.spawnParticlesAroundItem(cookingItem, level, ParticleTypes.END_ROD); + ParticleUtils.spawnParticlesAroundItem(cookingItem, level, ParticleTypes.END_ROD); } } } @@ -215,7 +215,7 @@ private void processItemCrafting(AABB box, Direction direction) { BlockPos pos = worldPosition.relative(direction, distance); Vec3 start = worldPosition.relative(direction).getCenter(); - double v = 0.2; + double v = 0.3; if (direction == Direction.UP || direction == Direction.DOWN) { start = start.subtract(v, 0, v); } else if (direction == Direction.NORTH || direction == Direction.SOUTH) { diff --git a/src/main/java/com/portingdeadmods/nautec/content/augments/EnderMagnetAugment.java b/src/main/java/com/portingdeadmods/nautec/content/augments/EnderMagnetAugment.java index 86b05ca3..1231acc6 100644 --- a/src/main/java/com/portingdeadmods/nautec/content/augments/EnderMagnetAugment.java +++ b/src/main/java/com/portingdeadmods/nautec/content/augments/EnderMagnetAugment.java @@ -2,18 +2,10 @@ import com.portingdeadmods.nautec.api.augments.Augment; import com.portingdeadmods.nautec.api.augments.AugmentSlot; -import com.portingdeadmods.nautec.api.augments.AugmentType; import com.portingdeadmods.nautec.registries.NTAugments; -import com.portingdeadmods.nautec.utils.ParticlesUtils; -import net.minecraft.core.particles.ParticleOptions; -import net.minecraft.core.particles.ParticleTypes; -import net.minecraft.sounds.SoundEvents; -import net.minecraft.sounds.SoundSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.item.ItemEntity; -import net.minecraft.world.phys.Vec3; import net.neoforged.neoforge.event.tick.PlayerTickEvent; -import org.jetbrains.annotations.Nullable; import java.util.List; diff --git a/src/main/java/com/portingdeadmods/nautec/content/augments/LeapAugment.java b/src/main/java/com/portingdeadmods/nautec/content/augments/LeapAugment.java index 6f0d97ba..517f7621 100644 --- a/src/main/java/com/portingdeadmods/nautec/content/augments/LeapAugment.java +++ b/src/main/java/com/portingdeadmods/nautec/content/augments/LeapAugment.java @@ -1,16 +1,12 @@ package com.portingdeadmods.nautec.content.augments; -import com.mojang.blaze3d.platform.InputConstants; import com.portingdeadmods.nautec.api.augments.Augment; import com.portingdeadmods.nautec.api.augments.AugmentSlot; -import com.portingdeadmods.nautec.registries.NTAugmentSlots; import com.portingdeadmods.nautec.registries.NTAugments; import com.portingdeadmods.nautec.registries.NTKeybinds; -import com.portingdeadmods.nautec.utils.InputUtils; import net.minecraft.sounds.SoundEvents; import net.minecraft.world.phys.Vec3; import net.neoforged.neoforge.event.tick.PlayerTickEvent; -import org.jetbrains.annotations.Nullable; import static com.portingdeadmods.nautec.utils.MathUtils.*; diff --git a/src/main/java/com/portingdeadmods/nautec/content/augments/ThrowBouncingTridentAugment.java b/src/main/java/com/portingdeadmods/nautec/content/augments/ThrowBouncingTridentAugment.java index b6b85bf8..bbbae14c 100644 --- a/src/main/java/com/portingdeadmods/nautec/content/augments/ThrowBouncingTridentAugment.java +++ b/src/main/java/com/portingdeadmods/nautec/content/augments/ThrowBouncingTridentAugment.java @@ -1,20 +1,14 @@ package com.portingdeadmods.nautec.content.augments; -import com.mojang.blaze3d.platform.InputConstants; -import com.portingdeadmods.nautec.Nautec; import com.portingdeadmods.nautec.api.augments.Augment; import com.portingdeadmods.nautec.api.augments.AugmentSlot; import com.portingdeadmods.nautec.content.entites.ThrownBouncingTrident; import com.portingdeadmods.nautec.network.KeyPressedPayload; -import com.portingdeadmods.nautec.registries.NTAugmentSlots; import com.portingdeadmods.nautec.registries.NTAugments; import com.portingdeadmods.nautec.registries.NTKeybinds; -import com.portingdeadmods.nautec.utils.AugmentHelper; -import com.portingdeadmods.nautec.utils.InputUtils; import net.minecraft.world.item.Items; import net.neoforged.neoforge.event.tick.PlayerTickEvent; import net.neoforged.neoforge.network.PacketDistributor; -import org.jetbrains.annotations.Nullable; // TODO: Implement this public class ThrowBouncingTridentAugment extends Augment { diff --git a/src/main/java/com/portingdeadmods/nautec/content/augments/ThrowRandomPotionAugments.java b/src/main/java/com/portingdeadmods/nautec/content/augments/ThrowRandomPotionAugments.java index 6d126b0d..3e209e9d 100644 --- a/src/main/java/com/portingdeadmods/nautec/content/augments/ThrowRandomPotionAugments.java +++ b/src/main/java/com/portingdeadmods/nautec/content/augments/ThrowRandomPotionAugments.java @@ -1,13 +1,10 @@ package com.portingdeadmods.nautec.content.augments; -import com.mojang.blaze3d.platform.InputConstants; import com.portingdeadmods.nautec.api.augments.Augment; import com.portingdeadmods.nautec.api.augments.AugmentSlot; import com.portingdeadmods.nautec.network.KeyPressedPayload; -import com.portingdeadmods.nautec.registries.NTAugmentSlots; import com.portingdeadmods.nautec.registries.NTAugments; import com.portingdeadmods.nautec.registries.NTKeybinds; -import com.portingdeadmods.nautec.utils.InputUtils; import net.minecraft.core.Holder; import net.minecraft.world.entity.projectile.ThrownPotion; import net.minecraft.world.item.ItemStack; @@ -17,7 +14,6 @@ import net.minecraft.world.item.alchemy.Potions; import net.neoforged.neoforge.event.tick.PlayerTickEvent; import net.neoforged.neoforge.network.PacketDistributor; -import org.jetbrains.annotations.Nullable; import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/com/portingdeadmods/nautec/content/blockentities/ChargerBlockEntity.java b/src/main/java/com/portingdeadmods/nautec/content/blockentities/ChargerBlockEntity.java index b3707ef3..2c67ddf2 100644 --- a/src/main/java/com/portingdeadmods/nautec/content/blockentities/ChargerBlockEntity.java +++ b/src/main/java/com/portingdeadmods/nautec/content/blockentities/ChargerBlockEntity.java @@ -1,26 +1,19 @@ package com.portingdeadmods.nautec.content.blockentities; -import com.portingdeadmods.nautec.Nautec; import com.portingdeadmods.nautec.api.blockentities.LaserBlockEntity; import com.portingdeadmods.nautec.api.items.IPowerItem; import com.portingdeadmods.nautec.capabilities.IOActions; import com.portingdeadmods.nautec.capabilities.NTCapabilities; import com.portingdeadmods.nautec.capabilities.power.IPowerStorage; import com.portingdeadmods.nautec.registries.NTBlockEntityTypes; -import com.portingdeadmods.nautec.utils.ParticlesUtils; +import com.portingdeadmods.nautec.utils.ParticleUtils; import it.unimi.dsi.fastutil.Pair; import it.unimi.dsi.fastutil.objects.ObjectSet; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; -import net.minecraft.core.particles.ParticleOptions; import net.minecraft.core.particles.ParticleTypes; -import net.minecraft.world.InteractionResult; -import net.minecraft.world.item.ItemStack; -import net.minecraft.world.item.Items; -import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockState; import net.neoforged.neoforge.capabilities.BlockCapability; -import net.neoforged.neoforge.capabilities.Capabilities; import net.neoforged.neoforge.items.IItemHandler; import org.jetbrains.annotations.Nullable; @@ -58,7 +51,7 @@ public void commonTick() { IPowerStorage powerStorage = itemHandler.getStackInSlot(0).getCapability(NTCapabilities.PowerStorage.ITEM); if(powerStorage.getPowerStored() < powerStorage.getPowerCapacity()) { powerStorage.tryFillPower(4, false); - ParticlesUtils.spawnParticlesAroundBlock(getBlockPos(), getLevel(), ParticleTypes.ELECTRIC_SPARK); + ParticleUtils.spawnParticlesAroundBlock(getBlockPos(), getLevel(), ParticleTypes.ELECTRIC_SPARK); } } } diff --git a/src/main/java/com/portingdeadmods/nautec/datagen/RecipesProvider.java b/src/main/java/com/portingdeadmods/nautec/datagen/RecipesProvider.java index 18f99117..d86cd116 100644 --- a/src/main/java/com/portingdeadmods/nautec/datagen/RecipesProvider.java +++ b/src/main/java/com/portingdeadmods/nautec/datagen/RecipesProvider.java @@ -103,12 +103,12 @@ protected void buildRecipes(@NotNull RecipeOutput pRecipeOutput) { private static void aquaticCatalystRecipes(@NotNull RecipeOutput pRecipeOutput) { AquaticCatalystChannelingRecipeBuilder.newRecipe(Ingredient.of(Items.KELP)) - .powerAmount(500) + .powerAmount(700) .purity(0) .duration(100) .save(pRecipeOutput); AquaticCatalystChannelingRecipeBuilder.newRecipe(Ingredient.of(NTTags.Items.CORALS)) - .powerAmount(1400) + .powerAmount(2000) .purity(0.4f) .duration(200) .save(pRecipeOutput); diff --git a/src/main/java/com/portingdeadmods/nautec/events/NTEvents.java b/src/main/java/com/portingdeadmods/nautec/events/NTEvents.java index abeeec82..0548d4db 100644 --- a/src/main/java/com/portingdeadmods/nautec/events/NTEvents.java +++ b/src/main/java/com/portingdeadmods/nautec/events/NTEvents.java @@ -12,23 +12,16 @@ import com.portingdeadmods.nautec.compat.modonomicon.ModonomiconCompat; import com.portingdeadmods.nautec.content.commands.arguments.AugmentSlotArgumentType; import com.portingdeadmods.nautec.content.commands.arguments.AugmentTypeArgumentType; -import com.portingdeadmods.nautec.content.recipes.ItemEtchingRecipe; import com.portingdeadmods.nautec.data.NTDataAttachments; import com.portingdeadmods.nautec.data.NTDataComponents; import com.portingdeadmods.nautec.data.NTDataComponentsUtils; +import com.portingdeadmods.nautec.events.helper.ItemEtching; import com.portingdeadmods.nautec.events.helper.ItemInfusion; import com.portingdeadmods.nautec.network.SyncAugmentPayload; import com.portingdeadmods.nautec.registries.*; import com.portingdeadmods.nautec.utils.AugmentHelper; -import com.portingdeadmods.nautec.utils.ParticlesUtils; -import it.unimi.dsi.fastutil.objects.Object2IntMap; -import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap; import net.minecraft.ChatFormatting; import net.minecraft.core.Registry; -import net.minecraft.core.component.DataComponentType; -import net.minecraft.core.component.DataComponents; -import net.minecraft.core.particles.ParticleTypes; -import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.chat.Component; import net.minecraft.server.level.ServerPlayer; @@ -38,13 +31,7 @@ import net.minecraft.world.entity.item.ItemEntity; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; -import net.minecraft.world.item.component.CustomData; -import net.minecraft.world.item.component.ItemContainerContents; -import net.minecraft.world.item.component.SeededContainerLoot; -import net.minecraft.world.item.crafting.RecipeHolder; -import net.minecraft.world.item.crafting.SingleRecipeInput; import net.minecraft.world.level.Level; -import net.minecraft.world.phys.Vec3; import net.neoforged.bus.api.SubscribeEvent; import net.neoforged.fml.ModList; import net.neoforged.fml.common.EventBusSubscriber; @@ -59,14 +46,12 @@ import java.util.Map; import java.util.Objects; -import java.util.Optional; import java.util.stream.Collectors; public final class NTEvents { @EventBusSubscriber(modid = Nautec.MODID, bus = EventBusSubscriber.Bus.GAME) public static class Game { - private static final Object2IntMap activeTransformations = new Object2IntOpenHashMap<>(); @SubscribeEvent public static void onItemEntityTick(EntityTickEvent.Post event) { @@ -74,7 +59,7 @@ public static void onItemEntityTick(EntityTickEvent.Post event) { Level level = itemEntity.level(); if (itemEntity.isInFluidType(NTFluidTypes.ETCHING_ACID_FLUID_TYPE.get())) { - processItemEtching(itemEntity, level); + ItemEtching.processItemEtching(itemEntity, level); } if (itemEntity.isInFluidType(NTFluidTypes.EAS_FLUID_TYPE.get()) || level.getBlockState(itemEntity.blockPosition().below()).getFluidState().is(NTFluids.EAS_SOURCE.get())) { @@ -175,60 +160,6 @@ public static void onRightClick(PlayerInteractEvent.RightClickItem event) { } } } - - private static void processItemEtching(ItemEntity itemEntity, Level level) { - ItemStack stack = itemEntity.getItem(); - - if (!activeTransformations.containsKey(itemEntity)) { - Optional optionalRecipe = getEtchingRecipe(stack, level); - if (optionalRecipe.isPresent()) { - activeTransformations.put(itemEntity, 0); - } - } else { - int etchingTime = activeTransformations.getInt(itemEntity); - - if (etchingTime >= 100) { - Optional optionalRecipe = getEtchingRecipe(stack, level); - if (optionalRecipe.isPresent()) { - transformItem(itemEntity, optionalRecipe.get(), level); - } - activeTransformations.removeInt(itemEntity); - } else { - activeTransformations.put(itemEntity, etchingTime + 1); - // Optionally spawn particles while etching - ParticlesUtils.spawnParticlesAroundItem(itemEntity, level, ParticleTypes.FLAME); - } - } - } - - private static Optional getEtchingRecipe(ItemStack stack, Level level) { - return level.getRecipeManager() - .getRecipeFor(ItemEtchingRecipe.Type.INSTANCE, new SingleRecipeInput(stack), level) - .map(RecipeHolder::value); - } - - private static void transformItem(ItemEntity itemEntity, ItemEtchingRecipe recipe, Level level) { - Vec3 position = itemEntity.position(); - ItemStack inputStack = itemEntity.getItem(); - ItemStack resultStack = recipe.getResultItem(level.registryAccess()).copy(); - resultStack.setCount(itemEntity.getItem().getCount()); - - if(inputStack.is(NTBlocks.RUSTY_CRATE.asItem()) && resultStack.is(NTBlocks.CRATE.asItem())) { - for (DataComponentType type : itemEntity.getItem().getComponents().keySet()) { - Nautec.LOGGER.debug("Type: {}", BuiltInRegistries.DATA_COMPONENT_TYPE.getKey(type)); - } - ItemContainerContents value = itemEntity.getItem().copy().get(DataComponents.CONTAINER); - resultStack.set(DataComponents.CONTAINER, value); - SeededContainerLoot value1 = itemEntity.getItem().copy().get(DataComponents.CONTAINER_LOOT); - resultStack.set(DataComponents.CONTAINER_LOOT, value1); - } - - itemEntity.discard(); - - ItemEntity newItemEntity = new ItemEntity(level, position.x, position.y, position.z, resultStack); - level.addFreshEntity(newItemEntity); - } - } @EventBusSubscriber(modid = Nautec.MODID, bus = EventBusSubscriber.Bus.MOD) diff --git a/src/main/java/com/portingdeadmods/nautec/events/helper/ItemEtching.java b/src/main/java/com/portingdeadmods/nautec/events/helper/ItemEtching.java new file mode 100644 index 00000000..403c9c07 --- /dev/null +++ b/src/main/java/com/portingdeadmods/nautec/events/helper/ItemEtching.java @@ -0,0 +1,85 @@ +package com.portingdeadmods.nautec.events.helper; + +import com.portingdeadmods.nautec.Nautec; +import com.portingdeadmods.nautec.content.recipes.ItemEtchingRecipe; +import com.portingdeadmods.nautec.registries.NTBlocks; +import com.portingdeadmods.nautec.utils.ParticleUtils; +import it.unimi.dsi.fastutil.objects.Object2IntMap; +import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap; +import net.minecraft.core.BlockPos; +import net.minecraft.core.component.DataComponentType; +import net.minecraft.core.component.DataComponents; +import net.minecraft.core.particles.ParticleTypes; +import net.minecraft.core.registries.BuiltInRegistries; +import net.minecraft.world.entity.item.ItemEntity; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.component.ItemContainerContents; +import net.minecraft.world.item.component.SeededContainerLoot; +import net.minecraft.world.item.crafting.RecipeHolder; +import net.minecraft.world.item.crafting.SingleRecipeInput; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.Vec3; + +import java.util.Optional; + +public class ItemEtching { + private static final Object2IntMap activeEtching = new Object2IntOpenHashMap<>(); + + public static void processItemEtching(ItemEntity itemEntity, Level level) { + ItemStack stack = itemEntity.getItem(); + + if (!activeEtching.containsKey(itemEntity)) { + Optional optionalRecipe = getEtchingRecipe(stack, level); + if (optionalRecipe.isPresent()) { + activeEtching.put(itemEntity, 0); + } + } else { + int etchingTime = activeEtching.getInt(itemEntity); + + if (etchingTime >= 100) { + Optional optionalRecipe = getEtchingRecipe(stack, level); + if (optionalRecipe.isPresent()) { + transformItem(itemEntity, optionalRecipe.get(), level); + } + activeEtching.removeInt(itemEntity); + } else { + activeEtching.put(itemEntity, etchingTime + 1); + // Optionally spawn particles while etching + ParticleUtils.spawnParticlesAroundItem(itemEntity, level, ParticleTypes.FLAME); + } + } + } + + private static Optional getEtchingRecipe(ItemStack stack, Level level) { + return level.getRecipeManager() + .getRecipeFor(ItemEtchingRecipe.Type.INSTANCE, new SingleRecipeInput(stack), level) + .map(RecipeHolder::value); + } + + private static void transformItem(ItemEntity itemEntity, ItemEtchingRecipe recipe, Level level) { + BlockPos position = itemEntity.getOnPos(); + ItemStack inputStack = itemEntity.getItem(); + ItemStack resultStack = recipe.getResultItem(level.registryAccess()).copy(); + resultStack.setCount(itemEntity.getItem().getCount()); + + if (inputStack.is(NTBlocks.RUSTY_CRATE.asItem()) && resultStack.is(NTBlocks.CRATE.asItem())) { + ItemContainerContents value = itemEntity.getItem().copy().get(DataComponents.CONTAINER); + resultStack.set(DataComponents.CONTAINER, value); + SeededContainerLoot value1 = itemEntity.getItem().copy().get(DataComponents.CONTAINER_LOOT); + resultStack.set(DataComponents.CONTAINER_LOOT, value1); + } + + itemEntity.discard(); + + int rand = level.random.nextInt(0, 3); + if (rand == 2) { + level.setBlock(itemEntity.getOnPos(), Blocks.AIR.defaultBlockState(), 11); + } + + ItemEntity newItemEntity = new ItemEntity(level, position.getX(), position.getY(), position.getZ(), resultStack); + level.addFreshEntity(newItemEntity); + } + +} diff --git a/src/main/java/com/portingdeadmods/nautec/events/helper/ItemInfusion.java b/src/main/java/com/portingdeadmods/nautec/events/helper/ItemInfusion.java index 8634057d..ea7ab21b 100644 --- a/src/main/java/com/portingdeadmods/nautec/events/helper/ItemInfusion.java +++ b/src/main/java/com/portingdeadmods/nautec/events/helper/ItemInfusion.java @@ -2,7 +2,7 @@ import com.portingdeadmods.nautec.api.items.IPowerItem; import com.portingdeadmods.nautec.data.NTDataComponentsUtils; -import com.portingdeadmods.nautec.utils.ParticlesUtils; +import com.portingdeadmods.nautec.utils.ParticleUtils; import net.minecraft.core.BlockPos; import net.minecraft.core.particles.ParticleTypes; import net.minecraft.sounds.SoundEvents; @@ -10,6 +10,7 @@ import net.minecraft.world.entity.item.ItemEntity; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.material.Fluids; import java.util.HashMap; @@ -80,7 +81,7 @@ public static void processPowerItemInfusion(ItemEntity itemEntity, Level level) // Remove fluid from original position BlockPos originalFluidPos = infusionData.getOriginalFluidPos(); if (level.getBlockState(originalFluidPos).getFluidState().isSource()) { - level.setBlockAndUpdate(originalFluidPos, Fluids.EMPTY.defaultFluidState().createLegacyBlock()); + level.setBlock(itemEntity.getOnPos(), Blocks.AIR.defaultBlockState(), 11); } } else { // Continue the infusion process @@ -88,7 +89,7 @@ public static void processPowerItemInfusion(ItemEntity itemEntity, Level level) // Spawn particles at regular intervals if (infusionData.getInfusionProgress() % PARTICLE_INTERVAL == 0) { - ParticlesUtils.spawnParticlesAroundItem(itemEntity, level, ParticleTypes.ENCHANT); // Infusion particles + ParticleUtils.spawnParticlesAroundItem(itemEntity, level, ParticleTypes.ENCHANT); // Infusion particles } // Play sound at intervals @@ -102,7 +103,7 @@ public static void processPowerItemInfusion(ItemEntity itemEntity, Level level) private static void spawnCompletionEffects(ItemEntity itemEntity, Level level) { // Completion particle effects - ParticlesUtils.spawnParticlesAroundItem(itemEntity, level, ParticleTypes.DRAGON_BREATH); + ParticleUtils.spawnParticlesAroundItem(itemEntity, level, ParticleTypes.DRAGON_BREATH); // Play completion sound level.playSound(null, itemEntity.getX(), itemEntity.getY(), itemEntity.getZ(), diff --git a/src/main/java/com/portingdeadmods/nautec/utils/InputUtils.java b/src/main/java/com/portingdeadmods/nautec/utils/InputUtils.java deleted file mode 100644 index 3da7a3a1..00000000 --- a/src/main/java/com/portingdeadmods/nautec/utils/InputUtils.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.portingdeadmods.nautec.utils; - -import com.mojang.blaze3d.platform.InputConstants; -import net.minecraft.client.Minecraft; - -public class InputUtils { - public static boolean isKeyDown(int key) { - return InputConstants.isKeyDown(Minecraft.getInstance().getWindow().getWindow(), key); - } -} diff --git a/src/main/java/com/portingdeadmods/nautec/utils/MathUtils.java b/src/main/java/com/portingdeadmods/nautec/utils/MathUtils.java index 3ffd9542..b69ee50a 100644 --- a/src/main/java/com/portingdeadmods/nautec/utils/MathUtils.java +++ b/src/main/java/com/portingdeadmods/nautec/utils/MathUtils.java @@ -3,7 +3,7 @@ import net.minecraft.util.Mth; import net.minecraft.world.phys.Vec3; -public class MathUtils { +public final class MathUtils { public static Vec3 rotatePitch(Vec3 vec, float pitch){ float fc = Mth.cos(pitch); diff --git a/src/main/java/com/portingdeadmods/nautec/utils/ParticlesUtils.java b/src/main/java/com/portingdeadmods/nautec/utils/ParticleUtils.java similarity index 98% rename from src/main/java/com/portingdeadmods/nautec/utils/ParticlesUtils.java rename to src/main/java/com/portingdeadmods/nautec/utils/ParticleUtils.java index b60d75b7..ed194e9d 100644 --- a/src/main/java/com/portingdeadmods/nautec/utils/ParticlesUtils.java +++ b/src/main/java/com/portingdeadmods/nautec/utils/ParticleUtils.java @@ -5,7 +5,7 @@ import net.minecraft.world.entity.item.ItemEntity; import net.minecraft.world.level.Level; -public class ParticlesUtils { +public final class ParticleUtils { private static final int PARTICLE_COUNT = 20; // Number of particles to spawn private static final double PARTICLE_RADIUS = 0.5; // Radius of the sphere around the item diff --git a/src/main/resources/data/nautec/loot_table/chests/geode_rusty_crate.json b/src/main/resources/data/nautec/loot_table/chests/geode_rusty_crate.json index 479dd7f6..cadc4bfc 100644 --- a/src/main/resources/data/nautec/loot_table/chests/geode_rusty_crate.json +++ b/src/main/resources/data/nautec/loot_table/chests/geode_rusty_crate.json @@ -25,7 +25,7 @@ "functions": [ { "function": "minecraft:set_count", - "count": 1, + "count": 1 } ] },