Preliminary stuff

gonna have to make a gui and do packet fuckery for this, shouldn't be too hard
This commit is contained in:
Vaern 2022-03-10 17:10:37 -08:00
parent c5201dcc26
commit a7fd72f76f
3 changed files with 59 additions and 8 deletions

View File

@ -490,7 +490,11 @@ public class OreDictManager {
public DictFrame(String... mats) {
this.mats = mats;
}
public String[] getMaterials() {
return this.mats;
}
/*
* Quick access methods to grab ore names for recipes.
*/

View File

@ -22,8 +22,29 @@ public class CustomNukeRecipes {
}
}
/**
* Checks if the OreDict key fits the material, but not the form
* @param frame DictFrame
* @param key Input key
*/
private static boolean containsMatch(DictFrame frame, String key) {
String[] mats = frame.anys();
String[] mats = frame.getMaterials();
for(String mat : mats) {
if(key.contains(mat)) {
return true;
}
}
return false;
}
/**
* Checks if the OreDict key fits the material and the form thereof.
* @param mats Ore names
* @param key Input key
*/
private static boolean containsMatch(String[] mats, String key) {
for(String mat : mats) {
if(mat.contains(key)) {

View File

@ -3,13 +3,18 @@ package com.hbm.tileentity.machine;
import com.hbm.tileentity.TileEntityMachineBase;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
public class TileEntityCustomPartAssembler extends TileEntityMachineBase {
private static final int[] slot_io = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 };
//Save the item and the mode for automation purposes
public byte item;
public byte mode;
private static final int[] slot_io = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 };
public TileEntityCustomPartAssembler() {
super(13); //12 input, 1 output
super(17); //16 input, 1 output
}
@Override
@ -19,7 +24,7 @@ public class TileEntityCustomPartAssembler extends TileEntityMachineBase {
@Override
public boolean isItemValidForSlot(int i, ItemStack itemStack) {
return i <= 11;
return i <= 15;
}
@Override
@ -29,14 +34,35 @@ public class TileEntityCustomPartAssembler extends TileEntityMachineBase {
@Override
public boolean canExtractItem(int i, ItemStack itemStack, int j) {
return i == 12;
return i == 16;
}
@Override
public void updateEntity() {
/*
* String troll = "trolling";
*
* System.Console.WriteLine($"We do a little bit of {troll}!");
*/
}
@Override
public boolean canUpdate() {
return false;
}
@Override
public void readFromNBT(NBTTagCompound nbt) {
super.readFromNBT(nbt);
item = nbt.getByte("item");
mode = nbt.getByte("mode");
}
@Override
public void writeToNBT(NBTTagCompound nbt) {
super.writeToNBT(nbt);
nbt.setByte("item", item);
nbt.setByte("mode", mode);
}
}