mirror of
https://github.com/barkeser2002/CatServer.git
synced 2026-09-25 11:25:55 +03:00
30 lines
1.4 KiB
Diff
30 lines
1.4 KiB
Diff
--- ../src-base/minecraft/net/minecraft/network/EnumConnectionState.java
|
|
+++ ../src-work/minecraft/net/minecraft/network/EnumConnectionState.java
|
|
@@ -270,7 +270,7 @@
|
|
|
|
protected EnumConnectionState registerPacket(EnumPacketDirection direction, Class <? extends Packet<? >> packetClass)
|
|
{
|
|
- BiMap < Integer, Class <? extends Packet<? >>> bimap = (BiMap)this.directionMaps.get(direction);
|
|
+ BiMap < Integer, Class <? extends Packet<? >>> bimap = this.directionMaps.get(direction);
|
|
|
|
if (bimap == null)
|
|
{
|
|
@@ -293,14 +293,14 @@
|
|
|
|
public Integer getPacketId(EnumPacketDirection direction, Packet<?> packetIn)
|
|
{
|
|
- return (Integer)((BiMap)this.directionMaps.get(direction)).inverse().get(packetIn.getClass());
|
|
+ return (Integer)(this.directionMaps.get(direction)).inverse().get(packetIn.getClass());
|
|
}
|
|
|
|
@Nullable
|
|
public Packet<?> getPacket(EnumPacketDirection direction, int packetId) throws InstantiationException, IllegalAccessException
|
|
{
|
|
- Class <? extends Packet<? >> oclass = (Class)((BiMap)this.directionMaps.get(direction)).get(Integer.valueOf(packetId));
|
|
- return oclass == null ? null : (Packet)oclass.newInstance();
|
|
+ Class <? extends Packet<? >> oclass = this.directionMaps.get(direction).get(Integer.valueOf(packetId));
|
|
+ return oclass == null ? null : oclass.newInstance();
|
|
}
|
|
|
|
public int getId()
|