Getting Ready for Version 0.0.2.0!

This commit is contained in:
Ellpeck 2015-03-20 18:58:31 +01:00
parent 7eb08712d1
commit 06059ba059
20 changed files with 203 additions and 13 deletions

View file

@ -17,7 +17,7 @@ buildscript {
apply plugin: 'forge'
version = "1.7.10-0.0.1.4"
version = "1.7.10-0.0.2.0"
group = "ellpeck.actuallyadditions"
archivesBaseName = "ActuallyAdditions"

View file

@ -67,6 +67,39 @@ public class ContainerFeeder extends Container{
@Override
public ItemStack transferStackInSlot(EntityPlayer player, int slot){
final int inventoryStart = 1;
final int inventoryEnd = inventoryStart+26;
final int hotbarStart = inventoryEnd+1;
final int hotbarEnd = hotbarStart+8;
Slot theSlot = (Slot)this.inventorySlots.get(slot);
if(theSlot.getHasStack()){
ItemStack currentStack = theSlot.getStack();
ItemStack newStack = currentStack.copy();
if(slot <= hotbarEnd && slot >= inventoryStart){
this.mergeItemStack(newStack, 0, 1, false);
}
if(slot <= hotbarEnd && slot >= hotbarStart){
this.mergeItemStack(newStack, inventoryStart, inventoryEnd+1, false);
}
else if(slot <= inventoryEnd && slot >= inventoryStart){
this.mergeItemStack(newStack, hotbarStart, hotbarEnd+1, false);
}
else if(slot < inventoryStart){
this.mergeItemStack(newStack, inventoryStart, hotbarEnd+1, false);
}
if(newStack.stackSize == 0) theSlot.putStack(null);
else theSlot.onSlotChanged();
if(newStack.stackSize == currentStack.stackSize) return null;
theSlot.onPickupFromSlot(player, newStack);
return currentStack;
}
return null;
}
}

View file

@ -11,6 +11,8 @@ import net.minecraft.inventory.Container;
import net.minecraft.inventory.ICrafting;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.FurnaceRecipes;
import net.minecraft.tileentity.TileEntityFurnace;
public class ContainerFurnaceDouble extends Container{
@ -27,8 +29,8 @@ public class ContainerFurnaceDouble extends Container{
this.addSlotToContainer(new Slot(this.tileFurnace, TileEntityFurnaceDouble.SLOT_COAL, 80, 21));
this.addSlotToContainer(new Slot(this.tileFurnace, TileEntityFurnaceDouble.SLOT_INPUT_1, 51, 21));
this.addSlotToContainer(new Slot(this.tileFurnace, TileEntityFurnaceDouble.SLOT_INPUT_2, 109, 21));
this.addSlotToContainer(new SlotOutput(this.tileFurnace, TileEntityFurnaceDouble.SLOT_OUTPUT_1, 51, 69));
this.addSlotToContainer(new Slot(this.tileFurnace, TileEntityFurnaceDouble.SLOT_INPUT_2, 109, 21));
this.addSlotToContainer(new SlotOutput(this.tileFurnace, TileEntityFurnaceDouble.SLOT_OUTPUT_2, 108, 69));
for (int i = 0; i < 3; i++){
@ -84,6 +86,46 @@ public class ContainerFurnaceDouble extends Container{
@Override
public ItemStack transferStackInSlot(EntityPlayer player, int slot){
final int inventoryStart = 5;
final int inventoryEnd = inventoryStart+26;
final int hotbarStart = inventoryEnd+1;
final int hotbarEnd = hotbarStart+8;
Slot theSlot = (Slot)this.inventorySlots.get(slot);
if(theSlot.getHasStack()){
ItemStack currentStack = theSlot.getStack();
ItemStack newStack = currentStack.copy();
if(slot <= hotbarEnd && slot >= inventoryStart){
if(FurnaceRecipes.smelting().getSmeltingResult(currentStack) != null){
this.mergeItemStack(newStack, TileEntityFurnaceDouble.SLOT_INPUT_1, TileEntityFurnaceDouble.SLOT_INPUT_1+1, false);
this.mergeItemStack(newStack, TileEntityFurnaceDouble.SLOT_INPUT_2, TileEntityFurnaceDouble.SLOT_INPUT_2+2, false);
}
if(TileEntityFurnace.getItemBurnTime(currentStack) > 0){
this.mergeItemStack(newStack, TileEntityFurnaceDouble.SLOT_COAL, TileEntityFurnaceDouble.SLOT_COAL+1, false);
}
}
if(slot <= hotbarEnd && slot >= hotbarStart){
this.mergeItemStack(newStack, inventoryStart, inventoryEnd+1, false);
}
else if(slot <= inventoryEnd && slot >= inventoryStart){
this.mergeItemStack(newStack, hotbarStart, hotbarEnd+1, false);
}
else if(slot < inventoryStart){
this.mergeItemStack(newStack, inventoryStart, hotbarEnd+1, false);
}
if(newStack.stackSize == 0) theSlot.putStack(null);
else theSlot.onSlotChanged();
if(newStack.stackSize == currentStack.stackSize) return null;
theSlot.onPickupFromSlot(player, newStack);
return currentStack;
}
return null;
}
}

View file

@ -38,6 +38,39 @@ public class ContainerGiantChest extends Container{
@Override
public ItemStack transferStackInSlot(EntityPlayer player, int slot){
final int inventoryStart = 117;
final int inventoryEnd = inventoryStart+26;
final int hotbarStart = inventoryEnd+1;
final int hotbarEnd = hotbarStart+8;
Slot theSlot = (Slot)this.inventorySlots.get(slot);
if(theSlot.getHasStack()){
ItemStack currentStack = theSlot.getStack();
ItemStack newStack = currentStack.copy();
if(slot <= hotbarEnd && slot >= inventoryStart){
this.mergeItemStack(newStack, 0, 117, false);
}
if(slot <= hotbarEnd && slot >= hotbarStart){
this.mergeItemStack(newStack, inventoryStart, inventoryEnd+1, false);
}
else if(slot <= inventoryEnd && slot >= inventoryStart){
this.mergeItemStack(newStack, hotbarStart, hotbarEnd+1, false);
}
else if(slot < inventoryStart){
this.mergeItemStack(newStack, inventoryStart, hotbarEnd+1, false);
}
if(newStack.stackSize == 0) theSlot.putStack(null);
else theSlot.onSlotChanged();
if(newStack.stackSize == currentStack.stackSize) return null;
theSlot.onPickupFromSlot(player, newStack);
return currentStack;
}
return null;
}
}

View file

@ -3,6 +3,7 @@ package ellpeck.actuallyadditions.inventory;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import ellpeck.actuallyadditions.inventory.slot.SlotOutput;
import ellpeck.actuallyadditions.recipe.GrinderRecipes;
import ellpeck.actuallyadditions.tile.TileEntityBase;
import ellpeck.actuallyadditions.tile.TileEntityGrinder;
import net.minecraft.entity.player.EntityPlayer;
@ -11,6 +12,7 @@ import net.minecraft.inventory.Container;
import net.minecraft.inventory.ICrafting;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntityFurnace;
public class ContainerGrinder extends Container{
@ -90,6 +92,46 @@ public class ContainerGrinder extends Container{
@Override
public ItemStack transferStackInSlot(EntityPlayer player, int slot){
final int inventoryStart = this.isDouble ? 7 : 4;
final int inventoryEnd = inventoryStart+26;
final int hotbarStart = inventoryEnd+1;
final int hotbarEnd = hotbarStart+8;
Slot theSlot = (Slot)this.inventorySlots.get(slot);
if(theSlot.getHasStack()){
ItemStack currentStack = theSlot.getStack();
ItemStack newStack = currentStack.copy();
if(slot <= hotbarEnd && slot >= inventoryStart){
if(GrinderRecipes.instance().getOutput(currentStack, false) != null){
this.mergeItemStack(newStack, TileEntityGrinder.SLOT_INPUT_1, TileEntityGrinder.SLOT_INPUT_1+1, false);
if(this.isDouble) this.mergeItemStack(newStack, TileEntityGrinder.SLOT_INPUT_2, TileEntityGrinder.SLOT_INPUT_2+1, false);
}
if(TileEntityFurnace.getItemBurnTime(currentStack) > 0){
this.mergeItemStack(newStack, TileEntityGrinder.SLOT_COAL, TileEntityGrinder.SLOT_COAL+1, false);
}
}
if(slot <= hotbarEnd && slot >= hotbarStart){
this.mergeItemStack(newStack, inventoryStart, inventoryEnd+1, false);
}
else if(slot <= inventoryEnd && slot >= inventoryStart){
this.mergeItemStack(newStack, hotbarStart, hotbarEnd+1, false);
}
else if(slot < inventoryStart){
this.mergeItemStack(newStack, inventoryStart, hotbarEnd+1, false);
}
if(newStack.stackSize == 0) theSlot.putStack(null);
else theSlot.onSlotChanged();
if(newStack.stackSize == currentStack.stackSize) return null;
theSlot.onPickupFromSlot(player, newStack);
return currentStack;
}
return null;
}
}

View file

@ -87,6 +87,39 @@ public class ContainerInputter extends Container{
@Override
public ItemStack transferStackInSlot(EntityPlayer player, int slot){
final int inventoryStart = 1;
final int inventoryEnd = inventoryStart+26;
final int hotbarStart = inventoryEnd+1;
final int hotbarEnd = hotbarStart+8;
Slot theSlot = (Slot)this.inventorySlots.get(slot);
if(theSlot.getHasStack()){
ItemStack currentStack = theSlot.getStack();
ItemStack newStack = currentStack.copy();
if(slot <= hotbarEnd && slot >= inventoryStart){
this.mergeItemStack(newStack, 0, 1, false);
}
if(slot <= hotbarEnd && slot >= hotbarStart){
this.mergeItemStack(newStack, inventoryStart, inventoryEnd, false);
}
else if(slot <= inventoryEnd && slot >= inventoryStart){
this.mergeItemStack(newStack, hotbarStart, hotbarEnd, false);
}
else if(slot < inventoryStart){
this.mergeItemStack(newStack, inventoryStart, hotbarEnd, false);
}
if(newStack.stackSize == 0) theSlot.putStack(null);
else theSlot.onSlotChanged();
if(newStack.stackSize == currentStack.stackSize) return null;
theSlot.onPickupFromSlot(player, newStack);
return currentStack;
}
return null;
}
}

View file

@ -92,11 +92,11 @@ public class GuiInputter extends GuiContainer{
this.fontRendererObj.drawString(StatCollector.translateToLocal("info." + Util.MOD_ID_LOWER + ".gui.put"), guiLeft + 22 + 3, guiTop + 32, 4210752);
this.fontRendererObj.drawString(StatCollector.translateToLocal("info." + Util.MOD_ID_LOWER + ".gui.pull"), guiLeft + 107 + 3, guiTop + 32, 4210752);
this.fontRendererObj.drawString(sideString[tileInputter.sideToPut+1], guiLeft + 24 + 3, guiTop + 45 + 1, 4210752);
this.fontRendererObj.drawString(StatCollector.translateToLocal("info." + Util.MOD_ID_LOWER + ".gui.slot") + " " + (tileInputter.slotToPut == -1 ? StatCollector.translateToLocal("info." + Util.MOD_ID_LOWER + ".gui.all") : tileInputter.slotToPut).toString(), guiLeft + 24, guiTop + 66 + 1, 4210752);
this.fontRendererObj.drawString(sideString[tileInputter.sideToPut+1], guiLeft + 24 + 1, guiTop + 45 + 3, 4210752);
this.fontRendererObj.drawString(StatCollector.translateToLocal("info." + Util.MOD_ID_LOWER + ".gui.slot") + " " + (tileInputter.slotToPut == -1 ? StatCollector.translateToLocal("info." + Util.MOD_ID_LOWER + ".gui.all") : tileInputter.slotToPut).toString(), guiLeft + 24 + 3, guiTop + 66 + 3, 4210752);
this.fontRendererObj.drawString(sideString[tileInputter.sideToPull+1], guiLeft + 109 + 3, guiTop + 45 + 1, 4210752);
this.fontRendererObj.drawString(StatCollector.translateToLocal("info." + Util.MOD_ID_LOWER + ".gui.slot") + " " + (tileInputter.slotToPull == -1 ? StatCollector.translateToLocal("info." + Util.MOD_ID_LOWER + ".gui.all") : tileInputter.slotToPull).toString(), guiLeft + 109, guiTop + 66 + 1, 4210752);
this.fontRendererObj.drawString(sideString[tileInputter.sideToPull+1], guiLeft + 109 + 1, guiTop + 45 + 3, 4210752);
this.fontRendererObj.drawString(StatCollector.translateToLocal("info." + Util.MOD_ID_LOWER + ".gui.slot") + " " + (tileInputter.slotToPull == -1 ? StatCollector.translateToLocal("info." + Util.MOD_ID_LOWER + ".gui.all") : tileInputter.slotToPull).toString(), guiLeft + 109 + 3, guiTop + 66 + 3, 4210752);
}
@Override
@ -142,7 +142,7 @@ public class GuiInputter extends GuiContainer{
else if (!this.enabled) color = 10526880;
else if (this.field_146123_n) color = 16777120;
this.drawCenteredString(renderer, this.displayString, this.xPosition + this.width / 2, this.yPosition + (this.height-3) / 2, color);
this.drawCenteredString(renderer, this.displayString, this.xPosition + this.width / 2, this.yPosition + (this.height-8) / 2, color);
}
}
}

View file

@ -64,8 +64,11 @@ public class TileEntityInputter extends TileEntityInventoryBase{
}
}
else{
this.setInventorySlotContents(0, theStack.copy());
theInventory.setInventorySlotContents(theSlotToPull, null);
ItemStack toBePut = theStack.copy();
if(theInventory.getInventoryStackLimit() < toBePut.stackSize) toBePut.stackSize = theInventory.getInventoryStackLimit();
this.setInventorySlotContents(0, toBePut);
if(theStack.stackSize == toBePut.stackSize) theInventory.setInventorySlotContents(theSlotToPull, null);
else theStack.stackSize -= toBePut.stackSize;
}
}
}
@ -103,8 +106,11 @@ public class TileEntityInputter extends TileEntityInventoryBase{
}
}
else{
theInventory.setInventorySlotContents(theSlotToPut, this.slots[0].copy());
this.slots[0] = null;
ItemStack toBePut = this.slots[0].copy();
if(theInventory.getInventoryStackLimit() < toBePut.stackSize) toBePut.stackSize = theInventory.getInventoryStackLimit();
theInventory.setInventorySlotContents(theSlotToPut, toBePut);
if(this.slots[0].stackSize == toBePut.stackSize) this.slots[0] = null;
else this.slots[0].stackSize -= toBePut.stackSize;
}
}
}

