Search in sources :

Example 11 with Entity

use of net.minecraft.world.entity.Entity in project Denizen-For-Bukkit by DenizenScript.

the class DenizenNetworkManagerImpl method processDisguiseForPacket.

public boolean processDisguiseForPacket(Packet<?> packet, GenericFutureListener<? extends Future<? super Void>> genericfuturelistener) {
    if (DisguiseCommand.disguises.isEmpty() || antiDuplicate) {
        return false;
    }
    try {
        if (packet instanceof ClientboundSetEntityDataPacket) {
            ClientboundSetEntityDataPacket metadataPacket = (ClientboundSetEntityDataPacket) packet;
            int eid = metadataPacket.getId();
            Entity ent = player.level.getEntity(eid);
            if (ent == null) {
                return false;
            }
            HashMap<UUID, DisguiseCommand.TrackedDisguise> playerMap = DisguiseCommand.disguises.get(ent.getUUID());
            if (playerMap == null) {
                return false;
            }
            DisguiseCommand.TrackedDisguise disguise = playerMap.get(player.getUUID());
            if (disguise == null) {
                disguise = playerMap.get(null);
                if (disguise == null) {
                    return false;
                }
            }
            if (ent.getId() == player.getId()) {
                if (!disguise.shouldFake) {
                    return false;
                }
                List<SynchedEntityData.DataItem<?>> data = metadataPacket.getUnpackedData();
                for (SynchedEntityData.DataItem item : data) {
                    EntityDataAccessor<?> watcherObject = item.getAccessor();
                    int watcherId = watcherObject.getId();
                    if (watcherId == 0) {
                        // Entity flags
                        ClientboundSetEntityDataPacket altPacket = new ClientboundSetEntityDataPacket(copyPacket(metadataPacket));
                        data = new ArrayList<>(data);
                        ENTITY_METADATA_LIST.set(altPacket, data);
                        data.remove(item);
                        byte flags = (byte) item.getValue();
                        // Invisible flag
                        flags |= 0x20;
                        data.add(new SynchedEntityData.DataItem(watcherObject, flags));
                        ClientboundSetEntityDataPacket updatedPacket = getModifiedMetadataFor(altPacket);
                        oldManager.send(updatedPacket == null ? altPacket : updatedPacket, genericfuturelistener);
                        return true;
                    }
                }
            } else {
                ClientboundSetEntityDataPacket altPacket = new ClientboundSetEntityDataPacket(ent.getId(), ((CraftEntity) disguise.toOthers.entity.entity).getHandle().getEntityData(), true);
                oldManager.send(altPacket, genericfuturelistener);
                return true;
            }
            return false;
        }
        int ider = -1;
        if (packet instanceof ClientboundAddPlayerPacket) {
            ider = ((ClientboundAddPlayerPacket) packet).getEntityId();
        } else if (packet instanceof ClientboundAddEntityPacket) {
            ider = ((ClientboundAddEntityPacket) packet).getId();
        } else if (packet instanceof ClientboundAddMobPacket) {
            ider = ((ClientboundAddMobPacket) packet).getId();
        }
        if (ider != -1) {
            Entity e = player.getLevel().getEntity(ider);
            if (e == null) {
                return false;
            }
            HashMap<UUID, DisguiseCommand.TrackedDisguise> playerMap = DisguiseCommand.disguises.get(e.getUUID());
            if (playerMap == null) {
                return false;
            }
            DisguiseCommand.TrackedDisguise disguise = playerMap.get(player.getUUID());
            if (disguise == null) {
                disguise = playerMap.get(null);
                if (disguise == null) {
                    return false;
                }
            }
            antiDuplicate = true;
            disguise.sendTo(Collections.singletonList(new PlayerTag(player.getBukkitEntity())));
            antiDuplicate = false;
            return true;
        }
    } catch (Throwable ex) {
        antiDuplicate = false;
        Debug.echoError(ex);
    }
    return false;
}
Also used : CraftEntity(org.bukkit.craftbukkit.v1_17_R1.entity.CraftEntity) Entity(net.minecraft.world.entity.Entity) DisguiseCommand(com.denizenscript.denizen.scripts.commands.player.DisguiseCommand) SynchedEntityData(net.minecraft.network.syncher.SynchedEntityData) PlayerTag(com.denizenscript.denizen.objects.PlayerTag) CraftEntity(org.bukkit.craftbukkit.v1_17_R1.entity.CraftEntity)

