mirror of
https://github.com/GeyserMC/Geyser.git
synced 2026-01-04 15:31:36 +00:00
Merge branch 'master' of https://github.com/GeyserMC/Geyser into dev
This commit is contained in:
@@ -94,7 +94,7 @@ public abstract class GeyserJacksonConfiguration implements GeyserConfiguration
|
||||
private boolean debugMode = false;
|
||||
|
||||
@JsonProperty("allow-third-party-capes")
|
||||
private boolean allowThirdPartyCapes = true;
|
||||
private boolean allowThirdPartyCapes = false;
|
||||
|
||||
@JsonProperty("show-cooldown")
|
||||
private String showCooldown = "title";
|
||||
|
||||
@@ -80,7 +80,10 @@ public class InteractionEntity extends Entity {
|
||||
}
|
||||
|
||||
public void setHeight(FloatEntityMetadata height) {
|
||||
setBoundingBoxHeight(height.getPrimitiveValue());
|
||||
// Bedrock does *not* like high values being placed here
|
||||
// https://gist.github.com/Owen1212055/f5d59169d3a6a5c32f0c173d57eb199d recommend(s/ed) using the tactic
|
||||
// https://github.com/GeyserMC/Geyser/issues/4688
|
||||
setBoundingBoxHeight(Math.min(height.getPrimitiveValue(), 64f));
|
||||
}
|
||||
|
||||
public void setResponse(BooleanEntityMetadata response) {
|
||||
|
||||
@@ -41,16 +41,18 @@ public class TippedArrowItem extends ArrowItem {
|
||||
|
||||
@Override
|
||||
public ItemData.Builder translateToBedrock(int count, DataComponents components, ItemMapping mapping, ItemMappings mappings) {
|
||||
PotionContents potionContents = components.get(DataComponentType.POTION_CONTENTS);
|
||||
if (potionContents != null) {
|
||||
TippedArrowPotion tippedArrowPotion = TippedArrowPotion.of(potionContents.getPotionId());
|
||||
if (tippedArrowPotion != null) {
|
||||
return ItemData.builder()
|
||||
.definition(mapping.getBedrockDefinition())
|
||||
.damage(tippedArrowPotion.getBedrockId())
|
||||
.count(count);
|
||||
if (components != null) {
|
||||
PotionContents potionContents = components.get(DataComponentType.POTION_CONTENTS);
|
||||
if (potionContents != null) {
|
||||
TippedArrowPotion tippedArrowPotion = TippedArrowPotion.of(potionContents.getPotionId());
|
||||
if (tippedArrowPotion != null) {
|
||||
return ItemData.builder()
|
||||
.definition(mapping.getBedrockDefinition())
|
||||
.damage(tippedArrowPotion.getBedrockId())
|
||||
.count(count);
|
||||
}
|
||||
GeyserImpl.getInstance().getLogger().debug("Unknown Java potion (tipped arrow): " + potionContents.getPotionId());
|
||||
}
|
||||
GeyserImpl.getInstance().getLogger().debug("Unknown Java potion (tipped arrow): " + potionContents.getPotionId());
|
||||
}
|
||||
return super.translateToBedrock(count, components, mapping, mappings);
|
||||
}
|
||||
|
||||
@@ -72,10 +72,6 @@ public class JavaContainerSetSlotTranslator extends PacketTranslator<Clientbound
|
||||
|
||||
InventoryTranslator translator = session.getInventoryTranslator();
|
||||
if (translator != null) {
|
||||
if (session.getCraftingGridFuture() != null) {
|
||||
session.getCraftingGridFuture().cancel(false);
|
||||
}
|
||||
|
||||
int slot = packet.getSlot();
|
||||
if (slot >= inventory.getSize()) {
|
||||
GeyserLogger logger = session.getGeyser().getLogger();
|
||||
@@ -112,14 +108,22 @@ public class JavaContainerSetSlotTranslator extends PacketTranslator<Clientbound
|
||||
* Checks for a changed output slot in the crafting grid, and ensures Bedrock sees the recipe.
|
||||
*/
|
||||
private static void updateCraftingGrid(GeyserSession session, int slot, ItemStack item, Inventory inventory, InventoryTranslator translator) {
|
||||
// Check if it's the crafting grid result slot.
|
||||
if (slot != 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Check if there is any crafting grid.
|
||||
int gridSize = translator.getGridSize();
|
||||
if (gridSize == -1) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Only process the most recent crafting grid result, and cancel the previous one.
|
||||
if (session.getCraftingGridFuture() != null) {
|
||||
session.getCraftingGridFuture().cancel(false);
|
||||
}
|
||||
|
||||
if (InventoryUtils.isEmpty(item)) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user