View file

@ -18,7 +18,7 @@ import org.lwjgl.input.Keyboard;
@SuppressWarnings("unused")
public class Util{
public static final String VERSION = "1.7.10-0.0.1.4";
public static final String VERSION = "1.7.10-0.0.2.0";
public static final String MOD_ID = "ActuallyAdditions";
public static final String NAME = "Actually Additions";

View file

@ -100,6 +100,7 @@ tooltip.actuallyadditions.blockGrinder.desc.4=build the Double Crusher!
tooltip.actuallyadditions.blockGrinderDouble.desc.1=Crushes Ores into Dusts!
tooltip.actuallyadditions.blockGrinderDouble.desc.2=You get two Dusts per Ore and Extras!
tooltip.actuallyadditions.blockGrinderDouble.desc.3=Can crush two Ores simultaneously!
tooltip.actuallyadditions.blockFurnaceDouble.desc=Smelts two things simultaneously!
tooltip.actuallyadditions.blockInputter.desc.1=Its real name is %sObfuscated%s!
tooltip.actuallyadditions.blockInputter.desc.2=Acts like a more advanced Hopper
tooltip.actuallyadditions.blockInputter.desc.3=Configurable:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 255 B

After

Width:  |  Height:  |  Size: 343 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 276 B

After

Width:  |  Height:  |  Size: 585 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 646 B

After

Width:  |  Height:  |  Size: 716 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 295 B

After

Width:  |  Height:  |  Size: 536 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 645 B

After

Width:  |  Height:  |  Size: 646 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 227 B

After

Width:  |  Height:  |  Size: 317 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 271 B

After

Width:  |  Height:  |  Size: 341 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 230 B

After

Width:  |  Height:  |  Size: 348 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 277 B

After

Width:  |  Height:  |  Size: 341 B

View file

@ -3,7 +3,7 @@
"modid": "ActuallyAdditions",
"name": "Actually Additions",
"description": "A bunch of random stuff added to your Game to make it even more fun, exciting and add some more variety!",
"version": "0.0.1.4",
"version": "0.0.2.0",
"mcversion": "1.7.10",
"url": "https://github.com/Ellpeck/ActuallyAdditions",
"updateUrl": "",