mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
very, very preliminary recipe stuff
This commit is contained in:
parent
42f6778b86
commit
9c0cc80805
@ -0,0 +1,56 @@
|
||||
package com.hbm.inventory.recipes;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import com.hbm.inventory.OreDictManager;
|
||||
import com.hbm.inventory.OreDictManager.DictFrame;
|
||||
|
||||
public class CustomNukeRecipes {
|
||||
|
||||
//a bit hacky, i'll probably just straight copy that system bob has yet to make
|
||||
public static float getQuantity(String key) {
|
||||
if(key.startsWith("nugget")) {
|
||||
return 1;
|
||||
} else if(key.startsWith("billet")) {
|
||||
return 6;
|
||||
} else if(key.startsWith("ingot")) {
|
||||
return 9;
|
||||
} else if(key.startsWith("block")) {
|
||||
return 81;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
private static boolean containsMatch(DictFrame frame, String key) {
|
||||
String[] mats = frame.anys();
|
||||
|
||||
for(String mat : mats) {
|
||||
if(mat.contains(key)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static float nonPredetonatingFissile(String key) {
|
||||
float multiplier = getQuantity(key);
|
||||
if(multiplier == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if(containsMatch(OreDictManager.U233, key)) {
|
||||
return 1.05f * multiplier;
|
||||
} else if(containsMatch(OreDictManager.U235, key)) {
|
||||
return 1.0f * multiplier;
|
||||
} else if(containsMatch(OreDictManager.NP237, key)) {
|
||||
return 0.95f * multiplier;
|
||||
} else if(containsMatch(OreDictManager.SA326, key)) {
|
||||
return 10.0f * multiplier;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
@ -2,8 +2,12 @@ package com.hbm.tileentity.machine;
|
||||
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
|
||||
public class TileEntityCustomPartAssembler extends TileEntityMachineBase {
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
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 };
|
||||
|
||||
public TileEntityCustomPartAssembler() {
|
||||
super(13); //12 input, 1 output
|
||||
}
|
||||
@ -12,6 +16,21 @@ public class TileEntityCustomPartAssembler extends TileEntityMachineBase {
|
||||
public String getName() {
|
||||
return "container.customPartAssembler";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isItemValidForSlot(int i, ItemStack itemStack) {
|
||||
return i <= 11;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getAccessibleSlotsFromSide(int side) {
|
||||
return slot_io;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canExtractItem(int i, ItemStack itemStack, int j) {
|
||||
return i == 12;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user