Example 12 with Entity

use of net.minecraft.world.entity.Entity in project Denizen-For-Bukkit by DenizenScript.

the class DenizenNetworkManagerImpl method tryProcessVelocityPacketForAttach.

public void tryProcessVelocityPacketForAttach(ClientboundSetEntityMotionPacket packet, Entity e) throws IllegalAccessException {
    EntityAttachmentHelper.EntityAttachedToMap attList = EntityAttachmentHelper.toEntityToData.get(e.getUUID());
    if (attList != null) {
        for (EntityAttachmentHelper.PlayerAttachMap attMap : attList.attachedToMap.values()) {
            EntityAttachmentHelper.AttachmentData att = attMap.getAttachment(player.getUUID());
            if (attMap.attached.isValid() && att != null) {
                ClientboundSetEntityMotionPacket pNew = new ClientboundSetEntityMotionPacket(copyPacket(packet));
                ENTITY_ID_PACKVELENT.setInt(pNew, att.attached.getBukkitEntity().getEntityId());
                if (NMSHandler.debugPackets) {
                    doPacketOutput("Attach Velocity Packet: " + pNew.getClass().getCanonicalName() + " for " + att.attached.getUUID() + " sent to " + player.getScoreboardName());
                }
                oldManager.send(pNew);
            }
        }
    }
    if (e.passengers != null && !e.passengers.isEmpty()) {
        for (Entity ent : e.passengers) {
            tryProcessVelocityPacketForAttach(packet, ent);
        }
    }
}
Also used : LivingEntity(org.bukkit.entity.LivingEntity) FakeEntity(com.denizenscript.denizen.utilities.entity.FakeEntity) Entity(net.minecraft.world.entity.Entity) CraftEntity(org.bukkit.craftbukkit.v1_18_R1.entity.CraftEntity) EntityAttachmentHelper(com.denizenscript.denizen.utilities.entity.EntityAttachmentHelper)

Example 13 with Entity

use of net.minecraft.world.entity.Entity in project Denizen-For-Bukkit by DenizenScript.

the class DenizenNetworkManagerImpl method processEquipmentForPacket.

