mirror of
https://github.com/GTNewHorizons/Opis.git
synced 2026-11-20 12:19:50 +00:00
Removed Packets id class
Fixed teleport.
This commit is contained in:
1 parent
50d0d917da
commit
5fd5d5b3ff
4 files changed
+11
-20
No files matched your search
@@ -2,6 +2,7 @@ package mcp.mobius.opis.helpers;
|
||||
|
||||
import java.util.Iterator;
|
||||
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import mcp.mobius.opis.data.holders.basetypes.CoordinatesBlock;
|
||||
import net.minecraft.block.Block;
|
||||
@@ -9,6 +10,8 @@ import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityList;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.network.play.server.S07PacketRespawn;
|
||||
import net.minecraft.network.play.server.S1DPacketEntityEffect;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.server.management.ServerConfigurationManager;
|
||||
@@ -34,7 +37,7 @@ public class Teleport {
|
||||
// Originally in ServerConfigurationManager
|
||||
public boolean transferPlayerToDimension(ServerConfigurationManager manager, EntityPlayerMP player, int targetID)
|
||||
{
|
||||
/*
|
||||
|
||||
int sourceID = player.dimension;
|
||||
WorldServer sourceWorld = DimensionManager.getWorld(player.dimension);
|
||||
WorldServer targetWorld = DimensionManager.getWorld(targetID);
|
||||
@@ -44,7 +47,8 @@ public class Teleport {
|
||||
|
||||
player.dimension = targetID;
|
||||
|
||||
player.playerNetServerHandler.sendPacket(new Packet9Respawn(player.dimension, (byte)player.worldObj.difficultySetting, targetWorld.getWorldInfo().getTerrainType(), targetWorld.getHeight(), player.theItemInWorldManager.getGameType()));
|
||||
//player.playerNetServerHandler.sendPacket(new Packet9Respawn(player.dimension, (byte)player.worldObj.difficultySetting, targetWorld.getWorldInfo().getTerrainType(), targetWorld.getHeight(), player.theItemInWorldManager.getGameType()));
|
||||
player.playerNetServerHandler.sendPacket(new S07PacketRespawn(player.dimension, player.worldObj.difficultySetting, player.worldObj.getWorldInfo().getTerrainType(), player.theItemInWorldManager.getGameType()));
|
||||
sourceWorld.removePlayerEntityDangerously(player);
|
||||
player.isDead = false;
|
||||
this.transferEntityToWorld(player, sourceID, sourceWorld, targetWorld);
|
||||
@@ -60,11 +64,13 @@ public class Teleport {
|
||||
while (iterator.hasNext())
|
||||
{
|
||||
PotionEffect potioneffect = (PotionEffect)iterator.next();
|
||||
player.playerNetServerHandler.sendPacket(new Packet41EntityEffect(player.entityId, potioneffect));
|
||||
//player.playerNetServerHandler.sendPacket(new Packet41EntityEffect(player.entityId, potioneffect));
|
||||
player.playerNetServerHandler.sendPacket(new S1DPacketEntityEffect(player.getEntityId(), potioneffect));
|
||||
}
|
||||
|
||||
GameRegistry.onPlayerChangedDimension(player);
|
||||
*/
|
||||
//GameRegistry.onPlayerChangedDimension(player);
|
||||
FMLCommonHandler.instance().firePlayerChangedDimensionEvent(player, sourceID, targetID);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
package mcp.mobius.opis.network.enums;
|
||||
|
||||
public class Packets {
|
||||
|
||||
public static byte REQ_CHUNKS = 0x02; // C => S //Not used right now
|
||||
public static byte TICKETS = 0x03; // S => C
|
||||
public static byte CHUNKS = 0x04; // S => C
|
||||
public static byte NETDATACOMMAND = 0x08;
|
||||
public static byte DATA_OVERLAY_CHUNK_ENTITIES = 0x09;
|
||||
public static byte NETDATALIST = 0x10;
|
||||
public static byte NETDATAVALUE = 0x11;
|
||||
public static byte REQ_DATA = 0x12; // C => S
|
||||
}
|
||||
@@ -10,7 +10,6 @@ import mcp.mobius.opis.network.PacketBase;
|
||||
import mcp.mobius.opis.network.ServerMessageHandler;
|
||||
import mcp.mobius.opis.network.enums.AccessLevel;
|
||||
import mcp.mobius.opis.network.enums.Message;
|
||||
import mcp.mobius.opis.network.enums.Packets;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@@ -16,7 +16,6 @@ import mcp.mobius.opis.data.holders.DataType;
|
||||
import mcp.mobius.opis.data.holders.ISerializable;
|
||||
import mcp.mobius.opis.network.PacketBase;
|
||||
import mcp.mobius.opis.network.enums.Message;
|
||||
import mcp.mobius.opis.network.enums.Packets;
|
||||
|
||||
public class NetDataValue extends PacketBase {
|
||||
|
||||
|
||||
Reference in new issue
Block a user