|
47 | 47 | public class MetaTileEntityIndustrialApiary extends GTBMSimpleMachineMetaTileEntity |
48 | 48 | implements IBeeHousing, IBeeHousingInventory { |
49 | 49 |
|
50 | | - private static final int UPGRADE_SLOT_COUNT = 4; |
| 50 | + private static final int UPGRADE_SLOTS_BASE = 4; |
| 51 | + private static final int UPGRADE_SLOTS_EXTENDED = 8; |
51 | 52 | private static final int OUTPUT_SLOT_COUNT = 9; |
52 | 53 |
|
53 | 54 | private final ApiaryModifiers modifiers = new ApiaryModifiers(); |
@@ -79,7 +80,7 @@ public boolean onPollenRetrieved(IIndividual pollen) { |
79 | 80 | }; |
80 | 81 | private IItemHandlerModifiable upgradeInventory; |
81 | 82 | private GameProfile owner; |
82 | | - private boolean autoBreeding = true; |
| 83 | + private boolean autoBreeding = false; |
83 | 84 |
|
84 | 85 | public MetaTileEntityIndustrialApiary(ResourceLocation metaTileEntityId, RecipeMap<?> recipeMap, |
85 | 86 | ICubeRenderer renderer, int tier, boolean hasFrontFacing, |
@@ -124,10 +125,14 @@ protected IItemHandlerModifiable createExportItemHandler() { |
124 | 125 | return new NotifiableItemStackHandler(this, OUTPUT_SLOT_COUNT, this, true); |
125 | 126 | } |
126 | 127 |
|
| 128 | + private int getUpgradeSlotCount() { |
| 129 | + return getTier() >= gregtech.api.GTValues.LuV ? UPGRADE_SLOTS_EXTENDED : UPGRADE_SLOTS_BASE; |
| 130 | + } |
| 131 | + |
127 | 132 | @Override |
128 | 133 | protected void initializeInventory() { |
129 | 134 | super.initializeInventory(); |
130 | | - this.upgradeInventory = new ItemStackHandler(UPGRADE_SLOT_COUNT) { |
| 135 | + this.upgradeInventory = new ItemStackHandler(getUpgradeSlotCount()) { |
131 | 136 |
|
132 | 137 | @Override |
133 | 138 | public boolean isItemValid(int slot, @org.jetbrains.annotations.NotNull ItemStack stack) { |
@@ -239,17 +244,21 @@ protected ModularUI createUI(EntityPlayer player) { |
239 | 244 | builder.widget(new ProgressWidget(getLogic()::getBeeProgress, 60, 16, 20, 20, |
240 | 245 | GuiTextures.PROGRESS_BAR_ARROW, ProgressWidget.MoveType.HORIZONTAL)); |
241 | 246 |
|
242 | | - // Upgrade slots |
243 | | - for (int i = 0; i < UPGRADE_SLOT_COUNT; i++) { |
244 | | - builder.widget(new SlotWidget(upgradeInventory, i, 34 + i * 18, 36, true, true, true) |
245 | | - .setBackgroundTexture(GuiTextures.SLOT)); |
246 | | - builder.widget(new ImageWidget(35 + i * 18, 37, 16, 16, GTBMGuiTextures.UPGRADE_OVERLAY)); |
| 247 | + // Upgrade slots (1x4 base, 2x4 for LuV+) |
| 248 | + int upgradeSlots = getUpgradeSlotCount(); |
| 249 | + for (int i = 0; i < upgradeSlots; i++) { |
| 250 | + int col = i % 4; |
| 251 | + int row = i / 4; |
| 252 | + builder.widget(new SlotWidget(upgradeInventory, i, 34 + col * 18, 36 + row * 18, |
| 253 | + true, true, true).setBackgroundTexture(GuiTextures.SLOT)); |
| 254 | + builder.widget(new ImageWidget(35 + col * 18, 37 + row * 18, 16, 16, |
| 255 | + GTBMGuiTextures.UPGRADE_OVERLAY)); |
247 | 256 | } |
248 | 257 |
|
249 | 258 | // Output slots |
250 | 259 | for (int i = 0; i < 3; i++) { |
251 | 260 | for (int j = 0; j < 3; j++) { |
252 | | - builder.widget(new SlotWidget(exportItems, j + i * 3, 115 + j * 18, 18 + i * 18, |
| 261 | + builder.widget(new SlotWidget(exportItems, j + i * 3, 116 + j * 18, 18 + i * 18, |
253 | 262 | true, false, false).setBackgroundTexture(GuiTextures.SLOT)); |
254 | 263 | } |
255 | 264 | } |
|
0 commit comments