Search in sources :

Example 26 with StackFrame

use of org.spongepowered.api.event.CauseStackManager.StackFrame in project SpongeCommon by SpongePowered.

the class DropItemWithHotkeyState method createInventoryEvent.

@Override
public ClickInventoryEvent.Drop createInventoryEvent(EntityPlayerMP playerMP, Container openContainer, Transaction<ItemStackSnapshot> transaction, List<SlotTransaction> slotTransactions, List<Entity> capturedEntities, int usedButton) {
    try (StackFrame frame = Sponge.getCauseStackManager().pushCauseFrame()) {
        Sponge.getCauseStackManager().addContext(EventContextKeys.SPAWN_TYPE, SpawnTypes.DROPPED_ITEM);
        Sponge.getCauseStackManager().pushCause(openContainer);
        Sponge.getCauseStackManager().pushCause(playerMP);
        for (Entity currentEntity : capturedEntities) {
            currentEntity.setCreator(playerMP.getUniqueID());
        }
        // A 'primary click' is used by the game to indicate a single drop (e.g. pressing 'q' without holding
        // 'control')
        ClickInventoryEvent.Drop event = usedButton == PacketPhase.PACKET_BUTTON_PRIMARY_ID ? SpongeEventFactory.createClickInventoryEventDropSingle(Sponge.getCauseStackManager().getCurrentCause(), transaction, capturedEntities, openContainer, slotTransactions) : SpongeEventFactory.createClickInventoryEventDropFull(Sponge.getCauseStackManager().getCurrentCause(), transaction, capturedEntities, openContainer, slotTransactions);
        // the event call, somehow should not release this frame until after the event is posted
        return event;
    }
}
Also used : Entity(org.spongepowered.api.entity.Entity) StackFrame(org.spongepowered.api.event.CauseStackManager.StackFrame) ClickInventoryEvent(org.spongepowered.api.event.item.inventory.ClickInventoryEvent)

Example 27 with StackFrame

use of org.spongepowered.api.event.CauseStackManager.StackFrame in project SpongeCommon by SpongePowered.

the class SpongeCommonEventFactory method callDestructEntityEventDeath.

public static DestructEntityEvent.Death callDestructEntityEventDeath(EntityLivingBase entity, DamageSource source) {
    final MessageEvent.MessageFormatter formatter = new MessageEvent.MessageFormatter();
    MessageChannel originalChannel;
    MessageChannel channel;
    Text originalMessage;
    Optional<User> sourceCreator = Optional.empty();
    boolean messageCancelled = false;
    if (entity instanceof EntityPlayerMP) {
        originalChannel = channel = ((IMixinEntityPlayerMP) entity).getDeathMessageChannel();
    } else {
        originalChannel = MessageChannel.TO_NONE;
        channel = MessageChannel.TO_NONE;
    }
    if (source instanceof EntityDamageSource) {
        EntityDamageSource damageSource = (EntityDamageSource) source;
        IMixinEntity spongeEntity = (IMixinEntity) damageSource.getImmediateSource();
        if (spongeEntity != null) {
            sourceCreator = spongeEntity.getCreatorUser();
        }
    }
    originalMessage = SpongeTexts.toText(entity.getCombatTracker().getDeathMessage());
    formatter.getBody().add(new MessageEvent.DefaultBodyApplier(originalMessage));
    final boolean isMainThread = Sponge.isServerAvailable() && Sponge.getServer().isMainThread();
    // checks need to be made here since entities can die on the client world.
    try (final StackFrame frame = isMainThread ? Sponge.getCauseStackManager().pushCauseFrame() : null) {
        if (isMainThread) {
            Sponge.getCauseStackManager().pushCause(source);
            if (sourceCreator.isPresent()) {
                Sponge.getCauseStackManager().addContext(EventContextKeys.OWNER, sourceCreator.get());
            }
        }
        final Cause cause = isMainThread ? Sponge.getCauseStackManager().getCurrentCause() : Cause.of(EventContext.empty(), source);
        DestructEntityEvent.Death event = SpongeEventFactory.createDestructEntityEventDeath(cause, originalChannel, Optional.of(channel), formatter, (Living) entity, entity.world.getGameRules().getBoolean("keepInventory"), messageCancelled);
        SpongeImpl.postEvent(event);
        Text message = event.getMessage();
        if (!event.isMessageCancelled() && !message.isEmpty()) {
            event.getChannel().ifPresent(eventChannel -> eventChannel.send(entity, event.getMessage()));
        }
        return event;
    }
}
Also used : User(org.spongepowered.api.entity.living.player.User) MessageEvent(org.spongepowered.api.event.message.MessageEvent) Text(org.spongepowered.api.text.Text) IMixinEntity(org.spongepowered.common.interfaces.entity.IMixinEntity) IMixinEntityPlayerMP(org.spongepowered.common.interfaces.entity.player.IMixinEntityPlayerMP) EntityDamageSource(net.minecraft.util.EntityDamageSource) MessageChannel(org.spongepowered.api.text.channel.MessageChannel) DestructEntityEvent(org.spongepowered.api.event.entity.DestructEntityEvent) StackFrame(org.spongepowered.api.event.CauseStackManager.StackFrame) Cause(org.spongepowered.api.event.cause.Cause) EntityPlayerMP(net.minecraft.entity.player.EntityPlayerMP) IMixinEntityPlayerMP(org.spongepowered.common.interfaces.entity.player.IMixinEntityPlayerMP)

