-
Notifications
You must be signed in to change notification settings - Fork 274
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* ImmutableItemStack ItemMeta NPE
- Loading branch information
Showing
79 changed files
with
2,686 additions
and
727 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,3 +22,4 @@ dependency-reduced-pom.xml | |
.db | ||
.DS_Store | ||
.vscode | ||
server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
package net.glowstone.chunk; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
import org.bukkit.NamespacedKey; | ||
|
||
import javax.annotation.Nullable; | ||
import java.util.Optional; | ||
import java.util.OptionalLong; | ||
|
||
@Data | ||
@AllArgsConstructor | ||
public final class DimensionType { | ||
|
||
private final boolean piglinSafe; | ||
|
||
private final boolean hasRaids; | ||
|
||
private final int monsterSpawnLightLevel; | ||
|
||
private final int monsterSpawnBlockLightLimit; | ||
|
||
private final boolean natural; | ||
|
||
private final float ambientLight; | ||
|
||
private final OptionalLong fixedTime; | ||
|
||
@Nullable | ||
private final Optional<NamespacedKey> infiniburn; | ||
|
||
private final boolean respawnAnchorWorks; | ||
|
||
private final boolean skyLight; | ||
|
||
private final boolean bedWorks; | ||
|
||
private final NamespacedKey effects; | ||
|
||
private final int minY; | ||
|
||
private final int height; | ||
|
||
private final int logicalHeight; | ||
|
||
private final double coordinateScale; | ||
|
||
private final boolean ultraWarm; | ||
|
||
private final boolean hasCeiling; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package net.glowstone.chunk; | ||
|
||
import org.bukkit.NamespacedKey; | ||
|
||
import java.util.Optional; | ||
import java.util.OptionalLong; | ||
|
||
public class DimensionTypes { | ||
|
||
public static final DimensionType OVERWORLD = new DimensionType( | ||
false, | ||
true, | ||
7, | ||
0, | ||
true, | ||
0.0F, | ||
OptionalLong.empty(), | ||
Optional.empty(), | ||
false, | ||
true, | ||
true, | ||
NamespacedKey.minecraft("overworld"), | ||
-64, | ||
384, | ||
384, | ||
1.0D, | ||
false, | ||
false | ||
); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package net.glowstone.chunk; | ||
|
||
import lombok.Data; | ||
|
||
@Data | ||
public class SectionPosition { | ||
|
||
private final int x; | ||
private final int y; | ||
private final int z; | ||
|
||
public static SectionPosition fromLong(long encoded) { | ||
int sectionX = (int) (encoded >> 42); | ||
int sectionY = (int) (encoded << 44 >> 44); | ||
int sectionZ = (int) (encoded << 22 >> 42); | ||
return new SectionPosition(sectionX, sectionY, sectionZ); | ||
} | ||
|
||
public long asLong() { | ||
return ((x & 0x3FFFFF) << 42) | (y & 0xFFFFF) | ((z & 0x3FFFFF) << 20); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
package net.glowstone.chunk; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
|
||
import java.util.Optional; | ||
import java.util.OptionalInt; | ||
|
||
@Data | ||
@AllArgsConstructor | ||
public class WorldGenBiome { | ||
|
||
private String precipitation; | ||
|
||
private float depth; | ||
|
||
private float temperature; | ||
|
||
private float scale; | ||
|
||
private float downfall; | ||
|
||
private String category; | ||
|
||
private Optional<String> temperatureModifier; | ||
|
||
private int skyColor; | ||
|
||
private int waterFogColor; | ||
|
||
private int fogColor; | ||
|
||
private int waterColor; | ||
|
||
private OptionalInt foliageColor; | ||
|
||
private OptionalInt grassColor; | ||
|
||
private Optional<String> grassColorModifier; | ||
|
||
private Optional<String> music; | ||
|
||
private Optional<String> ambientSound; | ||
|
||
private Optional<String> additionsSound; | ||
|
||
private Optional<String> moodSound; | ||
|
||
private float particleProbability; | ||
|
||
private String particleOptions; | ||
|
||
} |
Oops, something went wrong.