Skip to content

Commit

Permalink
Fixed #206 #207
Browse files Browse the repository at this point in the history
  • Loading branch information
wdog5 committed Jan 7, 2024
1 parent e3e3e10 commit 4883fcb
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/main/java/com/mohistmc/banner/fabric/BukkitRegistry.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import net.minecraft.world.effect.MobEffect;
import net.minecraft.world.effect.MobEffectInstance;
import net.minecraft.world.entity.MobCategory;
import net.minecraft.world.entity.Pose;
import net.minecraft.world.entity.boss.enderdragon.phases.EnderDragonPhase;
import net.minecraft.world.entity.npc.VillagerProfession;
import net.minecraft.world.item.Item;
Expand Down Expand Up @@ -99,6 +100,7 @@ public static void registerAll(DedicatedServer console) {
loadEntities();
loadVillagerProfessions();
loadBiomes(console);
loadPoses();
loadArts();
loadStats();
loadSpawnCategory();
Expand Down Expand Up @@ -230,6 +232,18 @@ private static void loadStats() {
}
}

private static void loadPoses() {
var newTypes = new ArrayList<org.bukkit.entity.Pose>();
for (Pose pose : Pose.values()) {
if (pose.ordinal() > 14) {
org.bukkit.entity.Pose bukkit = MohistDynamEnum.addEnum(org.bukkit.entity.Pose.class, pose.name());
newTypes.add(bukkit);
BannerServer.LOGGER.debug("Registered mod Pose as Poses(Bukkit) {}", bukkit);
}
}
BannerServer.LOGGER.info("Registered {} new Poses", newTypes.size());
}

private static void loadArts() {
int i = Art.values().length;
var registry = BuiltInRegistries.PAINTING_VARIANT;
Expand Down

0 comments on commit 4883fcb

Please sign in to comment.