Example 28 with StackFrame

use of org.spongepowered.api.event.CauseStackManager.StackFrame in project SpongeCommon by SpongePowered.

the class SpongeCommonEventFactory method handlePistonEvent.

/**
 * This simulates the blocks a piston moves and calls the event for saner
 * debugging.
 *
 * @return if the event was cancelled
 */
public static boolean handlePistonEvent(IMixinWorldServer world, WorldServer.ServerBlockEventList list, Object obj, BlockPos pos, Block blockIn, int eventId, int eventParam) {
    boolean extending = (eventId == 0);
    final IBlockState blockstate = ((net.minecraft.world.World) world).getBlockState(pos);
    EnumFacing direction = blockstate.getValue(BlockDirectional.FACING);
    final LocatableBlock locatable = LocatableBlock.builder().location(new Location<>((World) world, pos.getX(), pos.getY(), pos.getZ())).state((BlockState) blockstate).build();
    // Sets toss out duplicate values (even though there shouldn't be any)
    HashSet<Location<org.spongepowered.api.world.World>> locations = new HashSet<>();
    locations.add(new Location<>((World) world, pos.getX(), pos.getY(), pos.getZ()));
    BlockPistonStructureHelper movedBlocks = new BlockPistonStructureHelper((WorldServer) world, pos, direction, extending);
    // calculates blocks to be moved
    movedBlocks.canMove();
    Stream.concat(movedBlocks.getBlocksToMove().stream(), movedBlocks.getBlocksToDestroy().stream()).map(block -> new Location<>((World) world, block.getX(), block.getY(), block.getZ())).collect(// SUPER
    Collectors.toCollection(() -> locations));
    // If the piston is extending and there are no blocks to destroy, add the offset location for protection purposes
    if (extending && movedBlocks.getBlocksToDestroy().isEmpty()) {
        final List<BlockPos> movedPositions = movedBlocks.getBlocksToMove();
        BlockPos offsetPos;
        // If there are no blocks to move, add the offset of piston
        if (movedPositions.isEmpty()) {
            offsetPos = pos.offset(direction);
        } else {
            // Add the offset of last block set to move
            offsetPos = movedPositions.get(movedPositions.size() - 1).offset(direction);
        }
        locations.add(new Location<>((World) world, offsetPos.getX(), offsetPos.getY(), offsetPos.getZ()));
    }
    try (StackFrame frame = Sponge.getCauseStackManager().pushCauseFrame()) {
        if (extending) {
            Sponge.getCauseStackManager().addContext(EventContextKeys.PISTON_EXTEND, world.asSpongeWorld());
        } else {
            Sponge.getCauseStackManager().addContext(EventContextKeys.PISTON_RETRACT, world.asSpongeWorld());
        }
        return SpongeCommonEventFactory.callChangeBlockEventPre(world, ImmutableList.copyOf(locations), locatable).isCancelled();
    }
}
Also used : ChangeBlockEvent(org.spongepowered.api.event.block.ChangeBlockEvent) EnumHand(net.minecraft.util.EnumHand) IMixinChunk(org.spongepowered.common.interfaces.IMixinChunk) ItemStackUtil(org.spongepowered.common.item.inventory.util.ItemStackUtil) SPacketOpenWindow(net.minecraft.network.play.server.SPacketOpenWindow) SlotTransaction(org.spongepowered.api.item.inventory.transaction.SlotTransaction) Block(net.minecraft.block.Block) PhaseData(org.spongepowered.common.event.tracking.PhaseData) Map(java.util.Map) Living(org.spongepowered.api.entity.living.Living) ClickInventoryEvent(org.spongepowered.api.event.item.inventory.ClickInventoryEvent) EnumSet(java.util.EnumSet) Location(org.spongepowered.api.world.Location) StackFrame(org.spongepowered.api.event.CauseStackManager.StackFrame) EntityUtil(org.spongepowered.common.entity.EntityUtil) BlockState(org.spongepowered.api.block.BlockState) Direction(org.spongepowered.api.util.Direction) Stream(java.util.stream.Stream) World(org.spongepowered.api.world.World) HandTypes(org.spongepowered.api.data.type.HandTypes) IMixinInventory(org.spongepowered.common.interfaces.IMixinInventory) Player(org.spongepowered.api.entity.living.player.Player) Container(net.minecraft.inventory.Container) DestructEntityEvent(org.spongepowered.api.event.entity.DestructEntityEvent) Vector3d(com.flowpowered.math.vector.Vector3d) Agent(org.spongepowered.api.entity.living.Agent) Supplier(java.util.function.Supplier) ArrayList(java.util.ArrayList) ItemStack(net.minecraft.item.ItemStack) Text(org.spongepowered.api.text.Text) IMixinContainer(org.spongepowered.common.interfaces.IMixinContainer) InteractBlockEvent(org.spongepowered.api.event.block.InteractBlockEvent) CauseStackManager(org.spongepowered.api.event.CauseStackManager) TileEntityHopper(net.minecraft.tileentity.TileEntityHopper) WorldServer(net.minecraft.world.WorldServer) Nullable(javax.annotation.Nullable) SpongeEventFactory(org.spongepowered.api.event.SpongeEventFactory) PacketPhaseUtil.handleCustomCursor(org.spongepowered.common.event.tracking.phase.packet.PacketPhaseUtil.handleCustomCursor) PlayerTracker(org.spongepowered.common.entity.PlayerTracker) BlockPos(net.minecraft.util.math.BlockPos) BlockUtil(org.spongepowered.common.block.BlockUtil) PhaseTracker(org.spongepowered.common.event.tracking.PhaseTracker) Entity(org.spongepowered.api.entity.Entity) IBlockState(net.minecraft.block.state.IBlockState) CPacketCreativeInventoryAction(net.minecraft.network.play.client.CPacketCreativeInventoryAction) QueryOperationTypes(org.spongepowered.api.item.inventory.query.QueryOperationTypes) OrderedInventory(org.spongepowered.api.item.inventory.type.OrderedInventory) EntityLivingBase(net.minecraft.entity.EntityLivingBase) Vector3i(com.flowpowered.math.vector.Vector3i) BlockDirectional(net.minecraft.block.BlockDirectional) EntityDamageSource(net.minecraft.util.EntityDamageSource) VecHelper(org.spongepowered.common.util.VecHelper) MessageEvent(org.spongepowered.api.event.message.MessageEvent) IInteractionObject(net.minecraft.world.IInteractionObject) EventContextKeys(org.spongepowered.api.event.cause.EventContextKeys) IMixinEntity(org.spongepowered.common.interfaces.entity.IMixinEntity) ItemStackSnapshot(org.spongepowered.api.item.inventory.ItemStackSnapshot) IMixinWorldServer(org.spongepowered.common.interfaces.world.IMixinWorldServer) ProjectileSource(org.spongepowered.api.entity.projectile.source.ProjectileSource) EntityPlayerMP(net.minecraft.entity.player.EntityPlayerMP) TileEntity(org.spongepowered.api.block.tileentity.TileEntity) CollideBlockEvent(org.spongepowered.api.event.block.CollideBlockEvent) SetAITargetEvent(org.spongepowered.api.event.entity.ai.SetAITargetEvent) CraftItemEvent(org.spongepowered.api.event.item.inventory.CraftItemEvent) InventoryArchetypes(org.spongepowered.api.item.inventory.InventoryArchetypes) SPacketSetSlot(net.minecraft.network.play.server.SPacketSetSlot) CollideEntityEvent(org.spongepowered.api.event.entity.CollideEntityEvent) Transaction(org.spongepowered.api.data.Transaction) EntityItem(net.minecraft.entity.item.EntityItem) User(org.spongepowered.api.entity.living.player.User) InteractEntityEvent(org.spongepowered.api.event.entity.InteractEntityEvent) LocatableBlock(org.spongepowered.api.world.LocatableBlock) Sponge(org.spongepowered.api.Sponge) State(org.spongepowered.common.event.tracking.phase.block.BlockPhase.State) UUID(java.util.UUID) Collectors(java.util.stream.Collectors) Tristate(org.spongepowered.api.util.Tristate) InventoryArchetype(org.spongepowered.api.item.inventory.InventoryArchetype) Cause(org.spongepowered.api.event.cause.Cause) List(java.util.List) PhaseContext(org.spongepowered.common.event.tracking.PhaseContext) EntityPlayer(net.minecraft.entity.player.EntityPlayer) ChangeInventoryEvent(org.spongepowered.api.event.item.inventory.ChangeInventoryEvent) CraftingInventory(org.spongepowered.api.item.inventory.crafting.CraftingInventory) CarriedInventory(org.spongepowered.api.item.inventory.type.CarriedInventory) CraftingRecipe(org.spongepowered.api.item.recipe.crafting.CraftingRecipe) WorldProperties(org.spongepowered.api.world.storage.WorldProperties) Optional(java.util.Optional) InteractItemEvent(org.spongepowered.api.event.item.inventory.InteractItemEvent) NotifyNeighborBlockEvent(org.spongepowered.api.event.block.NotifyNeighborBlockEvent) BlockSnapshot(org.spongepowered.api.block.BlockSnapshot) EventContext(org.spongepowered.api.event.cause.EventContext) BlockPistonStructureHelper(net.minecraft.block.state.BlockPistonStructureHelper) Inventory(org.spongepowered.api.item.inventory.Inventory) SpongeImpl(org.spongepowered.common.SpongeImpl) AbstractHorse(net.minecraft.entity.passive.AbstractHorse) SpongeImplHooks(org.spongepowered.common.SpongeImplHooks) SpongeTexts(org.spongepowered.common.text.SpongeTexts) CustomInventory(org.spongepowered.common.item.inventory.custom.CustomInventory) HashMap(java.util.HashMap) Function(java.util.function.Function) HashSet(java.util.HashSet) RayTraceResult(net.minecraft.util.math.RayTraceResult) ContainerUtil(org.spongepowered.common.item.inventory.util.ContainerUtil) IMixinEntityPlayerMP(org.spongepowered.common.interfaces.entity.player.IMixinEntityPlayerMP) ImmutableList(com.google.common.collect.ImmutableList) IMixinInventoryPlayer(org.spongepowered.common.interfaces.entity.player.IMixinInventoryPlayer) WeakReference(java.lang.ref.WeakReference) InventoryUtil(org.spongepowered.common.item.inventory.util.InventoryUtil) DirectionFacingProvider(org.spongepowered.common.registry.provider.DirectionFacingProvider) Iterator(java.util.Iterator) EnumFacing(net.minecraft.util.EnumFacing) Item(org.spongepowered.api.entity.Item) InteractInventoryEvent(org.spongepowered.api.event.item.inventory.InteractInventoryEvent) DamageSource(net.minecraft.util.DamageSource) ContainerPlayer(net.minecraft.inventory.ContainerPlayer) IInventory(net.minecraft.inventory.IInventory) PacketPhaseUtil(org.spongepowered.common.event.tracking.phase.packet.PacketPhaseUtil) Slot(net.minecraft.inventory.Slot) MessageChannel(org.spongepowered.api.text.channel.MessageChannel) SlotIndex(org.spongepowered.api.item.inventory.property.SlotIndex) Collections(java.util.Collections) IBlockState(net.minecraft.block.state.IBlockState) EnumFacing(net.minecraft.util.EnumFacing) World(org.spongepowered.api.world.World) BlockPistonStructureHelper(net.minecraft.block.state.BlockPistonStructureHelper) BlockState(org.spongepowered.api.block.BlockState) IBlockState(net.minecraft.block.state.IBlockState) StackFrame(org.spongepowered.api.event.CauseStackManager.StackFrame) LocatableBlock(org.spongepowered.api.world.LocatableBlock) BlockPos(net.minecraft.util.math.BlockPos) Location(org.spongepowered.api.world.Location) HashSet(java.util.HashSet)

