Skip to content

Commit

Permalink
oops fix
Browse files Browse the repository at this point in the history
  • Loading branch information
screret committed Nov 11, 2023
1 parent 9e950f9 commit bae5855
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
import net.minecraft.core.GlobalPos;
import net.minecraft.core.Registry;
import net.minecraft.core.particles.ParticleTypes;
import net.minecraft.core.registries.Registries;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.nbt.ListTag;
import net.minecraft.nbt.NbtUtils;
Expand Down Expand Up @@ -304,7 +303,7 @@ public void rotateRocket() {
}

public long computeRequiredFuelAmountForDestination(@Nullable Planet destination) {
Planet current = PlanetData.getPlanetFromLevelOrOrbit(this.level().dimension()).orElse(null);
Planet current = PlanetData.getPlanetFromLevelOrOrbit(this.level.dimension()).orElse(null);
if (current == null || destination == null) {
return (long) (this.getFuelCapacity() * 0.85);
} else if (destination.parentWorld() == current.level() || current.parentWorld() == destination.level()) {
Expand Down Expand Up @@ -774,7 +773,7 @@ protected void readAdditionalSaveData(CompoundTag compound) {
if (compound.contains("lastPos")) {
CompoundTag tag = compound.getCompound("lastPos");
BlockPos pos = NbtUtils.readBlockPos(tag.getCompound("pos"));
ResourceKey<Level> level = ResourceKey.create(Registries.DIMENSION, new ResourceLocation(tag.getString("level")));
ResourceKey<Level> level = ResourceKey.create(Registry.DIMENSION_REGISTRY, new ResourceLocation(tag.getString("level")));
this.lastPos = GlobalPos.of(level, pos);
}
}
Expand Down

0 comments on commit bae5855

Please sign in to comment.