Skip to content

Commit ae05437

Browse files
committed
Bedrock 1.26.10
1 parent 1525a67 commit ae05437

34 files changed

Lines changed: 426 additions & 60 deletions

src/main/java/cn/nukkit/GameVersion.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ public enum GameVersion {
6868
V1_21_124(860, "1.21.124"),
6969
V1_21_130(898, "1.21.130"),
7070
V1_26_0(924, "1.26.0", "1.26"),
71+
V1_26_10(944, "1.26.10"),
7172
;
7273

7374
private static GameVersion FEATURE_VERSION = GameVersion.V1_20_10;

src/main/java/cn/nukkit/block/BlockBookshelfChiseled.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,10 @@ public boolean onActivate(Item item, BlockFace face, float fx, float fy, float f
113113
return false;
114114
}
115115

116+
if (false || item.hasLock()) {
117+
return true;
118+
}
119+
116120
BlockEntityChiseledBookshelf blockEntity = getBlockEntity();
117121
if (blockEntity == null) {
118122
blockEntity = createBlockEntity(null);
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
package cn.nukkit.block;
2+
3+
public class BlockDandelionGolden extends BlockDandelion {
4+
BlockDandelionGolden() {
5+
}
6+
7+
@Override
8+
public int getId() {
9+
return GOLDEN_DANDELION;
10+
}
11+
12+
@Override
13+
public String getName() {
14+
return "Golden Dandelion";
15+
}
16+
17+
@Override
18+
public boolean canBeActivated() {
19+
return false;
20+
}
21+
22+
@Override
23+
public boolean isFertilizable() {
24+
return false;
25+
}
26+
27+
@Override
28+
public int getCompostableChance() {
29+
return 0;
30+
}
31+
32+
@Override
33+
protected Block getUncommonFlower() {
34+
return this;
35+
}
36+
}

src/main/java/cn/nukkit/block/BlockDeadBush.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,6 @@ public boolean isVegetation() {
109109
private boolean canSurvive() {
110110
Block below = down();
111111
int id = below.getId();
112-
return id == SAND || id == RED_SAND || below.isTerracotta() || id == DIRT || id == COARSE_DIRT || id == PODZOL || id == MYCELIUM || id == DIRT_WITH_ROOTS || id == MUD || id == GRASS_BLOCK || id == MUDDY_MANGROVE_ROOTS || id == SUSPICIOUS_SAND;
112+
return id == SAND || id == RED_SAND || below.isTerracotta() || id == DIRT || id == COARSE_DIRT || id == PODZOL || id == MYCELIUM || id == DIRT_WITH_ROOTS || id == MUD || id == GRASS_BLOCK || id == MUDDY_MANGROVE_ROOTS || id == SUSPICIOUS_SAND || id == FARMLAND;
113113
}
114114
}

src/main/java/cn/nukkit/block/BlockDecoratedPot.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,10 @@ public boolean onActivate(Item item, BlockFace face, float fx, float fy, float f
9999
}
100100

101101
boolean success = false;
102-
Item slot = blockEntity.getItem();
103-
if (slot == null) {
102+
Item slot;
103+
if (item.hasLock()) {
104+
slot = null;
105+
} else if ((slot = blockEntity.getItem()) == null) {
104106
if (!item.isNull()) {
105107
success = true;
106108

src/main/java/cn/nukkit/block/BlockFullNames.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1402,4 +1402,5 @@ public interface BlockFullNames {
14021402
String WAXED_EXPOSED_COPPER_LANTERN = "minecraft:" + BlockNames.WAXED_EXPOSED_COPPER_LANTERN;
14031403
String WAXED_WEATHERED_COPPER_LANTERN = "minecraft:" + BlockNames.WAXED_WEATHERED_COPPER_LANTERN;
14041404
String WAXED_OXIDIZED_COPPER_LANTERN = "minecraft:" + BlockNames.WAXED_OXIDIZED_COPPER_LANTERN;
1405+
String GOLDEN_DANDELION = "minecraft:" + BlockNames.GOLDEN_DANDELION;
14051406
}

src/main/java/cn/nukkit/block/BlockID.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1447,7 +1447,8 @@ public interface BlockID {
14471447
int WAXED_EXPOSED_COPPER_LANTERN = 1343;
14481448
int WAXED_WEATHERED_COPPER_LANTERN = 1344;
14491449
int WAXED_OXIDIZED_COPPER_LANTERN = 1345;
1450+
int GOLDEN_DANDELION = 1346;
14501451

14511452

1452-
int UNDEFINED = 1346;
1453+
int UNDEFINED = 1347;
14531454
}

src/main/java/cn/nukkit/block/BlockLectern.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,10 @@ public boolean canBeActivated() {
137137

138138
@Override
139139
public boolean onActivate(Item item, BlockFace face, float fx, float fy, float fz, Player player) {
140+
if (false || item.hasLock()) {
141+
return true;
142+
}
143+
140144
BlockEntityLectern blockEntity = getBlockEntity();
141145
if (blockEntity == null) {
142146
blockEntity = createBlockEntity(null);

src/main/java/cn/nukkit/block/BlockNames.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1401,4 +1401,5 @@ public interface BlockNames {
14011401
String WAXED_EXPOSED_COPPER_LANTERN = "waxed_exposed_copper_lantern";
14021402
String WAXED_WEATHERED_COPPER_LANTERN = "waxed_weathered_copper_lantern";
14031403
String WAXED_OXIDIZED_COPPER_LANTERN = "waxed_oxidized_copper_lantern";
1404+
String GOLDEN_DANDELION = "golden_dandelion";
14041405
}

src/main/java/cn/nukkit/block/BlockNoteblock.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,10 @@ public enum Instrument {
350350
CREEPER(SoundEnum.NOTE_CREEPER),
351351
ENDER_DRAGON(SoundEnum.NOTE_ENDERDRAGON),
352352
PIGLIN(SoundEnum.NOTE_PIGLIN),
353+
TRUMPET(SoundEnum.NOTE_TRUMPET),
354+
TRUMPET_EXPOSED(SoundEnum.NOTE_TRUMPET_EXPOSED),
355+
TRUMPET_WEATHERED(SoundEnum.NOTE_TRUMPET_WEATHERED),
356+
TRUMPET_OXIDIZED(SoundEnum.NOTE_TRUMPET_OXIDIZED),
353357
;
354358

355359
private final SoundEnum sound;

0 commit comments

Comments
 (0)