Skip to content

Commit

Permalink
Fix cinematic camera track control
Browse files Browse the repository at this point in the history
  • Loading branch information
wode490390 committed Jun 1, 2024
1 parent 82afdcd commit 1e0d9cb
Show file tree
Hide file tree
Showing 3 changed files with 118 additions and 0 deletions.
77 changes: 77 additions & 0 deletions src/main/java/cn/nukkit/level/Fogs.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
package cn.nukkit.level;

// This file is generated automatically, do not edit it manually.
public interface Fogs {
String BAMBOO_JUNGLE = "minecraft:fog_bamboo_jungle";
String BAMBOO_JUNGLE_HILLS = "minecraft:fog_bamboo_jungle_hills";
String BASALT_DELTAS = "minecraft:fog_basalt_deltas";
String BEACH = "minecraft:fog_beach";
String BIRCH_FOREST = "minecraft:fog_birch_forest";
String BIRCH_FOREST_HILLS = "minecraft:fog_birch_forest_hills";
String CHERRY_GROVE = "minecraft:fog_cherry_grove";
String COLD_BEACH = "minecraft:fog_cold_beach";
String COLD_OCEAN = "minecraft:fog_cold_ocean";
String COLD_TAIGA = "minecraft:fog_cold_taiga";
String COLD_TAIGA_HILLS = "minecraft:fog_cold_taiga_hills";
String COLD_TAIGA_MUTATED = "minecraft:fog_cold_taiga_mutated";
String CRIMSON_FOREST = "minecraft:fog_crimson_forest";
String DEEP_COLD_OCEAN = "minecraft:fog_deep_cold_ocean";
String DEEP_FROZEN_OCEAN = "minecraft:fog_deep_frozen_ocean";
String DEEP_LUKEWARM_OCEAN = "minecraft:fog_deep_lukewarm_ocean";
String DEEP_OCEAN = "minecraft:fog_deep_ocean";
String DEEP_WARM_OCEAN = "minecraft:fog_deep_warm_ocean";
String DEFAULT = "minecraft:fog_default";
String DESERT = "minecraft:fog_desert";
String DESERT_HILLS = "minecraft:fog_desert_hills";
String EXTREME_HILLS_EDGE = "minecraft:fog_extreme_hills_edge";
String EXTREME_HILLS = "minecraft:fog_extreme_hills";
String EXTREME_HILLS_MUTATED = "minecraft:fog_extreme_hills_mutated";
String EXTREME_HILLS_PLUS_TREES = "minecraft:fog_extreme_hills_plus_trees";
String EXTREME_HILLS_PLUS_TREES_MUTATED = "minecraft:fog_extreme_hills_plus_trees_mutated";
String FLOWER_FOREST = "minecraft:fog_flower_forest";
String FOREST = "minecraft:fog_forest";
String FOREST_HILLS = "minecraft:fog_forest_hills";
String FROZEN_OCEAN = "minecraft:fog_frozen_ocean";
String FROZEN_RIVER = "minecraft:fog_frozen_river";
String HELL = "minecraft:fog_hell";
String ICE_MOUNTAINS = "minecraft:fog_ice_mountains";
String ICE_PLAINS = "minecraft:fog_ice_plains";
String ICE_PLAINS_SPIKES = "minecraft:fog_ice_plains_spikes";
String JUNGLE_EDGE = "minecraft:fog_jungle_edge";
String JUNGLE = "minecraft:fog_jungle";
String JUNGLE_HILLS = "minecraft:fog_jungle_hills";
String JUNGLE_MUTATED = "minecraft:fog_jungle_mutated";
String LUKEWARM_OCEAN = "minecraft:fog_lukewarm_ocean";
String MANGROVE_SWAMP = "minecraft:fog_mangrove_swamp";
String MEGA_SPRUCE_TAIGA = "minecraft:fog_mega_spruce_taiga";
String MEGA_SPRUSE_TAIGA_MUTATED = "minecraft:fog_mega_spruce_taiga_mutated";
String MEGA_TAIGA = "minecraft:fog_mega_taiga";
String MEGA_TAIGA_HILLS = "minecraft:fog_mega_taiga_hills";
String MEGA_TAIGA_MUTATED = "minecraft:fog_mega_taiga_mutated";
String MESA_BRYCE = "minecraft:fog_mesa_bryce";
String MESA = "minecraft:fog_mesa";
String MESA_MUTATED = "minecraft:fog_mesa_mutated";
String MESA_PLATEAU = "minecraft:fog_mesa_plateau";
String MESA_PLATEAU_STONE = "minecraft:fog_mesa_plateau_stone";
String MUSHROOM_ISLAND = "minecraft:fog_mushroom_island";
String MUSHROOM_ISLAND_SHORE = "minecraft:fog_mushroom_island_shore";
String OCEAN = "minecraft:fog_ocean";
String PLAINS = "minecraft:fog_plains";
String POWDER_SNOW = "minecraft:fog_powder_snow";
String RIVER = "minecraft:fog_river";
String ROOFED_FOREST = "minecraft:fog_roofed_forest";
String SAVANNA = "minecraft:fog_savanna";
String SAVANNA_MUTATED = "minecraft:fog_savanna_mutated";
String SAVANNA_PLATEAU = "minecraft:fog_savanna_plateau";
String SOULSAND_VALLEY = "minecraft:fog_soulsand_valley";
String STONE_BEACH = "minecraft:fog_stone_beach";
String SUNFLOWER_PLAINS = "minecraft:fog_sunflower_plains";
String SWAMPLAND = "minecraft:fog_swampland";
String SWAMPLAND_MUTATED = "minecraft:fog_swampland_mutated";
String TAIGA = "minecraft:fog_taiga";
String TAIGA_HILLS = "minecraft:fog_taiga_hills";
String TAIGA_MUTATED = "minecraft:fog_taiga_mutated";
String THE_END = "minecraft:fog_the_end";
String WARM_OCEAN = "minecraft:fog_warm_ocean";
String WARPED_FOREST = "minecraft:fog_warped_forest";
}
31 changes: 31 additions & 0 deletions src/main/java/cn/nukkit/level/Location.java
Original file line number Diff line number Diff line change
Expand Up @@ -202,4 +202,35 @@ public Location clone() {
public final Location copyLocation() {
return new Location(x, y, z, yaw, pitch, level);
}

public final boolean equalsLocation(Location that) {
if (that == null) {
return false;
}
return that.level == this.level
&& Double.compare(that.x, this.x) == 0
&& Double.compare(that.y, this.y) == 0
&& Double.compare(that.z, this.z) == 0
&& Double.compare(that.yaw, this.yaw) == 0
&& Double.compare(that.pitch, this.pitch) == 0;
}

public final boolean equalsRot(Location that) {
if (that == null) {
return false;
}
return Double.compare(that.yaw, this.yaw) == 0
&& Double.compare(that.pitch, this.pitch) == 0;
}

public final boolean equalsVecAndRot(Location that) {
if (that == null) {
return false;
}
return Double.compare(that.x, this.x) == 0
&& Double.compare(that.y, this.y) == 0
&& Double.compare(that.z, this.z) == 0
&& Double.compare(that.yaw, this.yaw) == 0
&& Double.compare(that.pitch, this.pitch) == 0;
}
}
10 changes: 10 additions & 0 deletions src/main/java/cn/nukkit/level/Position.java
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,16 @@ public final Position copyPos() {
return new Position(x, y, z, level);
}

public final boolean equalsPosition(Position that) {
if (that == null) {
return false;
}
return that.level == this.level
&& Double.compare(that.x, this.x) == 0
&& Double.compare(that.y, this.y) == 0
&& Double.compare(that.z, this.z) == 0;
}

@Nullable
public FullChunk getChunk() {
return getChunk(false);
Expand Down

0 comments on commit 1e0d9cb

Please sign in to comment.