mirror of
https://github.com/Xiao-MoMi/craft-engine.git
synced 2025-12-26 10:29:20 +00:00
允许重叠的物品
This commit is contained in:
@@ -44,7 +44,8 @@ public class BukkitWorld implements World {
|
||||
@Override
|
||||
public WorldHeight worldHeight() {
|
||||
if (this.worldHeight == null) {
|
||||
this.worldHeight = WorldHeight.create(platformWorld().getMinHeight(), platformWorld().getMaxHeight() - platformWorld().getMinHeight());
|
||||
org.bukkit.World bWorld = platformWorld();
|
||||
this.worldHeight = WorldHeight.create(bWorld.getMinHeight(), bWorld.getMaxHeight() - bWorld.getMinHeight());
|
||||
}
|
||||
return this.worldHeight;
|
||||
}
|
||||
|
||||
@@ -72,6 +72,8 @@ categories:
|
||||
- default:solid_gunpowder_block
|
||||
- default:ender_pearl_flower_seeds
|
||||
- default:gui_head_size_1
|
||||
- default:gui_head_size_4
|
||||
- minecraft:air
|
||||
- default:copper_coil
|
||||
- default:flame_elytra
|
||||
- default:cap
|
||||
@@ -79,5 +81,6 @@ categories:
|
||||
- default:chessboard_block
|
||||
- default:safe_block
|
||||
- default:sofa
|
||||
- default:connectable_sofa
|
||||
- default:gui_head_size_4
|
||||
- minecraft:air
|
||||
- minecraft:air
|
||||
- default:connectable_sofa
|
||||
@@ -26,9 +26,7 @@ public class Category implements Comparable<Category> {
|
||||
}
|
||||
|
||||
public void addMember(String member) {
|
||||
if (!this.members.contains(member)) {
|
||||
this.members.add(member);
|
||||
}
|
||||
this.members.add(member);
|
||||
}
|
||||
|
||||
public Key id() {
|
||||
|
||||
@@ -114,7 +114,7 @@ public class ItemBrowserManagerImpl implements ItemBrowserManager {
|
||||
List<String> members = MiscUtils.getAsStringList(section.getOrDefault("list", List.of()));
|
||||
Key icon = Key.of(section.getOrDefault("icon", ItemKeys.STONE).toString());
|
||||
int priority = ResourceConfigUtils.getAsInt(section.getOrDefault("priority", 0), "priority");
|
||||
Category category = new Category(id, name, MiscUtils.getAsStringList(section.getOrDefault("lore", List.of())), icon, members.stream().distinct().toList(), priority,
|
||||
Category category = new Category(id, name, MiscUtils.getAsStringList(section.getOrDefault("lore", List.of())), icon, new ArrayList<>(members), priority,
|
||||
ResourceConfigUtils.getAsBoolean(section.getOrDefault("hidden", false), "hidden"));
|
||||
if (ItemBrowserManagerImpl.this.byId.containsKey(id)) {
|
||||
ItemBrowserManagerImpl.this.byId.get(id).merge(category);
|
||||
|
||||
Reference in New Issue
Block a user