From 00aa03e4238e5759bb29fb33a3918c7895515c4d Mon Sep 17 00:00:00 2001 From: Daniil Date: Fri, 10 Aug 2018 16:29:16 +0700 Subject: [PATCH] Fixed ambiguous world checks --- core/src/test/java/mc/core/EntityLocationTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/test/java/mc/core/EntityLocationTest.java b/core/src/test/java/mc/core/EntityLocationTest.java index 7e77fdc..11727d4 100644 --- a/core/src/test/java/mc/core/EntityLocationTest.java +++ b/core/src/test/java/mc/core/EntityLocationTest.java @@ -87,6 +87,7 @@ public class EntityLocationTest { }; EntityLocation firstLocation = new EntityLocation(10, 20, 30, 40, 50, dummyWorld); + Assert.assertSame("Lost world reference before cloning", dummyWorld, firstLocation.getWorld()); EntityLocation locationClone = firstLocation.clone(); Assert.assertEquals("X mismatch", firstLocation.getX(), locationClone.getX(), 0); @@ -94,7 +95,6 @@ public class EntityLocationTest { Assert.assertEquals("Z mismatch", firstLocation.getZ(), locationClone.getZ(), 0); Assert.assertEquals("Pitch mismatch", firstLocation.getPitch(), locationClone.getPitch(), 0); Assert.assertEquals("Yaw mismatch", firstLocation.getYaw(), locationClone.getYaw(), 0); - Assert.assertEquals("World mismatch", firstLocation.getWorld(), locationClone.getWorld()); - + Assert.assertSame("World mismatch (accidental clone of the World object?)", firstLocation.getWorld(), locationClone.getWorld()); } }