mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Merge remote-tracking branch 'upstream/master' into fix/protocol
This commit is contained in:
commit
fe26035668
3 changed files with 5 additions and 5 deletions
|
@ -260,8 +260,6 @@ public final class BlockStateValues {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Non-water cauldrons (since Bedrock 1.18.30) must have a block entity packet sent on chunk load to fix rendering issues.
|
|
||||||
*
|
|
||||||
* @return if this Java block state is a non-empty non-water cauldron
|
* @return if this Java block state is a non-empty non-water cauldron
|
||||||
*/
|
*/
|
||||||
public static boolean isNonWaterCauldron(int state) {
|
public static boolean isNonWaterCauldron(int state) {
|
||||||
|
@ -269,6 +267,8 @@ public final class BlockStateValues {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Cauldrons (since Bedrock 1.18.30) must have a block entity packet sent on chunk load to fix rendering issues.
|
||||||
|
* <p>
|
||||||
* When using a bucket on a cauldron sending a ServerboundUseItemPacket can result in the liquid being placed.
|
* When using a bucket on a cauldron sending a ServerboundUseItemPacket can result in the liquid being placed.
|
||||||
*
|
*
|
||||||
* @return if this Java block state is a cauldron
|
* @return if this Java block state is a cauldron
|
||||||
|
|
|
@ -63,7 +63,7 @@ public interface BedrockOnlyBlockEntity extends RequiresBlockState {
|
||||||
return FlowerPotBlockEntityTranslator.getTag(session, blockState, position);
|
return FlowerPotBlockEntityTranslator.getTag(session, blockState, position);
|
||||||
} else if (PistonBlockEntityTranslator.isBlock(blockState)) {
|
} else if (PistonBlockEntityTranslator.isBlock(blockState)) {
|
||||||
return PistonBlockEntityTranslator.getTag(blockState, position);
|
return PistonBlockEntityTranslator.getTag(blockState, position);
|
||||||
} else if (BlockStateValues.isNonWaterCauldron(blockState)) {
|
} else if (BlockStateValues.isCauldron(blockState)) {
|
||||||
// As of 1.18.30: this is required to make rendering not look weird on chunk load (lava and snow cauldrons look dim)
|
// As of 1.18.30: this is required to make rendering not look weird on chunk load (lava and snow cauldrons look dim)
|
||||||
return NbtMap.builder()
|
return NbtMap.builder()
|
||||||
.putString("id", "Cauldron")
|
.putString("id", "Cauldron")
|
||||||
|
|
|
@ -200,7 +200,7 @@ public class JavaLevelChunkWithLightTranslator extends PacketTranslator<Clientbo
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if block is piston or flower to see if we'll need to create additional block entities, as they're only block entities in Bedrock
|
// Check if block is piston or flower to see if we'll need to create additional block entities, as they're only block entities in Bedrock
|
||||||
if (BlockStateValues.getFlowerPotValues().containsKey(javaId) || BlockStateValues.getPistonValues().containsKey(javaId) || BlockStateValues.isNonWaterCauldron(javaId)) {
|
if (BlockStateValues.getFlowerPotValues().containsKey(javaId) || BlockStateValues.getPistonValues().containsKey(javaId) || BlockStateValues.isCauldron(javaId)) {
|
||||||
bedrockBlockEntities.add(BedrockOnlyBlockEntity.getTag(session,
|
bedrockBlockEntities.add(BedrockOnlyBlockEntity.getTag(session,
|
||||||
Vector3i.from((packet.getX() << 4) + (yzx & 0xF), ((sectionY + yOffset) << 4) + ((yzx >> 8) & 0xF), (packet.getZ() << 4) + ((yzx >> 4) & 0xF)),
|
Vector3i.from((packet.getX() << 4) + (yzx & 0xF), ((sectionY + yOffset) << 4) + ((yzx >> 8) & 0xF), (packet.getZ() << 4) + ((yzx >> 4) & 0xF)),
|
||||||
javaId
|
javaId
|
||||||
|
@ -259,7 +259,7 @@ public class JavaLevelChunkWithLightTranslator extends PacketTranslator<Clientbo
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if block is piston, flower or cauldron to see if we'll need to create additional block entities, as they're only block entities in Bedrock
|
// Check if block is piston, flower or cauldron to see if we'll need to create additional block entities, as they're only block entities in Bedrock
|
||||||
if (BlockStateValues.getFlowerPotValues().containsKey(javaId) || BlockStateValues.getPistonValues().containsKey(javaId) || BlockStateValues.isNonWaterCauldron(javaId)) {
|
if (BlockStateValues.getFlowerPotValues().containsKey(javaId) || BlockStateValues.getPistonValues().containsKey(javaId) || BlockStateValues.isCauldron(javaId)) {
|
||||||
bedrockOnlyBlockEntityIds.set(i);
|
bedrockOnlyBlockEntityIds.set(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue