Skip to content

Commit 1ea9ebf

Browse files
committed
Minor fixes
Fix the MaterialBedSide property not registering Correct the property output for MaterialBrewingStandBottles, and allow single-item inputs for MaterialTag.bottles mechanism Fix MaterialBambooLeaves property registering twice
1 parent cf763b4 commit 1ea9ebf

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

plugin/src/main/java/com/denizenscript/denizen/objects/properties/PropertyRegistry.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,6 @@ public static void registermainProperties() {
161161
if (NMSHandler.getVersion().isAtLeast(NMSVersion.v1_13)) {
162162
PropertyParser.registerProperty(MaterialAge.class, MaterialTag.class);
163163
PropertyParser.registerProperty(MaterialAttached.class, MaterialTag.class);
164-
PropertyParser.registerProperty(MaterialBambooLeaves.class, MaterialTag.class);
165164
PropertyParser.registerProperty(MaterialBedSide.class, MaterialTag.class);
166165
PropertyParser.registerProperty(MaterialBrewingStandBottles.class, MaterialTag.class);
167166
PropertyParser.registerProperty(MaterialBubbleColumnDrag.class, MaterialTag.class);

plugin/src/main/java/com/denizenscript/denizen/objects/properties/material/MaterialBedSide.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public class MaterialBedSide implements Property {
1313
public static boolean describes(ObjectTag material) {
1414
return material instanceof MaterialTag
1515
&& ((MaterialTag) material).hasModernData()
16-
&& ((MaterialTag) material).getModernData() instanceof Bed;
16+
&& ((MaterialTag) material).getModernData().data instanceof Bed;
1717
}
1818

1919
public static MaterialBedSide getFrom(ObjectTag material) {

plugin/src/main/java/com/denizenscript/denizen/objects/properties/material/MaterialBrewingStandBottles.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,11 @@ private boolean hasBottles() {
5353
}
5454

5555
private ListTag getBottles() {
56-
return new ListTag(getStand().getBottles());
56+
ListTag output = new ListTag();
57+
for (int bottle : getStand().getBottles()) {
58+
output.add(String.valueOf(bottle + 1));
59+
}
60+
return output;
5761
}
5862

5963
/////////
@@ -158,7 +162,7 @@ public void adjust(Mechanism mechanism) {
158162
// <MaterialTag.has_bottles>
159163
// <MaterialTag.max_bottles>
160164
// -->
161-
if (mechanism.matches("bottles") && mechanism.requireObject(ListTag.class)) {
165+
if (mechanism.matches("bottles")) {
162166
boolean bottle1 = false;
163167
boolean bottle2 = false;
164168
boolean bottle3 = false;

0 commit comments

Comments
 (0)