Skip to content

Commit

Permalink
Merge branch 'GeyserMC:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
zimzaza4 authored May 27, 2024
2 parents 5299d49 + cb0488a commit 5f1c541
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,10 @@ public void setWidth(FloatEntityMetadata width) {
}

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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,18 @@ public TippedArrowItem(String javaIdentifier, Builder builder) {

@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);
}
Expand Down

0 comments on commit 5f1c541

Please sign in to comment.