Cleanup the reflection for arrow collisions
This commit is contained in:
parent
af5eb3c997
commit
be457c7f3c
@ -1103,10 +1103,11 @@ public class UtilEnt
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
EntityArrow entityArrow = ((CraftArrow) arrow).getHandle();
|
EntityArrow entityArrow = ((CraftArrow) arrow).getHandle();
|
||||||
|
Class<?> clazz = entityArrow.getClass();
|
||||||
|
|
||||||
Field fieldX = EntityArrow.class.getDeclaredField("d");
|
Field fieldX = clazz.getDeclaredField("d");
|
||||||
Field fieldY = EntityArrow.class.getDeclaredField("e");
|
Field fieldY = clazz.getDeclaredField("e");
|
||||||
Field fieldZ = EntityArrow.class.getDeclaredField("f");
|
Field fieldZ = clazz.getDeclaredField("f");
|
||||||
|
|
||||||
fieldX.setAccessible(true);
|
fieldX.setAccessible(true);
|
||||||
fieldY.setAccessible(true);
|
fieldY.setAccessible(true);
|
||||||
|
Loading…
Reference in New Issue
Block a user