Big World Resources Collection Implement (#1368)

* init

* init

* init

* revoke

* fix error

* mining support

* mining support

* Roks endurance support

* Roks endurance support

* Timed refresh

* upgrade resource data

* Timed refresh support

* remove null gadget

* Coordination

* full synchronized

* oh no, my math teacher will hit me!

* synchronized onInteract

* remove break;

* supply re-spawn time , thanks to @wl23333

* Clean up and integrate collection spawns into SpawnDataEntries

Co-authored-by: Melledy <52122272+Melledy@users.noreply.github.com>
This commit is contained in:
zhaodice
2022-06-29 19:53:50 +08:00
committed by GitHub
parent 17fb19ebc9
commit 2462da2ede
19 changed files with 507 additions and 72 deletions

View File

@@ -135,9 +135,20 @@ public class Position implements Serializable {
}
public boolean equal2d(Position other) {
return getX() == other.getX() && getY() == other.getY();
// Y is height
return getX() == other.getX() && getZ() == other.getZ();
}
public boolean equal3d(Position other) {
return getX() == other.getX() && getY() == other.getY() && getZ() == other.getZ();
}
public double computeDistance(Position b){
double detX = getX()-b.getX();
double detY = getY()-b.getY();
double detZ = getZ()-b.getZ();
return Math.sqrt(detX*detX+detY*detY+detZ*detZ);
}
public Position translateWithDegrees(float dist, float angle) {
angle = (float) Math.toRadians(angle);
this.x += dist * Math.sin(angle);