Skip to content

Commit

Permalink
Remove flowerlocation from beehive item meta
Browse files Browse the repository at this point in the history
  • Loading branch information
PseudoKnight committed Aug 17, 2023
1 parent ad09174 commit f88da2c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 23 deletions.
19 changes: 0 additions & 19 deletions src/main/java/com/laytonsmith/core/ObjectGenerator.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
import com.laytonsmith.abstraction.MCTropicalFishBucketMeta;
import com.laytonsmith.abstraction.MCWorld;
import com.laytonsmith.abstraction.StaticLayer;
import com.laytonsmith.abstraction.blocks.MCBeehive;
import com.laytonsmith.abstraction.blocks.MCBlockData;
import com.laytonsmith.abstraction.blocks.MCBlockState;
import com.laytonsmith.abstraction.blocks.MCCommandBlock;
Expand Down Expand Up @@ -552,14 +551,6 @@ public Construct itemMeta(MCItemStack is, Target t) {
invData.set("smelting", ObjectGenerator.GetGenerator().item(inv.getSmelting(), t), t);
}
ma.set("inventory", invData, t);
} else if(bs instanceof MCBeehive) {
MCBeehive hive = (MCBeehive) bs;
MCLocation flowerLoc = hive.getFlowerLocation();
if(flowerLoc == null) {
ma.set("flowerlocation", CNull.NULL, t);
} else {
ma.set("flowerlocation", location(flowerLoc, false), t);
}
} else if(bs instanceof MCInventoryHolder) {
// Finally, handle InventoryHolders with inventory slots that do not have a special meaning.
MCInventory inv = ((MCInventoryHolder) bs).getInventory();
Expand Down Expand Up @@ -1030,16 +1021,6 @@ public MCItemMeta itemMeta(Mixed c, MCMaterial mat, Target t) throws ConfigRunti
}
}
bsm.setBlockState(bs);
} else if(bs instanceof MCBeehive) {
MCBeehive hive = (MCBeehive) bs;
if(ma.containsKey("flowerlocation")) {
Mixed possibleLoc = ma.get("flowerlocation", t);
if(!(possibleLoc instanceof CNull)) {
MCLocation flowerLoc = location(possibleLoc, null, t);
hive.setFlowerLocation(flowerLoc);
}
}
bsm.setBlockState(bs);
} else if(bs instanceof MCInventoryHolder) {
// Finally, handle InventoryHolders with inventory slots that do not have a special meaning.
if(ma.containsKey("inventory")) {
Expand Down
4 changes: 0 additions & 4 deletions src/main/resources/functionDocs/get_itemmeta
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ Below are the available fields in the item meta array. Fields can be null when t
|
* '''patterns''' : (array) An array of pattern arrays. Each can contain the keys '''"color"''' (one of ''%DYE_COLORS%'') and '''"shape"''' (one of ''%PATTERN_SHAPES%'').
|-
| Beehive
|
* '''flowerlocation''' : (array) The location of a flower for bees to target, or null if there is none.
|-
| BlockData
|
* '''blockdata''' : (array) An array of blockdata (known as block states in vanilla) like is returned from get_blockdata(), or null if none.
Expand Down

0 comments on commit f88da2c

Please sign in to comment.