Implement missing FakeWorld and OfflinePlayer methods

This commit is contained in:
md678685 2018-10-13 15:26:58 +01:00
parent 692e0adde4
commit 2f66a866d8
2 changed files with 36 additions and 1 deletions

View File

@ -961,6 +961,26 @@ public class OfflinePlayer implements Player {
return 0; return 0;
} }
@Override
public boolean discoverRecipe(NamespacedKey recipe) {
return false;
}
@Override
public int discoverRecipes(Collection<NamespacedKey> recipes) {
return 0;
}
@Override
public boolean undiscoverRecipe(NamespacedKey recipe) {
return false;
}
@Override
public int undiscoverRecipes(Collection<NamespacedKey> recipes) {
return 0;
}
@Override @Override
public boolean hasLineOfSight(Entity entity) { public boolean hasLineOfSight(Entity entity) {
return false; return false;
@ -1535,7 +1555,12 @@ public class OfflinePlayer implements Player {
return null; return null;
} }
@Override @Override
public BlockFace getFacing() {
return null;
}
@Override
public void updateCommands() { public void updateCommands() {
} }
} }

View File

@ -84,6 +84,11 @@ public class FakeWorld implements World {
throw new UnsupportedOperationException("Not supported yet."); throw new UnsupportedOperationException("Not supported yet.");
} }
@Override
public boolean isChunkGenerated(int x, int z) {
throw new UnsupportedOperationException("Not supported yet.");
}
@Override @Override
public void loadChunk(int i, int i1) { public void loadChunk(int i, int i1) {
throw new UnsupportedOperationException("Not supported yet."); throw new UnsupportedOperationException("Not supported yet.");
@ -714,6 +719,11 @@ public class FakeWorld implements World {
throw new UnsupportedOperationException("Not supported yet."); throw new UnsupportedOperationException("Not supported yet.");
} }
@Override
public Location locateNearestStructure(Location origin, StructureType structureType, int radius, boolean findUnexplored) {
throw new UnsupportedOperationException("Not supported yet.");
}
@Override @Override
public List<Entity> getNearbyEntities(Location loc, double x, double y, double z) { public List<Entity> getNearbyEntities(Location loc, double x, double y, double z) {
throw new UnsupportedOperationException("Not supported yet."); throw new UnsupportedOperationException("Not supported yet.");