Skip to content

Commit

Permalink
Add top and bottom as valid chest directions
Browse files Browse the repository at this point in the history
  • Loading branch information
clienthax committed Sep 24, 2016
1 parent c2ecb44 commit c1060e4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name=MusicBox
group=uk.co.haxyshideout
url=http://github.com/clienthax
organization=haxyshideout
version=0.4
version=0.41
apiVersion=5.0.0-SNAPSHOT
forgeVersion=1.10.2-12.18.1.2088
mcpMappings=snapshot_20160915
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ public class EventHandler {
//BiMap lets us look up keys+values in reverse
private final BiMap<Location<World>, NoteBlockSongPlayer> noteBlockPlayers = HashBiMap.create();

private static final Direction[] CARDINAL_SET = {
Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST
private static final Direction[] VALID_DIRECTIONS = {
Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST, Direction.UP, Direction.DOWN
};

@Listener
Expand Down Expand Up @@ -125,7 +125,7 @@ public void onInteractWithJukebox(InteractBlockEvent.Secondary.MainHand event, @
if(musicBoxType == MusicBoxKeys.MusicBoxType.STANDARD) {
//Find inventories next to the block
boolean foundChest = false;
for (Direction direction : CARDINAL_SET) {
for (Direction direction : VALID_DIRECTIONS) {
Optional<TileEntity> teNextToJukeboxOptional = worldLocation.add(direction.toVector3d()).getTileEntity();
if(teNextToJukeboxOptional.isPresent()) {
TileEntity teNextToJukeBox = teNextToJukeboxOptional.get();
Expand Down

0 comments on commit c1060e4

Please sign in to comment.