use of de.sanandrew.mods.claysoldiers.network.packet.PacketSyncEffects in project ClaySoldiersMod by SanAndreasP.
the class EntityClaySoldier method readSpawnData.
@Override
public void readSpawnData(ByteBuf buffer) {
if (this.world.isRemote) {
// just making sure this gets called on the client...
PacketSyncUpgrades pktu = new PacketSyncUpgrades();
pktu.fromBytes(buffer);
pktu.applyUpgrades(this);
PacketSyncEffects pkte = new PacketSyncEffects();
pkte.fromBytes(buffer);
pkte.applyEffects(this);
}
}
use of de.sanandrew.mods.claysoldiers.network.packet.PacketSyncEffects in project ClaySoldiersMod by SanAndreasP.
the class EntityClaySoldier method writeSpawnData.
@Override
public void writeSpawnData(ByteBuf buffer) {
PacketSyncUpgrades pktu = new PacketSyncUpgrades(this, true, this.upgradeSyncList.stream().map(entry -> new UpgradeEntry(entry.getUpgrade(), entry.getUpgradeType())).toArray(UpgradeEntry[]::new));
pktu.toBytes(buffer);
PacketSyncEffects pkte = new PacketSyncEffects(this, true, this.effectSyncList.toArray(new ISoldierEffectInst[0]));
pkte.toBytes(buffer);
}
Aggregations