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);
}
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);
}
Aggregations