mirror of
https://github.com/Xiao-MoMi/craft-engine.git
synced 2025-12-25 01:49:30 +00:00
修复worldedit实体复制
This commit is contained in:
@@ -323,8 +323,9 @@ public class BukkitFurnitureManager extends AbstractFurnitureManager {
|
||||
if (FastNMS.INSTANCE.method$CraftEntity$getHandle(shulker) instanceof CollisionEntity) {
|
||||
return;
|
||||
}
|
||||
// not a collision entity
|
||||
Byte flag = shulker.getPersistentDataContainer().get(FURNITURE_COLLISION, PersistentDataType.BYTE);
|
||||
if (flag != null && flag == 1) {
|
||||
if (flag == null || flag != 1) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ public class FurnitureEventListener implements Listener {
|
||||
if (entity instanceof ItemDisplay itemDisplay) {
|
||||
this.manager.handleBaseEntityLoadLate(itemDisplay, 0);
|
||||
} else if (entity instanceof Shulker shulker) {
|
||||
//this.manager.handleCollisionEntityLoadLate(shulker, 0);
|
||||
this.manager.handleCollisionEntityLoadLate(shulker, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package net.momirealms.craftengine.bukkit.plugin.command.feature;
|
||||
|
||||
import net.momirealms.craftengine.bukkit.nms.CollisionEntity;
|
||||
import net.momirealms.craftengine.bukkit.nms.FastNMS;
|
||||
import net.momirealms.craftengine.bukkit.entity.furniture.BukkitFurnitureManager;
|
||||
import net.momirealms.craftengine.bukkit.plugin.command.BukkitCommandFeature;
|
||||
import net.momirealms.craftengine.core.plugin.CraftEngine;
|
||||
import net.momirealms.craftengine.core.plugin.command.CraftEngineCommandManager;
|
||||
@@ -9,6 +8,8 @@ import org.bukkit.Location;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.entity.Shulker;
|
||||
import org.bukkit.persistence.PersistentDataType;
|
||||
import org.incendo.cloud.Command;
|
||||
|
||||
import java.util.Collection;
|
||||
@@ -29,7 +30,7 @@ public class TestCommand extends BukkitCommandFeature<CommandSender> {
|
||||
try {
|
||||
Collection<Entity> entities = player.getLocation().getNearbyEntities(2,2,2);
|
||||
for (Entity entity : entities) {
|
||||
if (FastNMS.INSTANCE.method$CraftEntity$getHandle(entity) instanceof CollisionEntity) {
|
||||
if (entity instanceof Shulker) {
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
||||
@@ -3,7 +3,7 @@ org.gradle.jvmargs=-Xmx1G
|
||||
# Project settings
|
||||
# Rule: [major update].[feature update].[bug fix]
|
||||
project_version=0.0.46
|
||||
config_version=22
|
||||
config_version=23
|
||||
lang_version=4
|
||||
project_group=net.momirealms
|
||||
latest_supported_version=1.21.5
|
||||
@@ -51,7 +51,7 @@ byte_buddy_version=1.17.5
|
||||
ahocorasick_version=0.6.3
|
||||
snake_yaml_version=2.4
|
||||
anti_grief_version=0.13
|
||||
nms_helper_version=0.44.2
|
||||
nms_helper_version=0.45
|
||||
# Ignite Dependencies
|
||||
mixinextras_version=0.4.1
|
||||
mixin_version=0.15.2+mixin.0.8.7
|
||||
|
||||
Reference in New Issue
Block a user