Skip to content
This repository has been archived by the owner on Jan 26, 2019. It is now read-only.

Commit

Permalink
Fix Datawatcher inability to log in
Browse files Browse the repository at this point in the history
  • Loading branch information
robotia committed Mar 5, 2016
1 parent 38160e1 commit f12519d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
6 changes: 3 additions & 3 deletions patches/net/minecraft/entity/DataWatcher.java.patch
Original file line number Diff line number Diff line change
Expand Up @@ -122,17 +122,17 @@
- switch (p_151510_1_.getObjectType())
+ int type = p_151510_1_.getObjectType();
+ Object object = p_151510_1_.getObject();
+ int rt = 0;
+ int rt = -1;
+ if(object instanceof Byte) rt = 0;
+ else if(object instanceof Short) rt = 1;
+ else if(object instanceof Integer) rt = 2;
+ else if(object instanceof Float) rt = 3;
+ else if(object instanceof String) rt = 4;
+ else if(object instanceof ItemStack) rt = 5;
+ else if(object instanceof ChunkCoordinates) rt = 6;
+ if(type != rt)
+ if(rt != -1 && type != rt)
+ {
+ System.out.println("[Thermos] Watchable object type is incorrect! Appying correct type!");
+ System.out.println("[Thermos] Watchable object type "+type+" is incorrect! Appying correct type of " +rt+ "!");
+ type = rt;
+ }
+ switch (type)
Expand Down
1 change: 0 additions & 1 deletion patches/net/minecraft/inventory/Container.java.patch
Original file line number Diff line number Diff line change
Expand Up @@ -230,4 +230,3 @@
+ }
+ // Spigot
}

0 comments on commit f12519d

Please sign in to comment.