Basic Dynamic cell rendering
This commit is contained in:
parent
fb2a5a15b9
commit
8964c5aceb
16 changed files with 241 additions and 45 deletions
|
@ -101,7 +101,7 @@ public enum ModFluids {
|
|||
Registry.register(Registry.ITEM, identifier, bucket);
|
||||
}
|
||||
|
||||
public Fluid getFluid() {
|
||||
public RebornFluid getFluid() {
|
||||
return stillFluid;
|
||||
}
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ import techreborn.blocks.transformers.BlockLVTransformer;
|
|||
import techreborn.blocks.transformers.BlockMVTransformer;
|
||||
import techreborn.config.ConfigTechReborn;
|
||||
import techreborn.entities.EntityNukePrimed;
|
||||
import techreborn.items.DynamicCell;
|
||||
import techreborn.items.ItemDynamicCell;
|
||||
import techreborn.items.ItemUpgrade;
|
||||
import techreborn.utils.InitUtils;
|
||||
import techreborn.blockentity.storage.AdjustableSUBlockEntity;
|
||||
|
@ -112,7 +112,7 @@ public class TRContent {
|
|||
public static Item FREQUENCY_TRANSMITTER;
|
||||
public static Item SCRAP_BOX;
|
||||
public static Item MANUAL;
|
||||
public static DynamicCell CELL;
|
||||
public static ItemDynamicCell CELL;
|
||||
|
||||
// Gem armor & tools
|
||||
@Nullable
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
package techreborn.init.recipes;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import techreborn.items.DynamicCell;
|
||||
import techreborn.items.ItemDynamicCell;
|
||||
import techreborn.items.ItemCells;
|
||||
|
||||
import java.security.InvalidParameterException;
|
||||
|
@ -66,20 +66,20 @@ public class DistillationTowerRecipes extends RecipeMethods {
|
|||
|
||||
int cellCount = 0;
|
||||
for (ItemStack stack : outputs) {
|
||||
if (stack.getItem() instanceof DynamicCell) {
|
||||
if (stack.getItem() instanceof ItemDynamicCell) {
|
||||
cellCount += stack.getCount();
|
||||
}
|
||||
}
|
||||
|
||||
if (input.getItem() instanceof DynamicCell) {
|
||||
if (input.getItem() instanceof ItemDynamicCell) {
|
||||
int inputCount = input.getCount();
|
||||
if (cellCount < inputCount) {
|
||||
if (output2 == null) {
|
||||
output2 = DynamicCell.getEmptyCell(inputCount - cellCount);
|
||||
output2 = ItemDynamicCell.getEmptyCell(inputCount - cellCount);
|
||||
} else if (output3 == null) {
|
||||
output3 = DynamicCell.getEmptyCell(inputCount - cellCount);
|
||||
output3 = ItemDynamicCell.getEmptyCell(inputCount - cellCount);
|
||||
} else if (output4 == null) {
|
||||
output4 = DynamicCell.getEmptyCell(inputCount - cellCount);
|
||||
output4 = ItemDynamicCell.getEmptyCell(inputCount - cellCount);
|
||||
}
|
||||
}
|
||||
cellCount -= inputCount;
|
||||
|
@ -92,7 +92,7 @@ public class DistillationTowerRecipes extends RecipeMethods {
|
|||
if (cellCount > 64) {
|
||||
throw new InvalidParameterException("Invalid Distillation tower outputs: " + outputs + "(Recipe requires > 64 cells)");
|
||||
}
|
||||
cells = DynamicCell.getEmptyCell(cellCount);
|
||||
cells = ItemDynamicCell.getEmptyCell(cellCount);
|
||||
}
|
||||
// RecipeHandler.addRecipe(Reference.DistiLLATION_TOWER_RECIPE, new DistillationTowerRecipe(input, cells, output1, output2, output3, output4, ticks, euPerTick, oreDict));
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ package techreborn.init.recipes;
|
|||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.Items;
|
||||
import techreborn.items.DynamicCell;
|
||||
import techreborn.items.ItemDynamicCell;
|
||||
|
||||
import java.security.InvalidParameterException;
|
||||
|
||||
|
@ -138,22 +138,22 @@ public class IndustrialCentrifugeRecipes extends RecipeMethods {
|
|||
|
||||
int cellCount = 0;
|
||||
for (ItemStack stack : outputs) {
|
||||
if (stack.getItem() instanceof DynamicCell) {
|
||||
if (stack.getItem() instanceof ItemDynamicCell) {
|
||||
cellCount += stack.getCount();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (input instanceof ItemStack) {
|
||||
if (((ItemStack) input).getItem() instanceof DynamicCell) {
|
||||
if (((ItemStack) input).getItem() instanceof ItemDynamicCell) {
|
||||
int inputCount = ((ItemStack) input).getCount();
|
||||
if (cellCount < inputCount) {
|
||||
if (output2 == null) {
|
||||
output2 = DynamicCell.getEmptyCell(inputCount - cellCount);
|
||||
output2 = ItemDynamicCell.getEmptyCell(inputCount - cellCount);
|
||||
} else if (output3 == null) {
|
||||
output3 = DynamicCell.getEmptyCell(inputCount - cellCount);
|
||||
output3 = ItemDynamicCell.getEmptyCell(inputCount - cellCount);
|
||||
} else if (output4 == null) {
|
||||
output4 = DynamicCell.getEmptyCell(inputCount - cellCount);
|
||||
output4 = ItemDynamicCell.getEmptyCell(inputCount - cellCount);
|
||||
}
|
||||
}
|
||||
cellCount -= inputCount;
|
||||
|
@ -169,7 +169,7 @@ public class IndustrialCentrifugeRecipes extends RecipeMethods {
|
|||
if (cellCount > 64) {
|
||||
throw new InvalidParameterException("Invalid industrial centrifuge outputs: " + outputs + "(Recipe requires > 64 cells)");
|
||||
}
|
||||
cells = DynamicCell.getEmptyCell(cellCount);
|
||||
cells = ItemDynamicCell.getEmptyCell(cellCount);
|
||||
}
|
||||
//RecipeHandler.addRecipe(Reference.CENTRIFUGE_RECIPE, new CentrifugeRecipe(input, cells, output1, output2, output3, output4, ticks, 5, oreDict));
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ import net.minecraft.block.Blocks;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.Items;
|
||||
import techreborn.init.TRContent;
|
||||
import techreborn.items.DynamicCell;
|
||||
import techreborn.items.ItemDynamicCell;
|
||||
import techreborn.utils.StackWIPHandler;
|
||||
|
||||
/**
|
||||
|
@ -117,7 +117,7 @@ public class ScrapboxRecipes extends RecipeMethods {
|
|||
register(getStack(Items.GOLD_NUGGET));
|
||||
register(getStack(Items.SHULKER_SHELL));
|
||||
|
||||
register(DynamicCell.getEmptyCell(1));
|
||||
register(ItemDynamicCell.getEmptyCell(1));
|
||||
register(getMaterial("water", Type.CELL));
|
||||
register(getMaterial("compressedair", Type.CELL));
|
||||
register(TRContent.Parts.SAP.getStack());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue