Exposed getters for NetServerHandler.playerEntity and NetworkManager.netHandler
This commit is contained in:
parent
87524cfa31
commit
546a0fce41
3 changed files with 36 additions and 1 deletions
|
@ -17,3 +17,18 @@
|
|||
}
|
||||
|
||||
public void processReadPackets()
|
||||
@@ -293,4 +296,14 @@
|
||||
{
|
||||
return networkmanager.writeThread;
|
||||
}
|
||||
+
|
||||
+ /**
|
||||
+ * Retrieves the current associated network handler.
|
||||
+ * Added so modders dont have to use reflection.
|
||||
+ * @return The current registered Network Handler
|
||||
+ */
|
||||
+ public NetHandler getNetHandler()
|
||||
+ {
|
||||
+ return netHandler;
|
||||
+ }
|
||||
}
|
||||
|
|
|
@ -34,11 +34,16 @@
|
|||
{
|
||||
playerEntity.itemInWorldManager.activeBlockOrUseItem(playerEntity, worldserver, itemstack, i, j, k, l);
|
||||
}
|
||||
@@ -764,4 +770,44 @@
|
||||
@@ -764,4 +770,49 @@
|
||||
{
|
||||
return true;
|
||||
}
|
||||
+
|
||||
+ public EntityPlayerMP getPlayerEntity()
|
||||
+ {
|
||||
+ return playerEntity;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void handleCustomPayload(Packet250CustomPayload pkt)
|
||||
+ {
|
||||
|
|
|
@ -19,3 +19,18 @@
|
|||
}
|
||||
|
||||
public void processReadPackets()
|
||||
@@ -313,4 +318,14 @@
|
||||
{
|
||||
return networkmanager.writeThread;
|
||||
}
|
||||
+
|
||||
+ /**
|
||||
+ * Retrieves the current associated network handler.
|
||||
+ * Added so modders dont have to use reflection.
|
||||
+ * @return The current registered Network Handler
|
||||
+ */
|
||||
+ public NetHandler getNetHandler()
|
||||
+ {
|
||||
+ return netHandler;
|
||||
+ }
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue