added 'exact' to 'trace' in entity API
This commit is contained in:
1 parent
324d9549c8
commit
208d07bf47
3 files changed
+19
-4
No files matched your search
@@ -12,6 +12,7 @@ import net.minecraft.util.Identifier;
|
||||
|
||||
import net.minecraft.util.dynamic.GlobalPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.util.registry.RegistryKey;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@@ -29,6 +30,11 @@ public class ValueConversions
|
||||
return ListValue.of(new NumericValue(pos.getX()), new NumericValue(pos.getY()), new NumericValue(pos.getZ()));
|
||||
}
|
||||
|
||||
public static Value fromVec(Vec3d vec)
|
||||
{
|
||||
return ListValue.of(new NumericValue(vec.x), new NumericValue(vec.y), new NumericValue(vec.z));
|
||||
}
|
||||
|
||||
public static Value dimName(ServerWorld world)
|
||||
{
|
||||
return ofId(world.getRegistryKey().getValue());
|
||||
|
||||
Reference in new issue
Block a user