Skip to content

Commit db246ff

Browse files
committed
Update Properties/Blocks, re-include neoforge, target 1.21.4 release
1 parent d114ab9 commit db246ff

24 files changed

+94
-106
lines changed

bootstrap/spigot/src/main/java/org/geysermc/geyser/platform/spigot/world/manager/GeyserSpigotNativeWorldManager.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
import org.geysermc.geyser.adapters.WorldAdapter;
3434
import org.geysermc.geyser.adapters.paper.PaperAdapters;
3535
import org.geysermc.geyser.adapters.spigot.SpigotAdapters;
36-
import org.geysermc.geyser.level.block.BlockStateValues;
3736
import org.geysermc.geyser.level.block.type.Block;
3837
import org.geysermc.geyser.session.GeyserSession;
3938

core/src/main/java/org/geysermc/geyser/level/block/Blocks.java

Lines changed: 52 additions & 21 deletions
Large diffs are not rendered by default.

core/src/main/java/org/geysermc/geyser/level/block/property/Properties.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,12 @@
2929
import org.geysermc.geyser.level.physics.Direction;
3030

3131
public final class Properties {
32+
public static final BooleanProperty ACTIVE = BooleanProperty.create("active");
3233
public static final BooleanProperty ATTACHED = BooleanProperty.create("attached");
34+
public static final BooleanProperty BERRIES = BooleanProperty.create("berries");
35+
public static final BooleanProperty BLOOM = BooleanProperty.create("bloom");
3336
public static final BooleanProperty BOTTOM = BooleanProperty.create("bottom");
37+
public static final BooleanProperty CAN_SUMMON = BooleanProperty.create("can_summon");
3438
public static final BooleanProperty CONDITIONAL = BooleanProperty.create("conditional");
3539
public static final BooleanProperty DISARMED = BooleanProperty.create("disarmed");
3640
public static final BooleanProperty DRAG = BooleanProperty.create("drag");
@@ -47,22 +51,20 @@ public final class Properties {
4751
public static final BooleanProperty INVERTED = BooleanProperty.create("inverted");
4852
public static final BooleanProperty IN_WALL = BooleanProperty.create("in_wall");
4953
public static final BooleanProperty LIT = BooleanProperty.create("lit");
50-
public static final BooleanProperty TIP = BooleanProperty.create("tip");
5154
public static final BooleanProperty LOCKED = BooleanProperty.create("locked");
55+
public static final BooleanProperty NATURAL = BooleanProperty.create("natural");
5256
public static final BooleanProperty OCCUPIED = BooleanProperty.create("occupied");
5357
public static final BooleanProperty OPEN = BooleanProperty.create("open");
5458
public static final BooleanProperty PERSISTENT = BooleanProperty.create("persistent");
5559
public static final BooleanProperty POWERED = BooleanProperty.create("powered");
5660
public static final BooleanProperty SHORT = BooleanProperty.create("short");
61+
public static final BooleanProperty SHRIEKING = BooleanProperty.create("shrieking");
5762
public static final BooleanProperty SIGNAL_FIRE = BooleanProperty.create("signal_fire");
5863
public static final BooleanProperty SNOWY = BooleanProperty.create("snowy");
64+
public static final BooleanProperty TIP = BooleanProperty.create("tip");
5965
public static final BooleanProperty TRIGGERED = BooleanProperty.create("triggered");
6066
public static final BooleanProperty UNSTABLE = BooleanProperty.create("unstable");
6167
public static final BooleanProperty WATERLOGGED = BooleanProperty.create("waterlogged");
62-
public static final BooleanProperty BERRIES = BooleanProperty.create("berries");
63-
public static final BooleanProperty BLOOM = BooleanProperty.create("bloom");
64-
public static final BooleanProperty SHRIEKING = BooleanProperty.create("shrieking");
65-
public static final BooleanProperty CAN_SUMMON = BooleanProperty.create("can_summon");
6668
public static final EnumProperty<Axis> HORIZONTAL_AXIS = EnumProperty.create("axis", Axis.X, Axis.Z);
6769
public static final EnumProperty<Axis> AXIS = EnumProperty.create("axis", Axis.VALUES);
6870
public static final BooleanProperty UP = BooleanProperty.create("up");
@@ -143,6 +145,5 @@ public final class Properties {
143145
public static final BooleanProperty CRAFTING = BooleanProperty.create("crafting");
144146
public static final BasicEnumProperty TRIAL_SPAWNER_STATE = BasicEnumProperty.create("trial_spawner_state", "inactive", "waiting_for_players", "active", "waiting_for_reward_ejection", "ejecting_reward", "cooldown");
145147
public static final BasicEnumProperty VAULT_STATE = BasicEnumProperty.create("vault_state", "inactive", "active", "unlocking", "ejecting");
146-
public static final BasicEnumProperty CREAKING = BasicEnumProperty.create("creaking", "disabled", "dormant", "active");
147148
public static final BooleanProperty OMINOUS = BooleanProperty.create("ominous");
148149
}

core/src/main/java/org/geysermc/geyser/translator/inventory/AnvilInventoryTranslator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ protected ItemStackResponse translateSpecialRequest(GeyserSession session, Inven
7373

7474
@Override
7575
public int bedrockSlotToJava(ItemStackRequestSlotData slotInfoData) {
76-
return switch (slotInfoData.getContainer()) {
76+
return switch (slotInfoData.getContainerName().getContainer()) {
7777
case ANVIL_INPUT -> 0;
7878
case ANVIL_MATERIAL -> 1;
7979
case ANVIL_RESULT, CREATED_OUTPUT -> 2;

core/src/main/java/org/geysermc/geyser/translator/inventory/BaseInventoryTranslator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public void updateProperty(GeyserSession session, Inventory inventory, int key,
4444
@Override
4545
public int bedrockSlotToJava(ItemStackRequestSlotData slotInfoData) {
4646
int slotnum = slotInfoData.getSlot();
47-
switch (slotInfoData.getContainer()) {
47+
switch (slotInfoData.getContainerName().getContainer()) {
4848
case HOTBAR_AND_INVENTORY:
4949
case HOTBAR:
5050
case INVENTORY:

core/src/main/java/org/geysermc/geyser/translator/inventory/BeaconInventoryTranslator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ private OptionalInt toJava(int effectChoice) {
121121

122122
@Override
123123
public int bedrockSlotToJava(ItemStackRequestSlotData slotInfoData) {
124-
if (slotInfoData.getContainer() == ContainerSlotType.BEACON_PAYMENT) {
124+
if (slotInfoData.getContainerName().getContainer() == ContainerSlotType.BEACON_PAYMENT) {
125125
return 0;
126126
}
127127
return super.bedrockSlotToJava(slotInfoData);

core/src/main/java/org/geysermc/geyser/translator/inventory/BrewingInventoryTranslator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,11 @@ public void updateProperty(GeyserSession session, Inventory inventory, int key,
7474

7575
@Override
7676
public int bedrockSlotToJava(ItemStackRequestSlotData slotInfoData) {
77-
if (slotInfoData.getContainer() == ContainerSlotType.BREWING_INPUT) {
77+
if (slotInfoData.getContainerName().getContainer() == ContainerSlotType.BREWING_INPUT) {
7878
// Ingredient
7979
return 3;
8080
}
81-
if (slotInfoData.getContainer() == ContainerSlotType.BREWING_RESULT) {
81+
if (slotInfoData.getContainerName().getContainer() == ContainerSlotType.BREWING_RESULT) {
8282
// Potions
8383
return slotInfoData.getSlot() - 1;
8484
}

core/src/main/java/org/geysermc/geyser/translator/inventory/CartographyInventoryTranslator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ protected boolean shouldRejectItemPlace(GeyserSession session, Inventory invento
5656

5757
@Override
5858
public int bedrockSlotToJava(ItemStackRequestSlotData slotInfoData) {
59-
return switch (slotInfoData.getContainer()) {
59+
return switch (slotInfoData.getContainerName().getContainer()) {
6060
case CARTOGRAPHY_INPUT -> 0;
6161
case CARTOGRAPHY_ADDITIONAL -> 1;
6262
case CARTOGRAPHY_RESULT, CREATED_OUTPUT -> 2;

core/src/main/java/org/geysermc/geyser/translator/inventory/CrafterInventoryTranslator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public void updateProperty(GeyserSession session, Inventory inventory, int key,
7777
@Override
7878
public int bedrockSlotToJava(ItemStackRequestSlotData slotInfoData) {
7979
int slot = slotInfoData.getSlot();
80-
switch (slotInfoData.getContainer()) {
80+
switch (slotInfoData.getContainerName().getContainer()) {
8181
case HOTBAR_AND_INVENTORY, HOTBAR, INVENTORY -> {
8282
//hotbar
8383
if (slot >= 9) {

core/src/main/java/org/geysermc/geyser/translator/inventory/CraftingInventoryTranslator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,12 @@ public BedrockContainerSlot javaSlotToBedrockContainer(int slot) {
6464

6565
@Override
6666
public int bedrockSlotToJava(ItemStackRequestSlotData slotInfoData) {
67-
if (slotInfoData.getContainer() == ContainerSlotType.CRAFTING_INPUT) {
67+
if (slotInfoData.getContainerName().getContainer() == ContainerSlotType.CRAFTING_INPUT) {
6868
// Java goes from 1 - 9, left to right then up to down
6969
// Bedrock is the same, but it starts from 32.
7070
return slotInfoData.getSlot() - 31;
7171
}
72-
if (slotInfoData.getContainer() == ContainerSlotType.CRAFTING_OUTPUT || slotInfoData.getContainer() == ContainerSlotType.CREATED_OUTPUT) {
72+
if (slotInfoData.getContainerName().getContainer() == ContainerSlotType.CRAFTING_OUTPUT || slotInfoData.getContainerName().getContainer() == ContainerSlotType.CREATED_OUTPUT) {
7373
return 0;
7474
}
7575
return super.bedrockSlotToJava(slotInfoData);

0 commit comments

Comments
 (0)