@@ -0,0 +1,2781 @@
+package org.monospark.spongematchers.matcher.sponge;%0A%0Aimport java.util.function.Function;%0A%0Aimport org.monospark.spongematchers.matcher.CompoundMatcher;%0Aimport org.monospark.spongematchers.matcher.SpongeMatcher;%0Aimport org.spongepowered.api.world.Location;%0A%0Aimport com.flowpowered.math.vector.Vector2i;%0Aimport com.flowpowered.math.vector.Vector3d;%0Aimport com.flowpowered.math.vector.Vector3i;%0A%0Apublic final class LocationMatcher%3CT%3E implements SpongeMatcher%3CLocation%3C?%3E%3E%7B%0A%0A    public static SpongeMatcher%3CLocation%3C?%3E%3E position(SpongeMatcher%3CDouble%3E x, SpongeMatcher%3CDouble%3E y,%0A            SpongeMatcher%3CDouble%3E z) %7B%0A        SpongeMatcher%3CVector3d%3E posMatcher = CompoundMatcher.%3CVector3d%3Ebuilder()%0A                .addMatcher(x, v -%3E v.getX())%0A                .addMatcher(y, v -%3E v.getY())%0A                .addMatcher(z, v -%3E v.getZ())%0A                .build();%0A        return new LocationMatcher%3C%3E(Type.POSITION, posMatcher);%0A    %7D%0A    %0A    public static SpongeMatcher%3CLocation%3C?%3E%3E block(SpongeMatcher%3CInteger%3E x, SpongeMatcher%3CInteger%3E y,%0A            SpongeMatcher%3CInteger%3E z) %7B%0A        SpongeMatcher%3CVector3i%3E posMatcher = CompoundMatcher.%3CVector3i%3Ebuilder()%0A                .addMatcher(x, v -%3E v.getX())%0A                .addMatcher(y, v -%3E v.getY())%0A                .addMatcher(z, v -%3E v.getZ())%0A                .build();%0A        return new LocationMatcher%3C%3E(Type.BLOCK, posMatcher);%0A    %7D%0A    %0A    public static SpongeMatcher%3CLocation%3C?%3E%3E biome(SpongeMatcher%3CInteger%3E x, SpongeMatcher%3CInteger%3E y) %7B%0A        SpongeMatcher%3CVector2i%3E posMatcher = CompoundMatcher.%3CVector2i%3Ebuilder()%0A                .addMatcher(x, v -%3E v.getX())%0A                .addMatcher(y, v -%3E v.getY())%0A                .build();%0A        return new LocationMatcher%3C%3E(Type.BIOME, posMatcher);%0A    %7D%0A    %0A    private Type%3CT%3E type;%0A    %0A    private SpongeMatcher%3CT%3E matcher;%0A%0A    private LocationMatcher(Type%3CT%3E type, SpongeMatcher%3CT%3E matcher) %7B%0A        this.type = type;%0A        this.matcher = matcher;%0A    %7D%0A%0A    @Override%0A    public boolean matches(Location%3C?%3E o) %7B%0A        return matcher.matches(type.getLocationFunction().apply(o));%0A    %7D%0A%0A    private static final class Type%3CT%3E %7B%0A        %0A        public static final Type%3CVector3d%3E POSITION = new Type%3CVector3d%3E(l -%3E l.getPosition());%0A        public static final Type%3CVector3i%3E BLOCK = new Type%3CVector3i%3E(l -%3E l.getBlockPosition());%0A        public static final Type%3CVector2i%3E BIOME = new Type%3CVector2i%3E(l -%3E l.getBiomePosition());%0A        %0A        private Function%3CLocation%3C?%3E, T%3E locationFunction;%0A%0A        private Type(Function%3CLocation%3C?%3E, T%3E locationFunction) %7B%0A            this.locationFunction = locationFunction;%0A        %7D%0A        %0A        public Function%3CLocation%3C?%3E, T%3E getLocationFunction() %7B%0A            return locationFunction;%0A        %7D%0A    %7D%0A%7D%0A

Add a LocationMatcher