Search in sources :

Example 11 with RCEntityInfo

use of ivorius.reccomplex.capability.RCEntityInfo in project RecurrentComplex by Ivorforce.

the class RCForgeEventHandler method onPlayerTick.

@SubscribeEvent
public void onPlayerTick(TickEvent.PlayerTickEvent event) {
    RCEntityInfo sei = RCEntityInfo.get(event.player, null);
    if (sei != null)
        sei.update(event.player);
    CapabilitySelection sel = CapabilitySelection.get(event.player, null);
    if (sel != null)
        sel.update(event.player);
}
Also used : CapabilitySelection(ivorius.reccomplex.capability.CapabilitySelection) RCEntityInfo(ivorius.reccomplex.capability.RCEntityInfo) SubscribeEvent(net.minecraftforge.fml.common.eventhandler.SubscribeEvent)

Example 12 with RCEntityInfo

use of ivorius.reccomplex.capability.RCEntityInfo in project RecurrentComplex by Ivorforce.

the class PacketSaveStructureHandler method processServer.

@Override
public void processServer(PacketSaveStructure message, MessageContext ctx, WorldServer server) {
    NetHandlerPlayServer netHandlerPlayServer = ctx.getServerHandler();
    EntityPlayerMP player = netHandlerPlayServer.player;
    if (RecurrentComplex.checkPerms(player))
        return;
    RCEntityInfo entityInfo = RCEntityInfo.get(player, null);
    GenericStructure genericStructureInfo = message.getStructureInfo();
    if (entityInfo != null)
        genericStructureInfo.worldDataCompound = entityInfo.getCachedExportStructureBlockDataNBT();
    SaveDirectoryData.Result saveDirectoryDataResult = message.getSaveDirectoryDataResult();
    String id = message.getStructureID();
    ResourceDirectory saveDir = saveDirectoryDataResult.directory;
    write(player, genericStructureInfo, id, saveDir, saveDirectoryDataResult.deleteOther, true);
}
Also used : ResourceDirectory(ivorius.reccomplex.files.loading.ResourceDirectory) SaveDirectoryData(ivorius.reccomplex.utils.SaveDirectoryData) EntityPlayerMP(net.minecraft.entity.player.EntityPlayerMP) RCEntityInfo(ivorius.reccomplex.capability.RCEntityInfo) NetHandlerPlayServer(net.minecraft.network.NetHandlerPlayServer) GenericStructure(ivorius.reccomplex.world.gen.feature.structure.generic.GenericStructure)

Aggregations

RCEntityInfo (ivorius.reccomplex.capability.RCEntityInfo)12 EntityPlayer (net.minecraft.entity.player.EntityPlayer)5 GenericStructure (ivorius.reccomplex.world.gen.feature.structure.generic.GenericStructure)3 WorldServer (net.minecraft.world.WorldServer)3 CapabilitySelection (ivorius.reccomplex.capability.CapabilitySelection)2 SelectionOwner (ivorius.reccomplex.capability.SelectionOwner)2 RCParameters (ivorius.reccomplex.commands.parameters.RCParameters)2 EntityPlayerMP (net.minecraft.entity.player.EntityPlayerMP)2 BlockPos (net.minecraft.util.math.BlockPos)2 SubscribeEvent (net.minecraftforge.fml.common.eventhandler.SubscribeEvent)2 BlockArea (ivorius.ivtoolkit.blocks.BlockArea)1 AxisAlignedTransform2D (ivorius.ivtoolkit.math.AxisAlignedTransform2D)1 IvWorldData (ivorius.ivtoolkit.tools.IvWorldData)1 RCConfig (ivorius.reccomplex.RCConfig)1 MaterialNegativeSpace (ivorius.reccomplex.block.materials.MaterialNegativeSpace)1 RCCommands (ivorius.reccomplex.commands.RCCommands)1 RCExpect (ivorius.reccomplex.commands.parameters.RCExpect)1 SimpleLeveledRegistry (ivorius.reccomplex.files.SimpleLeveledRegistry)1 ResourceDirectory (ivorius.reccomplex.files.loading.ResourceDirectory)1 GuiEditGenericStructure (ivorius.reccomplex.gui.editstructure.GuiEditGenericStructure)1