Example 29 with StackFrame

use of org.spongepowered.api.event.CauseStackManager.StackFrame in project SpongeCommon by SpongePowered.

the class MixinEntityLivingBase method onDeath.

/**
 * @author blood - May 12th, 2016
 * @author gabizou - June 4th, 2016 - Update for 1.9.4 and Cause Tracker changes
 *
 * @reason SpongeForge requires an overwrite so we do it here instead. This handles all living entity death events
 * (except players). Note should be taken that normally, there are lists for drops captured, however, the drops
 * are retroactively captured by the PhaseTracker and associated through the different phases, depending on
 * how they are handled, so no lists and flags on the entities themselves are needed as they are tracked through
 * the {@link PhaseContext} of the current {@link IPhaseState} at which this method is called. The compatibility
 * for Forge's events to throw are handled specially in SpongeForge.
 */
@Overwrite
public void onDeath(DamageSource cause) {
    // Sponge Start - Call our event, and forge's event
    // This will transitively call the forge event
    SpongeCommonEventFactory.callDestructEntityEventDeath((EntityLivingBase) (Object) this, cause);
    // Double check that the PhaseTracker is already capturing the Death phase
    final PhaseTracker phaseTracker = PhaseTracker.getInstance();
    final boolean isMainThread = !this.world.isRemote || Sponge.isServerAvailable() && Sponge.getServer().isMainThread();
    try (final StackFrame frame = isMainThread ? Sponge.getCauseStackManager().pushCauseFrame() : null) {
        if (!this.world.isRemote) {
            final PhaseData peek = phaseTracker.getCurrentPhaseData();
            final IPhaseState state = peek.state;
            this.tracksEntityDeaths = !phaseTracker.getCurrentState().tracksEntityDeaths() && state != EntityPhase.State.DEATH;
            if (this.tracksEntityDeaths) {
                Sponge.getCauseStackManager().pushCause(this);
                final PhaseContext<?> context = EntityPhase.State.DEATH.createPhaseContext().setDamageSource((org.spongepowered.api.event.cause.entity.damage.source.DamageSource) cause).source(this);
                this.getNotifierUser().ifPresent(context::notifier);
                this.getCreatorUser().ifPresent(context::owner);
                context.buildAndSwitch();
            }
        } else {
            this.tracksEntityDeaths = false;
        }
        // Sponge End
        if (this.dead) {
            // Sponge Start - ensure that we finish the tracker if necessary
            if (this.tracksEntityDeaths && !properlyOverridesOnDeathForCauseTrackerCompletion()) {
                phaseTracker.completePhase(EntityPhase.State.DEATH);
            }
            // Sponge End
            return;
        }
        Entity entity = cause.getTrueSource();
        EntityLivingBase entitylivingbase = this.getAttackingEntity();
        if (this.scoreValue >= 0 && entitylivingbase != null) {
            entitylivingbase.awardKillScore((EntityLivingBase) (Object) this, this.scoreValue, cause);
        }
        if (entity != null) {
            entity.onKillEntity((EntityLivingBase) (Object) this);
        }
        this.dead = true;
        this.getCombatTracker().reset();
        if (!this.world.isRemote) {
            int i = 0;
            if (entity instanceof EntityPlayer) {
                i = EnchantmentHelper.getLootingModifier((EntityLivingBase) entity);
            }
            if (this.canDropLoot() && this.world.getGameRules().getBoolean("doMobLoot")) {
                boolean flag = this.recentlyHit > 0;
                this.dropLoot(flag, i, cause);
            }
        }
        // Sponge Start - Don't send the state if this is a human. Fixes ghost items on client.
        if (!((EntityLivingBase) (Object) this instanceof EntityHuman)) {
            this.world.setEntityState((EntityLivingBase) (Object) this, (byte) 3);
        }
        if (phaseTracker != null && this.tracksEntityDeaths && !properlyOverridesOnDeathForCauseTrackerCompletion()) {
            this.tracksEntityDeaths = false;
            phaseTracker.completePhase(EntityPhase.State.DEATH);
        }
    }
// Sponge End
}
Also used : Entity(net.minecraft.entity.Entity) EntityHuman(org.spongepowered.common.entity.living.human.EntityHuman) PhaseData(org.spongepowered.common.event.tracking.PhaseData) FallingBlockDamageSource(org.spongepowered.api.event.cause.entity.damage.source.FallingBlockDamageSource) DamageSource(net.minecraft.util.DamageSource) IPhaseState(org.spongepowered.common.event.tracking.IPhaseState) PhaseTracker(org.spongepowered.common.event.tracking.PhaseTracker) StackFrame(org.spongepowered.api.event.CauseStackManager.StackFrame) IMixinEntityLivingBase(org.spongepowered.common.interfaces.entity.IMixinEntityLivingBase) EntityLivingBase(net.minecraft.entity.EntityLivingBase) EntityPlayer(net.minecraft.entity.player.EntityPlayer) DamageObject(org.spongepowered.common.event.damage.DamageObject) Overwrite(org.spongepowered.asm.mixin.Overwrite)

