mirror of
https://github.com/GTNewHorizons/Gadomancy.git
synced 2026-11-18 19:29:28 +00:00
- Familiars: Rendering forwarded to RenderPrimalOrb from TC until own render is written
- Familiars: Now properly controlled by Server and mirrored to clients.
This commit is contained in:
1 parent
87de735428
commit
95c77249bc
14 files changed
+369
-124
No files matched your search
@@ -2,9 +2,12 @@ package makeo.gadomancy.common.events;
|
||||
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.common.gameevent.PlayerEvent;
|
||||
import makeo.gadomancy.common.Gadomancy;
|
||||
import makeo.gadomancy.common.network.PacketHandler;
|
||||
import makeo.gadomancy.common.network.packets.PacketFamiliar;
|
||||
import makeo.gadomancy.common.network.packets.PacketUpdateGolemTypeOrder;
|
||||
import makeo.gadomancy.common.utils.GolemEnumHelper;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
|
||||
/**
|
||||
@@ -21,6 +24,14 @@ public class EventHandlerNetwork {
|
||||
EntityPlayerMP p = (EntityPlayerMP) e.player;
|
||||
if(!p.playerNetServerHandler.netManager.isLocalChannel()) {
|
||||
PacketHandler.INSTANCE.sendTo(new PacketUpdateGolemTypeOrder(GolemEnumHelper.getCurrentMapping()), p);
|
||||
Gadomancy.proxy.familiarHandler.checkPlayerEquipment(p);
|
||||
PacketHandler.INSTANCE.sendTo(new PacketFamiliar.PacketFamiliarSyncCompletely(Gadomancy.proxy.familiarHandler.getCurrentActiveFamiliars()), p);
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void on(PlayerEvent.PlayerLoggedOutEvent e) {
|
||||
EntityPlayer player = e.player;
|
||||
Gadomancy.proxy.familiarHandler.notifyUnequip(player.worldObj, player);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user