Various work on getting Doors working.
This commit is contained in:
parent
25ebb8b0e6
commit
5846493b55
7 changed files with 16 additions and 2 deletions
|
@ -212,7 +212,12 @@ public class PocketTemplate {
|
|||
if (tile instanceof RiftBlockEntity) {
|
||||
LOGGER.debug("Rift found in schematic at " + pos);
|
||||
RiftBlockEntity rift = (RiftBlockEntity) tile;
|
||||
rift.getDestination().setLocation(new Location((ServerWorld) rift.getWorld(), rift.getPos()));
|
||||
rift
|
||||
.getDestination()
|
||||
.setLocation(
|
||||
new Location(
|
||||
(ServerWorld) rift.getWorld(),
|
||||
rift.getPos()));
|
||||
rifts.add(rift);
|
||||
} else if (tile instanceof Inventory) {
|
||||
Inventory inventory = (Inventory) tile;
|
||||
|
|
|
@ -18,6 +18,8 @@ import java.util.UUID;
|
|||
public class EscapeTarget extends VirtualTarget implements EntityTarget { // TODO: createRift option
|
||||
protected boolean canEscapeLimbo = false;
|
||||
|
||||
public EscapeTarget() {}
|
||||
|
||||
public EscapeTarget(boolean canEscapeLimbo) {
|
||||
this.canEscapeLimbo = canEscapeLimbo;
|
||||
}
|
||||
|
|
|
@ -8,6 +8,8 @@ import org.dimdev.annotatednbt.AnnotatedNbt;
|
|||
public class GlobalReference extends RiftReference {
|
||||
@Saved protected Location target;
|
||||
|
||||
public GlobalReference() {};
|
||||
|
||||
public GlobalReference(Location target) {
|
||||
this.target = target;
|
||||
}
|
||||
|
|
|
@ -9,6 +9,8 @@ import org.dimdev.annotatednbt.AnnotatedNbt;
|
|||
public class LocalReference extends RiftReference {
|
||||
@Saved protected BlockPos target;
|
||||
|
||||
public LocalReference() {}
|
||||
|
||||
public LocalReference(BlockPos target) {
|
||||
this.target = target;
|
||||
}
|
||||
|
|
|
@ -7,6 +7,8 @@ public abstract class RestoringTarget extends VirtualTarget {
|
|||
|
||||
private VirtualTarget wrappedDestination;
|
||||
|
||||
public RestoringTarget() {};
|
||||
|
||||
@Override
|
||||
public void fromTag(CompoundTag nbt) {
|
||||
super.fromTag(nbt);
|
||||
|
|
|
@ -16,6 +16,7 @@ import java.util.Set;
|
|||
* (see shouldInvalidate)
|
||||
*/
|
||||
public abstract class RiftReference extends VirtualTarget {
|
||||
public RiftReference() {}
|
||||
|
||||
// Helper methods to create a certain type of reference, defaulting to
|
||||
// a global destination if not possible
|
||||
|
|
|
@ -21,7 +21,7 @@ public final class Pocket {
|
|||
public Pocket(int id, ServerWorld world, int x, int z) {
|
||||
this.id = id;
|
||||
this.world = world;
|
||||
new BlockBox(x * 16, 0, z * 16, (x + 1) * 16, 0, (z + 1) * 16);
|
||||
box = new BlockBox(x * 16, 0, z * 16, (x + 1) * 16, 0, (z + 1) * 16);
|
||||
}
|
||||
|
||||
boolean isInBounds(BlockPos pos) {
|
||||
|
|
Loading…
Reference in a new issue