public boolean processEquipmentForPacket(Packet<?> packet, GenericFutureListener<? extends Future<? super Void>> genericfuturelistener) {
    if (FakeEquipCommand.overrides.isEmpty()) {
        return false;
    }
    try {
        if (packet instanceof ClientboundSetEquipmentPacket) {
            int eid = ((ClientboundSetEquipmentPacket) packet).getEntity();
            Entity ent = player.level.getEntity(eid);
            if (ent == null) {
                return false;
            }
            FakeEquipCommand.EquipmentOverride override = FakeEquipCommand.getOverrideFor(ent.getUUID(), player.getBukkitEntity());
            if (override == null) {
                return false;
            }
            List<Pair<net.minecraft.world.entity.EquipmentSlot, ItemStack>> equipment = new ArrayList<>(((ClientboundSetEquipmentPacket) packet).getSlots());
            ClientboundSetEquipmentPacket newPacket = new ClientboundSetEquipmentPacket(eid, equipment);
            for (int i = 0; i < equipment.size(); i++) {
                Pair<net.minecraft.world.entity.EquipmentSlot, ItemStack> pair = equipment.get(i);
                ItemStack use = pair.getSecond();
                switch(pair.getFirst()) {
                    case MAINHAND:
                        use = override.hand == null ? use : CraftItemStack.asNMSCopy(override.hand.getItemStack());
                        break;
                    case OFFHAND:
                        use = override.offhand == null ? use : CraftItemStack.asNMSCopy(override.offhand.getItemStack());
                        break;
                    case CHEST:
                        use = override.chest == null ? use : CraftItemStack.asNMSCopy(override.chest.getItemStack());
                        break;
                    case HEAD:
                        use = override.head == null ? use : CraftItemStack.asNMSCopy(override.head.getItemStack());
                        break;
                    case LEGS:
                        use = override.legs == null ? use : CraftItemStack.asNMSCopy(override.legs.getItemStack());
                        break;
                    case FEET:
                        use = override.boots == null ? use : CraftItemStack.asNMSCopy(override.boots.getItemStack());
                        break;
                }
                equipment.set(i, new Pair<>(pair.getFirst(), use));
            }
            oldManager.send(newPacket, genericfuturelistener);
            return true;
        } else if (packet instanceof ClientboundEntityEventPacket) {
            Entity ent = ((ClientboundEntityEventPacket) packet).getEntity(player.level);
            if (!(ent instanceof net.minecraft.world.entity.LivingEntity)) {
                return false;
            }
            FakeEquipCommand.EquipmentOverride override = FakeEquipCommand.getOverrideFor(ent.getUUID(), player.getBukkitEntity());
            if (override == null || (override.hand == null && override.offhand == null)) {
                return false;
            }
            if (((ClientboundEntityEventPacket) packet).getEventId() != (byte) 55) {
                return false;
            }
            List<Pair<net.minecraft.world.entity.EquipmentSlot, ItemStack>> equipment = new ArrayList<>();
            ItemStack hand = override.hand != null ? CraftItemStack.asNMSCopy(override.hand.getItemStack()) : ((net.minecraft.world.entity.LivingEntity) ent).getMainHandItem();
            ItemStack offhand = override.offhand != null ? CraftItemStack.asNMSCopy(override.offhand.getItemStack()) : ((net.minecraft.world.entity.LivingEntity) ent).getOffhandItem();
            equipment.add(new Pair<>(net.minecraft.world.entity.EquipmentSlot.MAINHAND, hand));
            equipment.add(new Pair<>(net.minecraft.world.entity.EquipmentSlot.OFFHAND, offhand));
            ClientboundSetEquipmentPacket newPacket = new ClientboundSetEquipmentPacket(ent.getId(), equipment);
            oldManager.send(newPacket, genericfuturelistener);
            return true;
        } else if (packet instanceof ClientboundContainerSetContentPacket) {
            FakeEquipCommand.EquipmentOverride override = FakeEquipCommand.getOverrideFor(player.getUUID(), player.getBukkitEntity());
            if (override == null) {
                return false;
            }
            int window = ((ClientboundContainerSetContentPacket) packet).getContainerId();
            if (window != 0) {
                return false;
            }
            NonNullList<ItemStack> items = (NonNullList<ItemStack>) ((ClientboundContainerSetContentPacket) packet).getItems();
            if (override.head != null) {
                items.set(5, CraftItemStack.asNMSCopy(override.head.getItemStack()));
            }
            if (override.chest != null) {
                items.set(6, CraftItemStack.asNMSCopy(override.chest.getItemStack()));
            }
            if (override.legs != null) {
                items.set(7, CraftItemStack.asNMSCopy(override.legs.getItemStack()));
            }
            if (override.boots != null) {
                items.set(8, CraftItemStack.asNMSCopy(override.boots.getItemStack()));
            }
            if (override.offhand != null) {
                items.set(45, CraftItemStack.asNMSCopy(override.offhand.getItemStack()));
            }
            if (override.hand != null) {
                items.set(player.getInventory().selected + 36, CraftItemStack.asNMSCopy(override.hand.getItemStack()));
            }
            ClientboundContainerSetContentPacket newPacket = new ClientboundContainerSetContentPacket(window, ((ClientboundContainerSetContentPacket) packet).getStateId(), items, ((ClientboundContainerSetContentPacket) packet).getCarriedItem());
            oldManager.send(newPacket, genericfuturelistener);
            return true;
        } else if (packet instanceof ClientboundContainerSetSlotPacket) {
            FakeEquipCommand.EquipmentOverride override = FakeEquipCommand.getOverrideFor(player.getUUID(), player.getBukkitEntity());
            if (override == null) {
                return false;
            }
            int window = ((ClientboundContainerSetSlotPacket) packet).getContainerId();
            if (window != 0) {
                return false;
            }
            int slot = ((ClientboundContainerSetSlotPacket) packet).getSlot();
            org.bukkit.inventory.ItemStack item = null;
            if (slot == 5 && override.head != null) {
                item = override.head.getItemStack();
            } else if (slot == 6 && override.chest != null) {
                item = override.chest.getItemStack();
            } else if (slot == 7 && override.legs != null) {
                item = override.legs.getItemStack();
            } else if (slot == 8 && override.boots != null) {
                item = override.boots.getItemStack();
            } else if (slot == 45 && override.offhand != null) {
                item = override.offhand.getItemStack();
            } else if (slot == player.getInventory().selected + 36 && override.hand != null) {
                item = override.hand.getItemStack();
            }
            if (item == null) {
                return false;
            }
            ClientboundContainerSetSlotPacket newPacket = new ClientboundContainerSetSlotPacket(window, ((ClientboundContainerSetSlotPacket) packet).getStateId(), slot, CraftItemStack.asNMSCopy(item));
            oldManager.send(newPacket, genericfuturelistener);
            return true;
        }
    } catch (Throwable ex) {
        Debug.echoError(ex);
    }
    return false;
}
Also used : LivingEntity(org.bukkit.entity.LivingEntity) FakeEntity(com.denizenscript.denizen.utilities.entity.FakeEntity) Entity(net.minecraft.world.entity.Entity) CraftEntity(org.bukkit.craftbukkit.v1_18_R1.entity.CraftEntity) LivingEntity(org.bukkit.entity.LivingEntity) FakeEquipCommand(com.denizenscript.denizen.scripts.commands.entity.FakeEquipCommand) NonNullList(net.minecraft.core.NonNullList) Pair(com.mojang.datafixers.util.Pair) NonNullList(net.minecraft.core.NonNullList) CraftItemStack(org.bukkit.craftbukkit.v1_18_R1.inventory.CraftItemStack) ItemStack(net.minecraft.world.item.ItemStack)