Example 30 with StackFrame

use of org.spongepowered.api.event.CauseStackManager.StackFrame in project SpongeCommon by SpongePowered.

the class BlockEventTickPhaseState method unwind.

@Override
public void unwind(BlockEventTickContext phaseContext) {
    final Optional<User> notifier = phaseContext.getNotifier();
    final Optional<User> owner = phaseContext.getOwner();
    final User entityCreator = notifier.orElseGet(() -> owner.orElse(null));
    try (StackFrame frame = Sponge.getCauseStackManager().pushCauseFrame()) {
        Sponge.getCauseStackManager().addContext(EventContextKeys.SPAWN_TYPE, SpawnTypes.CUSTOM);
        phaseContext.getCapturedBlockSupplier().acceptAndClearIfNotEmpty(blockSnapshots -> TrackingUtil.processBlockCaptures(blockSnapshots, this, phaseContext));
        phaseContext.getCapturedItemsSupplier().acceptAndClearIfNotEmpty(items -> {
            final ArrayList<Entity> capturedEntities = new ArrayList<>();
            for (EntityItem entity : items) {
                capturedEntities.add(EntityUtil.fromNative(entity));
            }
            final SpawnEntityEvent spawnEntityEvent = SpongeEventFactory.createSpawnEntityEvent(Sponge.getCauseStackManager().getCurrentCause(), capturedEntities);
            SpongeImpl.postEvent(spawnEntityEvent);
            for (Entity entity : spawnEntityEvent.getEntities()) {
                if (entityCreator != null) {
                    EntityUtil.toMixin(entity).setCreator(entityCreator.getUniqueId());
                }
                EntityUtil.getMixinWorld(entity).forceSpawnEntity(entity);
            }
        });
    }
}
Also used : TileEntity(org.spongepowered.api.block.tileentity.TileEntity) Entity(org.spongepowered.api.entity.Entity) User(org.spongepowered.api.entity.living.player.User) StackFrame(org.spongepowered.api.event.CauseStackManager.StackFrame) ArrayList(java.util.ArrayList) SpawnEntityEvent(org.spongepowered.api.event.entity.SpawnEntityEvent) EntityItem(net.minecraft.entity.item.EntityItem)

