[Change] Vanilla like EndStone Smelter Behaviour with Hoppers (#30)
This commit is contained in:
parent
f6df2a2504
commit
a6ad8b689f
1 changed files with 10 additions and 6 deletions
|
@ -48,14 +48,15 @@ import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
public class EndStoneSmelterBlockEntity extends BaseContainerBlockEntity implements WorldlyContainer, RecipeHolder, StackedContentsCompatible {
|
public class EndStoneSmelterBlockEntity extends BaseContainerBlockEntity implements WorldlyContainer, RecipeHolder, StackedContentsCompatible {
|
||||||
|
|
||||||
private static final int[] TOP_SLOTS = new int[]{
|
private static final int[] TOP_SLOTS = new int[]{
|
||||||
EndStoneSmelterMenu.INGREDIENT_SLOT_A,
|
EndStoneSmelterMenu.INGREDIENT_SLOT_A,
|
||||||
EndStoneSmelterMenu.INGREDIENT_SLOT_B
|
EndStoneSmelterMenu.INGREDIENT_SLOT_B
|
||||||
};
|
};
|
||||||
|
private static final int[] JUST_A = new int[]{
|
||||||
|
EndStoneSmelterMenu.INGREDIENT_SLOT_A,
|
||||||
|
};
|
||||||
private static final int[] BOTTOM_SLOTS = new int[]{EndStoneSmelterMenu.FUEL_SLOT, EndStoneSmelterMenu.RESULT_SLOT};
|
private static final int[] BOTTOM_SLOTS = new int[]{EndStoneSmelterMenu.FUEL_SLOT, EndStoneSmelterMenu.RESULT_SLOT};
|
||||||
private static final int[] SIDE_SLOTS = new int[]{
|
private static final int[] SIDE_SLOTS = new int[]{
|
||||||
EndStoneSmelterMenu.INGREDIENT_SLOT_B,
|
|
||||||
EndStoneSmelterMenu.FUEL_SLOT
|
EndStoneSmelterMenu.FUEL_SLOT
|
||||||
};
|
};
|
||||||
private static final Map<Item, Integer> AVAILABLE_FUELS = Maps.newHashMap();
|
private static final Map<Item, Integer> AVAILABLE_FUELS = Maps.newHashMap();
|
||||||
|
@ -396,10 +397,13 @@ public class EndStoneSmelterBlockEntity extends BaseContainerBlockEntity impleme
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] getSlotsForFace(Direction side) {
|
public int[] getSlotsForFace(Direction side) {
|
||||||
if (side == Direction.DOWN) {
|
// var facing = getBlockState().getValue(EndStoneSmelter.FACING);
|
||||||
return BOTTOM_SLOTS;
|
// if (side == facing) return JUST_A;
|
||||||
}
|
return switch (side) {
|
||||||
return side == Direction.UP ? TOP_SLOTS : SIDE_SLOTS;
|
case DOWN -> BOTTOM_SLOTS;
|
||||||
|
case UP -> TOP_SLOTS;
|
||||||
|
default -> SIDE_SLOTS;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue