mirror of
https://github.com/GTNewHorizons/Avaritia.git
synced 2026-11-18 11:19:07 +00:00
The Beginning... of a mess
https: //github.com/SpitefulFox/Avaritia/commit/b8922319104199b5e15e2b073bfbc0ea5c775fab Co-Authored-By: SpitefulFox <[email protected]>
This commit is contained in:
1 parent
eac6314124
commit
1018729319
5 files changed
+54
-7
No files matched your search
@@ -21,7 +21,7 @@ public class LudicrousBlocks {
|
||||
*/
|
||||
public static Block resource_block;
|
||||
public static Block dire_crafting;
|
||||
//public static Block auto_dire_crafting;
|
||||
public static Block auto_dire_crafting;
|
||||
public static Block neutron_collector;
|
||||
public static Block compressor;
|
||||
|
||||
@@ -31,8 +31,8 @@ public class LudicrousBlocks {
|
||||
double_craft = GameRegistry.registerBlock(new BlockDoubleCraft(), "Double_Craft");
|
||||
triple_craft = GameRegistry.registerBlock(new BlockTripleCraft(), "Triple_Craft");
|
||||
dire_crafting = GameRegistry.registerBlock(new BlockDireCrafting(), "Dire_Crafting");
|
||||
//auto_dire_crafting =GameRegistry.registerBlock(new BlockAutoDireCrafting(), "Auto_Dire_Crafting");
|
||||
//GameRegistry.registerTileEntity(TileEntityDireCrafting.class, "Avaritia_Dire_Craft");
|
||||
auto_dire_crafting =GameRegistry.registerBlock(new BlockAutoDireCrafting(), "Auto_Dire_Crafting");
|
||||
GameRegistry.registerTileEntity(TileEntityDireCrafting.class, "Avaritia_Dire_Craft");
|
||||
|
||||
if(Config.craftingOnly)
|
||||
return;
|
||||
|
||||
@@ -50,8 +50,8 @@ public class Grinder {
|
||||
GameRegistry.addShapedRecipe(new ItemStack(LudicrousBlocks.resource_block, 1, 1), "CCC", "CCC", "CCC", 'C', new ItemStack(LudicrousItems.resource, 1, 6));
|
||||
GameRegistry.addShapedRecipe(new ItemStack(LudicrousItems.resource, 9, 6), "C", 'C', new ItemStack(LudicrousBlocks.resource_block, 1, 1));
|
||||
|
||||
//GameRegistry.addShapedRecipe(new ItemStack(LudicrousItems.resource, 13, 8), "CCC", "CIC", "CCC", 'C', new ItemStack(Blocks.coal_block, 1), 'I', new ItemStack(LudicrousItems.resource, 1, 1));
|
||||
//GameRegistry.addShapedRecipe(new ItemStack(LudicrousItems.resource, 1, 9), " I ", "ISI", " I ", 'I', new ItemStack(LudicrousItems.resource, 1, 4), 'S', new ItemStack(Items.stick));
|
||||
GameRegistry.addShapedRecipe(new ItemStack(LudicrousItems.resource, 13, 8), "CCC", "CIC", "CCC", 'C', new ItemStack(Blocks.coal_block, 1), 'I', new ItemStack(LudicrousItems.resource, 1, 1));
|
||||
GameRegistry.addShapedRecipe(new ItemStack(LudicrousItems.resource, 1, 9), " I ", "ISI", " I ", 'I', new ItemStack(LudicrousItems.resource, 1, 4), 'S', new ItemStack(Items.stick));
|
||||
|
||||
ExtremeCraftingManager.getInstance().addRecipe(new ItemStack(LudicrousBlocks.neutron_collector, 1),
|
||||
"IIQQQQQII",
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
package fox.spiteful.avaritia.tile;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.inventory.InventoryCrafting;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
@@ -10,6 +12,9 @@ public class TileEntityAutoDireCrafting extends TileLudicrous implements IInvent
|
||||
|
||||
private ItemStack result;
|
||||
private ItemStack[] matrix = new ItemStack[81];
|
||||
private ItemStack[] storage = new ItemStack[81];
|
||||
|
||||
private boolean recipeChanged = true;
|
||||
|
||||
@Override
|
||||
public boolean canUpdate()
|
||||
@@ -58,8 +63,8 @@ public class TileEntityAutoDireCrafting extends TileLudicrous implements IInvent
|
||||
public ItemStack getStackInSlot(int slot){
|
||||
if(slot == 0)
|
||||
return result;
|
||||
else if(slot <= matrix.length)
|
||||
return matrix[slot - 1];
|
||||
else if(slot <= storage.length)
|
||||
return storage[slot - 1];
|
||||
else
|
||||
return null;
|
||||
}
|
||||
@@ -167,5 +172,47 @@ public class TileEntityAutoDireCrafting extends TileLudicrous implements IInvent
|
||||
public boolean canExtractItem(int slot, ItemStack item, int side){
|
||||
return false;
|
||||
}
|
||||
public class ExtremeCraftingMatrix extends InventoryCrafting
|
||||
{
|
||||
public ExtremeCraftingMatrix()
|
||||
{
|
||||
super(new Container()
|
||||
{
|
||||
@Override
|
||||
public boolean canInteractWith(final EntityPlayer entityPlayer)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}, 9, 9);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getStackInSlot(final int slot)
|
||||
{
|
||||
return matrix[slot];
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setInventorySlotContents(final int slot, final ItemStack itemStack)
|
||||
{
|
||||
recipeChanged = true;
|
||||
matrix[slot] = itemStack;
|
||||
markDirty();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack decrStackSize(int slot, final int howMuch)
|
||||
{
|
||||
if (matrix[slot] == null)
|
||||
return null;
|
||||
final ItemStack itemStack = matrix[slot].copy();
|
||||
if ((matrix[slot].stackSize -= howMuch) == 0)
|
||||
matrix[slot] = null;
|
||||
itemStack.stackSize = howMuch;
|
||||
markDirty();
|
||||
return itemStack;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 7.4 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 401 B |
Reference in new issue
Block a user