Example 14 with Entity

use of net.minecraft.world.entity.Entity in project Denizen-For-Bukkit by DenizenScript.

the class DenizenNetworkManagerImpl method tryProcessMovePacketForAttach.

public void tryProcessMovePacketForAttach(ClientboundMoveEntityPacket packet, Entity e) throws IllegalAccessException {
    EntityAttachmentHelper.EntityAttachedToMap attList = EntityAttachmentHelper.toEntityToData.get(e.getUUID());
    if (attList != null) {
        for (EntityAttachmentHelper.PlayerAttachMap attMap : attList.attachedToMap.values()) {
            EntityAttachmentHelper.AttachmentData att = attMap.getAttachment(player.getUUID());
            if (attMap.attached.isValid() && att != null) {
                ClientboundMoveEntityPacket pNew;
                int newId = att.attached.getBukkitEntity().getEntityId();
                if (packet instanceof ClientboundMoveEntityPacket.Pos) {
                    pNew = new ClientboundMoveEntityPacket.Pos(newId, packet.getXa(), packet.getYa(), packet.getZa(), packet.isOnGround());
                } else if (packet instanceof ClientboundMoveEntityPacket.Rot) {
                    pNew = new ClientboundMoveEntityPacket.Rot(newId, packet.getyRot(), packet.getxRot(), packet.isOnGround());
                } else if (packet instanceof ClientboundMoveEntityPacket.PosRot) {
                    pNew = new ClientboundMoveEntityPacket.PosRot(newId, packet.getXa(), packet.getYa(), packet.getZa(), packet.getyRot(), packet.getxRot(), packet.isOnGround());
                } else {
                    if (Debug.verbose) {
                        Debug.echoError("Impossible move-entity packet class: " + packet.getClass().getCanonicalName());
                    }
                    return;
                }
                if (att.positionalOffset != null && (packet instanceof ClientboundMoveEntityPacket.Pos || packet instanceof ClientboundMoveEntityPacket.PosRot)) {
                    boolean isRotate = packet instanceof ClientboundMoveEntityPacket.PosRot;
                    byte yaw, pitch;
                    if (att.noRotate) {
                        Entity attachedEntity = ((CraftEntity) att.attached.getBukkitEntity()).getHandle();
                        yaw = EntityAttachmentHelper.compressAngle(attachedEntity.getYRot());
                        pitch = EntityAttachmentHelper.compressAngle(attachedEntity.getXRot());
                    } else if (isRotate) {
                        yaw = packet.getyRot();
                        pitch = packet.getxRot();
                    } else {
                        yaw = EntityAttachmentHelper.compressAngle(e.getYRot());
                        pitch = EntityAttachmentHelper.compressAngle(e.getXRot());
                    }
                    if (att.noPitch) {
                        Entity attachedEntity = ((CraftEntity) att.attached.getBukkitEntity()).getHandle();
                        pitch = EntityAttachmentHelper.compressAngle(attachedEntity.getXRot());
                    }
                    byte newYaw = yaw;
                    if (isRotate) {
                        newYaw = EntityAttachmentHelper.adaptedCompressedAngle(newYaw, att.positionalOffset.getYaw());
                        pitch = EntityAttachmentHelper.adaptedCompressedAngle(pitch, att.positionalOffset.getPitch());
                    }
                    Vector goalPosition = att.fixedForOffset(new Vector(e.getX(), e.getY(), e.getZ()), e.getYRot(), e.getXRot());
                    Vector oldPos = att.visiblePositions.get(player.getUUID());
                    boolean forceTele = false;
                    if (oldPos == null) {
                        oldPos = att.attached.getLocation().toVector();
                        forceTele = true;
                    }
                    Vector moveNeeded = goalPosition.clone().subtract(oldPos);
                    att.visiblePositions.put(player.getUUID(), goalPosition.clone());
                    int offX = (int) (moveNeeded.getX() * (32 * 128));
                    int offY = (int) (moveNeeded.getY() * (32 * 128));
                    int offZ = (int) (moveNeeded.getZ() * (32 * 128));
                    if (forceTele || offX < Short.MIN_VALUE || offX > Short.MAX_VALUE || offY < Short.MIN_VALUE || offY > Short.MAX_VALUE || offZ < Short.MIN_VALUE || offZ > Short.MAX_VALUE) {
                        ClientboundTeleportEntityPacket newTeleportPacket = new ClientboundTeleportEntityPacket(e);
                        ENTITY_ID_PACKTELENT.setInt(newTeleportPacket, att.attached.getBukkitEntity().getEntityId());
                        POS_X_PACKTELENT.setDouble(newTeleportPacket, goalPosition.getX());
                        POS_Y_PACKTELENT.setDouble(newTeleportPacket, goalPosition.getY());
                        POS_Z_PACKTELENT.setDouble(newTeleportPacket, goalPosition.getZ());
                        YAW_PACKTELENT.setByte(newTeleportPacket, newYaw);
                        PITCH_PACKTELENT.setByte(newTeleportPacket, pitch);
                        if (NMSHandler.debugPackets) {
                            doPacketOutput("Attach Move-Tele Packet: " + newTeleportPacket.getClass().getCanonicalName() + " for " + att.attached.getUUID() + " sent to " + player.getScoreboardName() + " with original yaw " + yaw + " adapted to " + newYaw);
                        }
                        oldManager.send(newTeleportPacket);
                    } else {
                        POS_X_PACKENT.setShort(pNew, (short) Mth.clamp(offX, Short.MIN_VALUE, Short.MAX_VALUE));
                        POS_Y_PACKENT.setShort(pNew, (short) Mth.clamp(offY, Short.MIN_VALUE, Short.MAX_VALUE));
                        POS_Z_PACKENT.setShort(pNew, (short) Mth.clamp(offZ, Short.MIN_VALUE, Short.MAX_VALUE));
                        if (isRotate) {
                            YAW_PACKENT.setByte(pNew, yaw);
                            PITCH_PACKENT.setByte(pNew, pitch);
                        }
                        if (NMSHandler.debugPackets) {
                            doPacketOutput("Attach Move Packet: " + pNew.getClass().getCanonicalName() + " for " + att.attached.getUUID() + " sent to " + player.getScoreboardName() + " with original yaw " + yaw + " adapted to " + newYaw);
                        }
                        oldManager.send(pNew);
                    }
                } else {
                    if (NMSHandler.debugPackets) {
                        doPacketOutput("Attach Replica-Move Packet: " + pNew.getClass().getCanonicalName() + " for " + att.attached.getUUID() + " sent to " + player.getScoreboardName());
                    }
                    oldManager.send(pNew);
                }
            }
        }
    }
    if (e.passengers != null && !e.passengers.isEmpty()) {
        for (Entity ent : e.passengers) {
            tryProcessMovePacketForAttach(packet, ent);
        }
    }
}
Also used : LivingEntity(org.bukkit.entity.LivingEntity) FakeEntity(com.denizenscript.denizen.utilities.entity.FakeEntity) Entity(net.minecraft.world.entity.Entity) CraftEntity(org.bukkit.craftbukkit.v1_18_R1.entity.CraftEntity) CraftEntity(org.bukkit.craftbukkit.v1_18_R1.entity.CraftEntity) SectionPos(net.minecraft.core.SectionPos) BlockPos(net.minecraft.core.BlockPos) EntityAttachmentHelper(com.denizenscript.denizen.utilities.entity.EntityAttachmentHelper) Vector(org.bukkit.util.Vector)

