9
0
mirror of https://github.com/Xiao-MoMi/Custom-Fishing.git synced 2026-01-04 15:41:35 +00:00

Fix particle on 1.20.5+

This commit is contained in:
XiaoMoMi
2024-07-18 23:59:15 +08:00
parent 291ce601c4
commit 076e799016
6 changed files with 53 additions and 51 deletions

View File

@@ -40,8 +40,6 @@ public class MechanicType {
public static final MechanicType BAIT = of("bait");
public static final MechanicType HOOK = of("hook");
public static final MechanicType TOTEM = of("totem");
public static final MechanicType ENTITY = of("entity");
public static final MechanicType BLOCK = of("block");
public static final MechanicType ENCHANT = of("enchant");
private final String type;
@@ -74,7 +72,7 @@ public class MechanicType {
return new MechanicType(type);
}
private static final MechanicType[] VALUES = new MechanicType[]{LOOT, ROD, UTIL, BAIT, HOOK, TOTEM, ENCHANT, ENTITY, BLOCK};
private static final MechanicType[] VALUES = new MechanicType[]{LOOT, ROD, UTIL, BAIT, HOOK, TOTEM, ENCHANT};
/**
* Retrieves an array of all predefined mechanic types.

View File

@@ -114,7 +114,7 @@ public class BlockConfigParser {
public EventCarrier getEventCarrier() {
EventCarrier.Builder builder = EventCarrier.builder()
.id(id)
.type(MechanicType.BLOCK);
.type(MechanicType.LOOT);
for (Consumer<EventCarrier.Builder> consumer : eventBuilderConsumers) {
consumer.accept(builder);
}

View File

@@ -45,7 +45,7 @@ public class ConfigType {
public static final ConfigType ENTITY = of(
"entity",
(id, section, functions) -> {
MechanicType.register(id, MechanicType.ENTITY);
MechanicType.register(id, MechanicType.LOOT);
EntityConfigParser config = new EntityConfigParser(id, section, functions);
BukkitCustomFishingPlugin.getInstance().getEntityManager().registerEntity(config.getEntity());
BukkitCustomFishingPlugin.getInstance().getLootManager().registerLoot(config.getLoot());
@@ -56,7 +56,7 @@ public class ConfigType {
public static final ConfigType BLOCK = of(
"block",
(id, section, functions) -> {
MechanicType.register(id, MechanicType.BLOCK);
MechanicType.register(id, MechanicType.LOOT);
BlockConfigParser config = new BlockConfigParser(id, section, functions);
BukkitCustomFishingPlugin.getInstance().getBlockManager().registerBlock(config.getBlock());
BukkitCustomFishingPlugin.getInstance().getLootManager().registerLoot(config.getLoot());

View File

@@ -114,7 +114,7 @@ public class EntityConfigParser {
public EventCarrier getEventCarrier() {
EventCarrier.Builder builder = EventCarrier.builder()
.id(id)
.type(MechanicType.ENTITY);
.type(MechanicType.LOOT);
for (Consumer<EventCarrier.Builder> consumer : eventBuilderConsumers) {
consumer.accept(builder);
}