Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@
- if (this.isFallFlying() && state.is(BlockTags.CAN_GLIDE_THROUGH)) {
+ if (this.isFallFlying() && state.isAny(org.dreeam.leaf.util.BlockMasks.CAN_GLIDE_THROUGH_TAG)) { // Gale - Pre-compute - Common BlockState predicates - Apply
return false;
} else if (state.is(BlockTags.CLIMBABLE)) {
- } else if (state.is(BlockTags.CLIMBABLE)) {
+ } else if (state.isAny(org.dreeam.leaf.util.BlockMasks.CLIMBABLE_TAG)) { // Gale - Pre-compute - Common BlockState predicates - Apply
this.lastClimbablePos = Optional.of(ladderCheckPos);
@@ -2185,8 +_,30 @@

Expand Down
18 changes: 18 additions & 0 deletions gale-server/src/main/java/org/dreeam/leaf/util/BlockMasks.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,21 @@ public final class BlockMasks {
*/
public static final int CAN_GLIDE_THROUGH_TAG = 0x800;

/**
* {@link BlockTags#DOORS}.
*/
public static final int DOORS_TAG = 0x20;

/**
* {@link BlockTags#ICE}.
*/
public static final int ICE_TAG = 0x40;

/**
* {@link BlockTags#BEDS}.
*/
public static final int BEDS_TAG = 0x80;

/**
* {@link #WALLS_TAG} or {@link #FENCE_GATE_CLASS}.
*/
Expand All @@ -83,6 +98,9 @@ public static int init(final BlockState state) {
i |= state.is(BlockTags.CLIMBABLE) ? CLIMBABLE_TAG : 0;
i |= state.is(BlockTags.CAULDRONS) ? CAULDRONS_TAG : 0;
i |= state.is(BlockTags.CAN_GLIDE_THROUGH) ? CAN_GLIDE_THROUGH_TAG : 0;
i |= state.is(BlockTags.DOORS) ? DOORS_TAG : 0;
i |= state.is(BlockTags.ICE) ? ICE_TAG : 0;
i |= state.is(BlockTags.BEDS) ? BEDS_TAG : 0;
i |= state.getBlock() instanceof PowderSnowBlock ? POWDER_SNOW_CLASS : 0;
i |= state.getBlock() instanceof FenceGateBlock ? FENCE_GATE_CLASS : 0;
i |= state.getBlock() instanceof TrapDoorBlock && state.getValue(TrapDoorBlock.OPEN) ? TRAP_DOOR_CLASS_AND_OPEN_PROPERTY_IS_TRUE : 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ index a250c3e9c2f5f927b99d17376dbf323ff153801f..a83a02c1f2402fe63e54b5343cdc9527
+ }
+ // Gale end - don't load chunks to activate climbing entities

if (iblockdata.is(BlockTags.CLIMBABLE)) {
- if (iblockdata.is(BlockTags.CLIMBABLE)) {
+ if (iblockdata.isAny(org.dreeam.leaf.util.BlockMasks.CLIMBABLE_TAG)) { // Gale - Pre-compute - Common BlockState predicates - Apply
this.lastClimbablePos = Optional.of(blockposition);
diff --git a/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java b/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java
index 566d33b127879c4c84557fce4ea4eb1c8c1130d5..3bcfcbb9bf085192c55aae58ddb231fb18dcabcd 100644
Expand Down
Loading