Example 15 with Entity

use of net.minecraft.world.entity.Entity in project Denizen-For-Bukkit by DenizenScript.

the class DenizenNetworkManagerImpl method processHiddenEntitiesForPacket.

public boolean processHiddenEntitiesForPacket(Packet<?> packet) {
    if (!HideEntitiesHelper.hasAnyHides()) {
        return false;
    }
    try {
        int ider = -1;
        Entity e = null;
        if (packet instanceof ClientboundAddPlayerPacket) {
            ider = ((ClientboundAddPlayerPacket) packet).getEntityId();
        } else if (packet instanceof ClientboundAddEntityPacket) {
            ider = ((ClientboundAddEntityPacket) packet).getId();
        } else if (packet instanceof ClientboundAddMobPacket) {
            ider = ((ClientboundAddMobPacket) packet).getId();
        } else if (packet instanceof ClientboundAddPaintingPacket) {
            ider = ((ClientboundAddPaintingPacket) packet).getId();
        } else if (packet instanceof ClientboundAddExperienceOrbPacket) {
            ider = ((ClientboundAddExperienceOrbPacket) packet).getId();
        } else if (packet instanceof ClientboundMoveEntityPacket) {
            e = ((ClientboundMoveEntityPacket) packet).getEntity(player.getLevel());
        } else if (packet instanceof ClientboundSetEntityDataPacket) {
            ider = ((ClientboundSetEntityDataPacket) packet).getId();
        } else if (packet instanceof ClientboundSetEntityMotionPacket) {
            ider = ((ClientboundSetEntityMotionPacket) packet).getId();
        } else if (packet instanceof ClientboundTeleportEntityPacket) {
            ider = ((ClientboundTeleportEntityPacket) packet).getId();
        }
        if (e == null && ider != -1) {
            e = player.getLevel().getEntity(ider);
        }
        if (e != null) {
            if (isHidden(e)) {
                return true;
            }
            if (packet instanceof ClientboundAddPlayerPacket || packet instanceof ClientboundAddEntityPacket || packet instanceof ClientboundAddMobPacket || packet instanceof ClientboundAddPaintingPacket || packet instanceof ClientboundAddExperienceOrbPacket) {
                processFakePlayerSpawn(e);
            }
        }
    } catch (Exception ex) {
        Debug.echoError(ex);
    }
    return false;
}
Also used : LivingEntity(org.bukkit.entity.LivingEntity) FakeEntity(com.denizenscript.denizen.utilities.entity.FakeEntity) Entity(net.minecraft.world.entity.Entity) CraftEntity(org.bukkit.craftbukkit.v1_18_R1.entity.CraftEntity)

