version bump and breeder fix on NTM-main

This commit is contained in:
Boblet 2022-02-02 10:04:32 +01:00
parent b8ea92eb2a
commit 94cbdd2555
3 changed files with 28 additions and 25 deletions

View File

@ -11,58 +11,61 @@ import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
public class ContainerMachineReactorBreeding extends Container { public class ContainerMachineReactorBreeding extends Container {
private TileEntityMachineReactorBreeding reactor; private TileEntityMachineReactorBreeding reactor;
public ContainerMachineReactorBreeding(InventoryPlayer invPlayer, TileEntityMachineReactorBreeding tedf) { public ContainerMachineReactorBreeding(InventoryPlayer invPlayer, TileEntityMachineReactorBreeding tedf) {
reactor = tedf; reactor = tedf;
this.addSlotToContainer(new Slot(tedf, 0, 35, 35)); this.addSlotToContainer(new Slot(tedf, 0, 35, 35));
this.addSlotToContainer(new SlotMachineOutput(tedf, 1, 125, 35)); this.addSlotToContainer(new SlotMachineOutput(tedf, 1, 125, 35));
for(int i = 0; i < 3; i++) { for(int i = 0; i < 3; i++) {
for(int j = 0; j < 9; j++) { for(int j = 0; j < 9; j++) {
this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18)); this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
} }
} }
for(int i = 0; i < 9; i++) { for(int i = 0; i < 9; i++) {
this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 142)); this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 142));
} }
} }
@Override @Override
public ItemStack transferStackInSlot(EntityPlayer player, int index) { public ItemStack transferStackInSlot(EntityPlayer player, int index) {
ItemStack var3 = null; ItemStack var3 = null;
Slot slot = (Slot) this.inventorySlots.get(index); Slot slot = (Slot) this.inventorySlots.get(index);
if (slot != null && slot.getHasStack()) { if(slot != null && slot.getHasStack()) {
ItemStack stack = slot.getStack(); ItemStack stack = slot.getStack();
var3 = stack.copy(); var3 = stack.copy();
if (index <= 2) { if(index <= 2) {
if (!this.mergeItemStack(stack, 2, this.inventorySlots.size(), true)) { if(!this.mergeItemStack(stack, 2, this.inventorySlots.size(), true)) {
return null; return null;
} }
} else if(stack.getItem() instanceof ItemBreedingRod) } else if(stack.getItem() instanceof ItemBreedingRod) {
if (!this.mergeItemStack(stack, 0, 1, false)) { if(!this.mergeItemStack(stack, 0, 1, false)) {
return null; return null;
}
} else {
return null;
} }
if (stack.stackSize == 0) { if(stack.stackSize == 0) {
slot.putStack((ItemStack) null); slot.putStack((ItemStack) null);
} else { } else {
slot.onSlotChanged(); slot.onSlotChanged();
} }
} }
return var3; return var3;
} }
@Override @Override
public boolean canInteractWith(EntityPlayer player) { public boolean canInteractWith(EntityPlayer player) {

View File

@ -3,7 +3,7 @@ package com.hbm.lib;
public class RefStrings { public class RefStrings {
public static final String MODID = "hbm"; public static final String MODID = "hbm";
public static final String NAME = "Hbm's Nuclear Tech Mod"; public static final String NAME = "Hbm's Nuclear Tech Mod";
public static final String VERSION = "1.0.27 BETA (4130)"; public static final String VERSION = "1.0.27 BETA (4130H1)";
//HBM's Beta Naming Convention: //HBM's Beta Naming Convention:
//V T (X) //V T (X)
//V -> next release version //V -> next release version

View File

@ -3,7 +3,7 @@
"modid": "hbm", "modid": "hbm",
"name": "Hbm's Nuclear Tech", "name": "Hbm's Nuclear Tech",
"description": "A mod that adds weapons, nuclear themed stuff and machines", "description": "A mod that adds weapons, nuclear themed stuff and machines",
"version":"1.0.27_X4130", "version":"1.0.27_X4130H1",
"mcversion": "1.7.10", "mcversion": "1.7.10",
"url": "", "url": "",
"updateUrl": "", "updateUrl": "",