Aggregations

StackFrame (org.spongepowered.api.event.CauseStackManager.StackFrame)36 Entity (org.spongepowered.api.entity.Entity)18 ArrayList (java.util.ArrayList)15 SpawnEntityEvent (org.spongepowered.api.event.entity.SpawnEntityEvent)13 User (org.spongepowered.api.entity.living.player.User)12 EntityItem (net.minecraft.entity.item.EntityItem)11 EntityPlayer (net.minecraft.entity.player.EntityPlayer)8 TileEntity (org.spongepowered.api.block.tileentity.TileEntity)8 IMixinEntity (org.spongepowered.common.interfaces.entity.IMixinEntity)6 ItemStack (net.minecraft.item.ItemStack)5 BlockPos (net.minecraft.util.math.BlockPos)5 WorldServer (net.minecraft.world.WorldServer)5 LocatableBlock (org.spongepowered.api.world.LocatableBlock)5 IMixinTileEntity (org.spongepowered.common.interfaces.block.tile.IMixinTileEntity)5 List (java.util.List)4 UUID (java.util.UUID)4 Collectors (java.util.stream.Collectors)4 EntityLivingBase (net.minecraft.entity.EntityLivingBase)4 EntityPlayerMP (net.minecraft.entity.player.EntityPlayerMP)4 Sponge (org.spongepowered.api.Sponge)4