From 58e4fd5ba95f740640ef46ead88d417ed73d880d Mon Sep 17 00:00:00 2001 From: Sollace Date: Fri, 20 Aug 2021 22:25:46 +0200 Subject: [PATCH] Moved tree stuff to its own package --- src/main/java/com/minelittlepony/unicopia/Unicopia.java | 1 + .../minelittlepony/unicopia/ability/EarthPonyKickAbility.java | 2 +- .../unicopia/{ => ability/data/tree}/TreeType.java | 2 +- .../unicopia/{ => ability/data/tree}/TreeTypeLoader.java | 4 ++-- .../unicopia/item/enchantment/PoisonedJokeEnchantment.java | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) rename src/main/java/com/minelittlepony/unicopia/{ => ability/data/tree}/TreeType.java (99%) rename src/main/java/com/minelittlepony/unicopia/{ => ability/data/tree}/TreeTypeLoader.java (96%) diff --git a/src/main/java/com/minelittlepony/unicopia/Unicopia.java b/src/main/java/com/minelittlepony/unicopia/Unicopia.java index 6f4fdfc6..2101f7b3 100644 --- a/src/main/java/com/minelittlepony/unicopia/Unicopia.java +++ b/src/main/java/com/minelittlepony/unicopia/Unicopia.java @@ -10,6 +10,7 @@ import java.util.Optional; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import com.minelittlepony.unicopia.ability.data.tree.TreeTypeLoader; import com.minelittlepony.unicopia.advancement.UCriteria; import com.minelittlepony.unicopia.command.Commands; import com.minelittlepony.unicopia.entity.effect.UPotions; diff --git a/src/main/java/com/minelittlepony/unicopia/ability/EarthPonyKickAbility.java b/src/main/java/com/minelittlepony/unicopia/ability/EarthPonyKickAbility.java index b41a55a9..667511be 100644 --- a/src/main/java/com/minelittlepony/unicopia/ability/EarthPonyKickAbility.java +++ b/src/main/java/com/minelittlepony/unicopia/ability/EarthPonyKickAbility.java @@ -7,9 +7,9 @@ import org.jetbrains.annotations.Nullable; import com.google.common.collect.Lists; import com.minelittlepony.unicopia.BlockDestructionManager; import com.minelittlepony.unicopia.Race; -import com.minelittlepony.unicopia.TreeType; import com.minelittlepony.unicopia.ability.data.Hit; import com.minelittlepony.unicopia.ability.data.Pos; +import com.minelittlepony.unicopia.ability.data.tree.TreeType; import com.minelittlepony.unicopia.entity.player.Pony; import com.minelittlepony.unicopia.util.PosHelper; import com.minelittlepony.unicopia.util.RayTraceHelper; diff --git a/src/main/java/com/minelittlepony/unicopia/TreeType.java b/src/main/java/com/minelittlepony/unicopia/ability/data/tree/TreeType.java similarity index 99% rename from src/main/java/com/minelittlepony/unicopia/TreeType.java rename to src/main/java/com/minelittlepony/unicopia/ability/data/tree/TreeType.java index a37471fa..f629d108 100644 --- a/src/main/java/com/minelittlepony/unicopia/TreeType.java +++ b/src/main/java/com/minelittlepony/unicopia/ability/data/tree/TreeType.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia; +package com.minelittlepony.unicopia.ability.data.tree; import com.minelittlepony.unicopia.util.PosHelper; import com.minelittlepony.unicopia.util.Weighted; diff --git a/src/main/java/com/minelittlepony/unicopia/TreeTypeLoader.java b/src/main/java/com/minelittlepony/unicopia/ability/data/tree/TreeTypeLoader.java similarity index 96% rename from src/main/java/com/minelittlepony/unicopia/TreeTypeLoader.java rename to src/main/java/com/minelittlepony/unicopia/ability/data/tree/TreeTypeLoader.java index c4c91f06..8f38390c 100644 --- a/src/main/java/com/minelittlepony/unicopia/TreeTypeLoader.java +++ b/src/main/java/com/minelittlepony/unicopia/ability/data/tree/TreeTypeLoader.java @@ -1,4 +1,4 @@ -package com.minelittlepony.unicopia; +package com.minelittlepony.unicopia.ability.data.tree; import java.util.HashSet; import java.util.Map; @@ -29,7 +29,7 @@ public class TreeTypeLoader extends JsonDataLoader implements IdentifiableResour .registerTypeAdapter(Identifier.class, new ToStringAdapter<>(Identifier::new)) .create(); - static final TreeTypeLoader INSTANCE = new TreeTypeLoader(); + public static final TreeTypeLoader INSTANCE = new TreeTypeLoader(); private final Set entries = new HashSet<>(); diff --git a/src/main/java/com/minelittlepony/unicopia/item/enchantment/PoisonedJokeEnchantment.java b/src/main/java/com/minelittlepony/unicopia/item/enchantment/PoisonedJokeEnchantment.java index 4c4bdcb9..ee76f65a 100644 --- a/src/main/java/com/minelittlepony/unicopia/item/enchantment/PoisonedJokeEnchantment.java +++ b/src/main/java/com/minelittlepony/unicopia/item/enchantment/PoisonedJokeEnchantment.java @@ -14,8 +14,8 @@ import java.util.stream.Stream; import org.apache.commons.lang3.reflect.TypeUtils; import com.google.gson.JsonParseException; -import com.minelittlepony.unicopia.TreeTypeLoader; import com.minelittlepony.unicopia.Unicopia; +import com.minelittlepony.unicopia.ability.data.tree.TreeTypeLoader; import com.minelittlepony.unicopia.entity.Living; import net.fabricmc.fabric.api.resource.IdentifiableResourceReloadListener;