Skip to content
Open
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 @@ -63,7 +63,7 @@ public static Enchantment read(RegistryEntryContext context) {

BedrockEnchantment bedrockEnchantment = BedrockEnchantment.getByJavaIdentifier(context.id().asString());

String description = bedrockEnchantment == null ? MessageTranslator.deserializeDescription(context.session(), data) : null;
String description = MessageTranslator.deserializeDescription(context.session(), data);

return new Enchantment(effects, supportedItems, maxLevel, description, anvilCost, exclusiveSet, bedrockEnchantment);
}
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/org/geysermc/geyser/item/type/Item.java
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ public void translateNbtToJava(@NonNull GeyserSession session, @NonNull NbtMap b
}

BedrockEnchantment bedrockEnchantment = enchantment.bedrockEnchantment();
if (bedrockEnchantment == null) {
if (bedrockEnchantment == null || bedrockEnchantment == BedrockEnchantment.EFFICIENCY) {
String enchantmentTranslation = MinecraftLocale.getLocaleString(enchantment.description(), session.locale());
addJavaOnlyEnchantment(session, builder, enchantmentTranslation, level);
builder.addEnchantmentGlint();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ protected void handleBlockBreakActions(PlayerAuthInputPacket packet) {
// At this point it's safe to assume that we won't get subsequent block actions on this position
// so reset it and return since we've already broken the block
if (Objects.equals(lastMinedPosition, position)) {
lastMinedPosition = null;
this.lastMinedPosition = null;
continue;
}

Expand Down Expand Up @@ -515,7 +515,7 @@ protected boolean canDestroyBlock(BlockState state) {

protected boolean mayBreak(float progress, boolean bedrockDestroyed) {
// We're tolerant here to account for e.g. obsidian breaking speeds not matching 1:1 :(
return (serverSideBlockBreaking && progress >= 1.0F) || (bedrockDestroyed && progress >= 0.7F);
return (progress >= 1.0F) || (bedrockDestroyed && progress >= 0.7F);
}

protected void destroyBlock(BlockState state, Vector3i vector, Direction direction, boolean instamine) {
Expand Down