From 70995f4388722bdf194f4f78982b81acc33045e8 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Mon, 4 Nov 2024 22:18:45 +0100 Subject: [PATCH] remove enchantment for a bit since it requires a bunch of changes closes #371 --- .../de/ellpeck/naturesaura/enchant/ModEnchantments.java | 4 ++-- .../java/de/ellpeck/naturesaura/items/ItemAuraCache.java | 9 ++++----- .../java/de/ellpeck/naturesaura/reg/ModRegistry.java | 5 ++--- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/main/java/de/ellpeck/naturesaura/enchant/ModEnchantments.java b/src/main/java/de/ellpeck/naturesaura/enchant/ModEnchantments.java index 4c673c6e..6158bf3a 100644 --- a/src/main/java/de/ellpeck/naturesaura/enchant/ModEnchantments.java +++ b/src/main/java/de/ellpeck/naturesaura/enchant/ModEnchantments.java @@ -1,4 +1,4 @@ -package de.ellpeck.naturesaura.enchant; +/*package de.ellpeck.naturesaura.enchant; import net.minecraft.core.Holder; import net.minecraft.server.ReloadableServerRegistries; @@ -8,4 +8,4 @@ public final class ModEnchantments { public static Holder AURA_MENDING; -} +}*/ diff --git a/src/main/java/de/ellpeck/naturesaura/items/ItemAuraCache.java b/src/main/java/de/ellpeck/naturesaura/items/ItemAuraCache.java index a40f27ac..cd9a42be 100644 --- a/src/main/java/de/ellpeck/naturesaura/items/ItemAuraCache.java +++ b/src/main/java/de/ellpeck/naturesaura/items/ItemAuraCache.java @@ -2,15 +2,12 @@ package de.ellpeck.naturesaura.items; import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.math.Axis; -import de.ellpeck.naturesaura.Helper; import de.ellpeck.naturesaura.api.NaturesAuraAPI; import de.ellpeck.naturesaura.api.render.ITrinketItem; -import de.ellpeck.naturesaura.enchant.ModEnchantments; import de.ellpeck.naturesaura.reg.ICustomCreativeTab; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.texture.OverlayTexture; -import net.minecraft.core.Holder; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EquipmentSlot; import net.minecraft.world.entity.player.Player; @@ -41,12 +38,14 @@ public class ItemAuraCache extends ItemImpl implements ITrinketItem, ICustomCrea if (recharge != null) { if (recharge.rechargeFromContainer(container, itemSlot, i, player.getInventory().selected == i)) break; - } else if (stack.getEnchantmentLevel(ModEnchantments.AURA_MENDING) > 0) { + } + // TODO fix enchantments, https://gist.github.com/ChampionAsh5357/d895a7b1a34341e19c80870720f9880f#the-enchantment-datapack-object + /*else if (stack.getEnchantmentLevel(ModEnchantments.AURA_MENDING) > 0) { var mainSize = player.getInventory().items.size(); var isArmor = i >= mainSize && i < mainSize + player.getInventory().armor.size(); if ((isArmor || player.getInventory().selected == i) && Helper.rechargeAuraItem(stack, container, 1000)) break; - } + }*/ } } diff --git a/src/main/java/de/ellpeck/naturesaura/reg/ModRegistry.java b/src/main/java/de/ellpeck/naturesaura/reg/ModRegistry.java index 312eb529..8da3a437 100644 --- a/src/main/java/de/ellpeck/naturesaura/reg/ModRegistry.java +++ b/src/main/java/de/ellpeck/naturesaura/reg/ModRegistry.java @@ -12,7 +12,6 @@ import de.ellpeck.naturesaura.blocks.tiles.BlockEntityImpl; import de.ellpeck.naturesaura.blocks.tiles.ModBlockEntities; import de.ellpeck.naturesaura.compat.Compat; import de.ellpeck.naturesaura.compat.patchouli.PatchouliCompat; -import de.ellpeck.naturesaura.enchant.ModEnchantments; import de.ellpeck.naturesaura.entities.*; import de.ellpeck.naturesaura.gen.LevelGenAncientTree; import de.ellpeck.naturesaura.gen.LevelGenAuraBloom; @@ -273,7 +272,7 @@ public final class ModRegistry { Helper.populateObjectHolders(ModContainers.class, event.getRegistry(), false); }); - event.register(Registries.ENCHANTMENT, h -> { +/* event.register(Registries.ENCHANTMENT, h -> { h.register(ResourceLocation.fromNamespaceAndPath(NaturesAura.MOD_ID, "aura_mending"), Enchantment.enchantment( Enchantment.definition( HolderSet.direct(BuiltInRegistries.ITEM.holders().filter(i -> new ItemStack(i).getCapability(NaturesAuraAPI.AURA_RECHARGE_CAPABILITY) == null).toList()), @@ -281,7 +280,7 @@ public final class ModRegistry { 5, 1, Enchantment.dynamicCost(5, 8), Enchantment.dynamicCost(55, 8), 2, EquipmentSlotGroup.ANY) ).build(ResourceLocation.fromNamespaceAndPath(NaturesAura.MOD_ID, "aura_mending"))); Helper.populateObjectHolders(ModEnchantments.class, event.getRegistry(), true); - }); + });*/ event.register(Registries.ENTITY_TYPE, h -> { h.register(ResourceLocation.fromNamespaceAndPath(NaturesAura.MOD_ID, "mover_cart"), EntityType.Builder