Aggregations

Entity (net.minecraft.world.entity.Entity)22 CraftEntity (org.bukkit.craftbukkit.v1_17_R1.entity.CraftEntity)9 CraftEntity (org.bukkit.craftbukkit.v1_18_R1.entity.CraftEntity)9 FakeEntity (com.denizenscript.denizen.utilities.entity.FakeEntity)8 LivingEntity (org.bukkit.entity.LivingEntity)8 EntityAttachmentHelper (com.denizenscript.denizen.utilities.entity.EntityAttachmentHelper)6 SynchedEntityData (net.minecraft.network.syncher.SynchedEntityData)4 LivingEntity (net.minecraft.world.entity.LivingEntity)4 Vector (org.bukkit.util.Vector)4 EquipmentSlot (net.minecraft.world.entity.EquipmentSlot)3 ItemStack (net.minecraft.world.item.ItemStack)3 PlayerTag (com.denizenscript.denizen.objects.PlayerTag)2 FakeEquipCommand (com.denizenscript.denizen.scripts.commands.entity.FakeEquipCommand)2 DisguiseCommand (com.denizenscript.denizen.scripts.commands.player.DisguiseCommand)2 Pair (com.mojang.datafixers.util.Pair)2 BlockPos (net.minecraft.core.BlockPos)2 NonNullList (net.minecraft.core.NonNullList)2 SectionPos (net.minecraft.core.SectionPos)2 ResourceLocation (net.minecraft.resources.ResourceLocation)2 DamageSource (net.minecraft.world.damagesource.DamageSource)2