Fluid replicator

This commit is contained in:
modmuss50 2019-08-06 20:56:52 +01:00
parent 4645c365c2
commit 83483ce8d3
11 changed files with 343 additions and 895 deletions

View file

@ -1,137 +0,0 @@
/*
* This file is part of TechReborn, licensed under the MIT License (MIT).
*
* Copyright (c) 2018 TechReborn
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package techreborn.api.fluidreplicator;
import net.minecraft.util.math.BlockPos;
import net.minecraft.fluid.Fluid;
import techreborn.init.TRContent;
import techreborn.blockentity.machine.multiblock.FluidReplicatorBlockEntity;
import techreborn.utils.FluidUtils;
import javax.annotation.Nonnull;
import java.util.ArrayList;
import java.util.List;
/**
* @author drcrazy
*
*/
public class FluidReplicatorRecipe implements Cloneable {
/**
* This is the UU matter amount that is required as input
* <p>
* This cannot be null
*/
@Nonnull
private final int input;
/**
* This is the fluid we will produce
* <p>
* This cannot be null
*/
@Nonnull
private final Fluid output;
/**
* This is the time in ticks that the recipe takes to complete
*/
private final int tickTime;
/**
* This is the EU that charges every tick to replicate fluid.
*/
private final int euPerTick;
/**
* @param input int Amount of UU-matter per bucket
* @param output Fluid Fluid to replicate
* @param tickTime int Production time for recipe
* @param euPerTick int EU amount per tick
*/
public FluidReplicatorRecipe(int input, Fluid output, int tickTime, int euPerTick) {
this.input = input;
this.output = output;
this.tickTime = tickTime;
this.euPerTick = euPerTick;
}
public int getInput() {
return input;
}
public Fluid getFluid() {
return output;
}
public int getTickTime() {
return tickTime;
}
public int getEuTick() {
return euPerTick;
}
public List<Object> getInputs() {
ArrayList<Object> inputs = new ArrayList<>();
inputs.add(TRContent.Parts.UU_MATTER.getStack(input));
return inputs;
}
public boolean useOreDic() {
return false;
}
public boolean canCraft(FluidReplicatorBlockEntity blockEntity) {
if (!blockEntity.getMultiBlock()) {
return false;
}
final BlockPos hole = blockEntity.getPos().offset(blockEntity.getFacing().getOpposite(), 2);
final Fluid fluid = techreborn.utils.FluidUtils.fluidFromBlock(blockEntity.getWorld().getBlockState(hole).getBlock());
if (fluid == null) {
return false;
}
if (!FluidUtils.fluidEquals(fluid, output)) {
return false;
}
final Fluid tankFluid = blockEntity.tank.getFluid();
if (tankFluid != null && !FluidUtils.fluidEquals(tankFluid, fluid)) {
return false;
}
return true;
}
public boolean onCraft(FluidReplicatorBlockEntity blockEntity) {
return true;
}
// Cloneable
@Override
public Object clone() throws CloneNotSupportedException {
return super.clone();
}
}

View file

@ -1,201 +0,0 @@
/*
* This file is part of TechReborn, licensed under the MIT License (MIT).
*
* Copyright (c) 2018 TechReborn
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package techreborn.api.fluidreplicator;
import net.minecraft.block.entity.BlockEntity;
import net.minecraft.fluid.Fluids;
import net.minecraft.item.ItemStack;
import reborncore.common.recipes.RecipeCrafter;
import reborncore.common.util.RebornInventory;
import reborncore.common.util.Tank;
import net.minecraft.fluid.Fluid;
import io.github.prospector.silk.fluid.FluidInstance;
import techreborn.init.ModRecipes;
import techreborn.init.TRContent;
import techreborn.blockentity.machine.multiblock.FluidReplicatorBlockEntity;
/**
* @author drcrazy
*
*/
public class FluidReplicatorRecipeCrafter extends RecipeCrafter {
public FluidReplicatorRecipe currentRecipe;
int ticksSinceLastChange;
/**
* RecipeCrafter for Fluid Replicator
*
* @param parent BlockEntity Reference to the blockEntity having this crafter
* @param inventory Inventory reference to inventory used for crafting
* @param inputSlots This is the list of the slots that the crafting logic should look for the input UU-Matter.
* @param outputSlots This is the list of slots that the crafting logic should look for output fluid
*/
public FluidReplicatorRecipeCrafter(BlockEntity parent, RebornInventory<?> inventory, int[] inputSlots, int[] outputSlots) {
super(ModRecipes.FLUID_REPLICATOR, parent, 1, 1, inventory, inputSlots, outputSlots);
}
/**
* FluidReplicatorRecipe version of hasAllInputs
*/
private boolean hasAllInputs(FluidReplicatorRecipe recipe) {
if (recipe == null) {
return false;
}
ItemStack inputStack = inventory.getInvStack(inputSlots[0]);
if (!inputStack.isItemEqualIgnoreDamage(TRContent.Parts.UU_MATTER.getStack())) {
return false;
}
if (inputStack.getCount() < recipe.getInput()) {
return false;
}
return true;
}
public void setCurrentRecipe(FluidReplicatorRecipe recipe) {
try {
this.currentRecipe = (FluidReplicatorRecipe) recipe.clone();
} catch (CloneNotSupportedException e) {
e.printStackTrace();
}
}
// RecipeCrafter
@Override
public void updateEntity() {
if (blockEntity.getWorld().isClient) {
return;
}
ticksSinceLastChange++;
// Force a has changed every second
if (ticksSinceLastChange >= 20) {
setInvDirty(true);
ticksSinceLastChange = 0;
}
// It will now look for new recipes.
if (currentRecipe == null && isInvDirty()) {
updateCurrentRecipe();
}
if(currentRecipe != null) {
// If it doesn't have all the inputs reset
if (isInvDirty() && !hasAllInputs()) {
currentRecipe = null;
currentTickTime = 0;
setIsActive();
}
// If it has reached the recipe tick time
if (currentRecipe != null && currentTickTime >= currentNeededTicks && hasAllInputs()) {
FluidReplicatorBlockEntity blockEntityFluidReplicator = (FluidReplicatorBlockEntity) blockEntity;
// Checks to see if it can fit the output
// And fill tank with replicated fluid
if (blockEntityFluidReplicator.tank.canFit(currentRecipe.getFluid(), 1000) && currentRecipe.onCraft(blockEntityFluidReplicator)) {
blockEntityFluidReplicator.tank.getFluidInstance().setFluid(currentRecipe.getFluid());
blockEntityFluidReplicator.tank.getFluidInstance().addAmount(1000);
// This uses all the inputs
useAllInputs();
// Reset
currentRecipe = null;
currentTickTime = 0;
updateCurrentRecipe();
//Update active state if the blockEntity isnt going to start crafting again
if(currentRecipe == null){
setIsActive();
}
}
} else if (currentRecipe != null && currentTickTime < currentNeededTicks) {
// This uses the power
if (energy.canUseEnergy(getEuPerTick(currentRecipe.getEuTick()))) {
energy.useEnergy(getEuPerTick(currentRecipe.getEuTick()));
// Increase the ticktime
currentTickTime ++;
if(currentTickTime == 1 || currentTickTime % 20 == 0 && soundHanlder != null){
soundHanlder.playSound(false, blockEntity);
}
}
}
}
setInvDirty(false);
}
@Override
public void updateCurrentRecipe() {
FluidReplicatorBlockEntity blockEntityFluidReplicator = (FluidReplicatorBlockEntity) blockEntity;
for (FluidReplicatorRecipe recipe : FluidReplicatorRecipeList.recipes) {
if (recipe.canCraft(blockEntityFluidReplicator) && hasAllInputs(recipe)) {
if (!blockEntityFluidReplicator.tank.canFit(recipe.getFluid(), 1000)) {
this.currentRecipe = null;
currentTickTime = 0;
setIsActive();
return;
}
setCurrentRecipe(recipe);
currentNeededTicks = Math.max((int) (currentRecipe.getTickTime()* (1.0 - getSpeedMultiplier())), 1);
currentTickTime = 0;
setIsActive();
return;
}
}
}
@Override
public boolean hasAllInputs() {
if (this.currentRecipe == null) {
return false;
}
else {
return hasAllInputs(this.currentRecipe);
}
}
@Override
public void useAllInputs() {
if (currentRecipe == null) {
return;
}
if (hasAllInputs(currentRecipe)) {
inventory.shrinkSlot(inputSlots[0], currentRecipe.getInput());
}
}
@Override
public boolean canCraftAgain() {
FluidReplicatorBlockEntity blockEntityFluidReplicator = (FluidReplicatorBlockEntity) blockEntity;
for (FluidReplicatorRecipe recipe : FluidReplicatorRecipeList.recipes) {
if (recipe.canCraft(blockEntityFluidReplicator) && hasAllInputs(recipe)) {
if (!blockEntityFluidReplicator.tank.canFit(recipe.getFluid(), 1000)) {
return false;
}
if (energy.getEnergy() < recipe.getEuTick()) {
return false;
}
return true;
}
}
return false;
}
}

View file

@ -1,78 +0,0 @@
/*
* This file is part of TechReborn, licensed under the MIT License (MIT).
*
* Copyright (c) 2018 TechReborn
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package techreborn.api.fluidreplicator;
import org.apache.commons.lang3.Validate;
import net.minecraft.fluid.Fluid;
import techreborn.utils.FluidUtils;
import java.util.ArrayList;
import java.util.Optional;
/**
* @author drcrazy
*
*/
public class FluidReplicatorRecipeList {
/**
* This is the list of all the recipes
*/
public static ArrayList<FluidReplicatorRecipe> recipes = new ArrayList<>();
/**
* Register your Fluid Replicator recipe
*
* @param recipe FluidReplicatorRecipe The recipe you want to add
*/
public static void addRecipe(FluidReplicatorRecipe recipe) {
Validate.notNull(recipe);
Validate.isTrue(!recipes.contains(recipe));
Validate.validState(recipe.getInput() >= 1);
Validate.validState(!getRecipeForFluid(recipe.getFluid()).isPresent());
recipes.add(recipe);
}
/**
* Fluid Replicator recipe you want to remove
*
* @param recipe FluidReplicatorRecipe Recipe to remove
* @return boolean true if recipe was removed from list of recipes
*/
public static boolean removeRecipe(FluidReplicatorRecipe recipe) {
return recipes.remove(recipe);
}
/**
* Check if there is a Fluid Replicator recipe for that fluid
*
* @param fluid Fluid Fluid to search for
* @return FluidReplicatorRecipe Recipe for fluid provided
*/
public static Optional<FluidReplicatorRecipe> getRecipeForFluid(Fluid fluid) {
return recipes.stream().filter(recipe -> FluidUtils.fluidEquals(recipe.getFluid(), fluid)).findAny();
}
}

View file

@ -0,0 +1,56 @@
package techreborn.api.recipe.recipes;
import net.minecraft.block.entity.BlockEntity;
import net.minecraft.fluid.Fluid;
import net.minecraft.fluid.Fluids;
import net.minecraft.util.Identifier;
import net.minecraft.util.math.BlockPos;
import reborncore.common.crafting.RebornFluidRecipe;
import reborncore.common.crafting.RebornRecipeType;
import reborncore.common.util.Tank;
import techreborn.blockentity.machine.multiblock.FluidReplicatorBlockEntity;
import techreborn.utils.FluidUtils;
public class FluidReplicatorRecipe extends RebornFluidRecipe {
public FluidReplicatorRecipe(RebornRecipeType<?> type, Identifier name) {
super(type, name);
}
@Override
public Tank getTank(BlockEntity be) {
FluidReplicatorBlockEntity blockEntity = (FluidReplicatorBlockEntity) be;
return blockEntity.getTank();
}
@Override
public boolean canCraft(BlockEntity be) {
FluidReplicatorBlockEntity blockEntity = (FluidReplicatorBlockEntity) be;
if (!blockEntity.getMultiBlock()) {
return false;
}
final BlockPos hole = blockEntity.getPos().offset(blockEntity.getFacing().getOpposite(), 2);
final Fluid fluid = techreborn.utils.FluidUtils.fluidFromBlock(blockEntity.getWorld().getBlockState(hole).getBlock());
if (fluid == Fluids.EMPTY) {
return true;
}
if (!FluidUtils.fluidEquals(fluid, getFluidInstance().getFluid())) {
return false;
}
final Fluid tankFluid = blockEntity.tank.getFluid();
if (tankFluid != Fluids.EMPTY && !FluidUtils.fluidEquals(tankFluid, fluid)) {
return false;
}
return blockEntity.tank.canFit(getFluidInstance().getFluid(), getFluidInstance().getAmount());
}
@Override
public boolean onCraft(BlockEntity be) {
FluidReplicatorBlockEntity blockEntity = (FluidReplicatorBlockEntity) be;
if (blockEntity.tank.canFit(getFluidInstance().getFluid(), getFluidInstance().getAmount())) {
blockEntity.tank.setFluid(getFluidInstance().getFluid());
blockEntity.tank.getFluidInstance().addAmount(getFluidInstance().getAmount());
}
return true;
}
}

View file

@ -37,7 +37,7 @@ import reborncore.common.util.IInventoryAccess;
import reborncore.common.util.RebornInventory; import reborncore.common.util.RebornInventory;
import reborncore.common.util.Tank; import reborncore.common.util.Tank;
import techreborn.TechReborn; import techreborn.TechReborn;
import techreborn.api.fluidreplicator.FluidReplicatorRecipeCrafter; import techreborn.init.ModRecipes;
import techreborn.init.TRContent; import techreborn.init.TRContent;
import techreborn.init.TRBlockEntities; import techreborn.init.TRBlockEntities;
import techreborn.blockentity.GenericMachineBlockEntity; import techreborn.blockentity.GenericMachineBlockEntity;
@ -65,9 +65,8 @@ public class FluidReplicatorBlockEntity extends GenericMachineBlockEntity implem
public FluidReplicatorBlockEntity() { public FluidReplicatorBlockEntity() {
super(TRBlockEntities.FLUID_REPLICATOR, "FluidReplicator", maxInput, maxEnergy, TRContent.Machine.FLUID_REPLICATOR.block, 3); super(TRBlockEntities.FLUID_REPLICATOR, "FluidReplicator", maxInput, maxEnergy, TRContent.Machine.FLUID_REPLICATOR.block, 3);
final int[] inputs = new int[] { 0 };
this.inventory = new RebornInventory<>(4, "FluidReplicatorBlockEntity", 64, this, getInventoryAccess()); this.inventory = new RebornInventory<>(4, "FluidReplicatorBlockEntity", 64, this, getInventoryAccess());
this.crafter = new FluidReplicatorRecipeCrafter(this, this.inventory, inputs, null); this.crafter = new RecipeCrafter(ModRecipes.FLUID_REPLICATOR, this, 1, 0, this.inventory, new int[] {0}, null);
this.tank = new Tank("FluidReplicatorBlockEntity", FluidReplicatorBlockEntity.TANK_CAPACITY, this); this.tank = new Tank("FluidReplicatorBlockEntity", FluidReplicatorBlockEntity.TANK_CAPACITY, this);
} }

View file

@ -28,16 +28,13 @@ import net.minecraft.util.Identifier;
import reborncore.common.crafting.RebornRecipe; import reborncore.common.crafting.RebornRecipe;
import reborncore.common.crafting.RebornRecipeType; import reborncore.common.crafting.RebornRecipeType;
import reborncore.common.crafting.RecipeManager; import reborncore.common.crafting.RecipeManager;
import reborncore.common.registration.RebornRegister;
import techreborn.TechReborn;
import techreborn.api.recipe.recipes.BlastFurnaceRecipe; import techreborn.api.recipe.recipes.BlastFurnaceRecipe;
import techreborn.api.recipe.recipes.FluidReplicatorRecipe;
import techreborn.api.recipe.recipes.IndustrialGrinderRecipe; import techreborn.api.recipe.recipes.IndustrialGrinderRecipe;
import techreborn.api.recipe.recipes.IndustrialSawmillRecipe; import techreborn.api.recipe.recipes.IndustrialSawmillRecipe;
@RebornRegister(TechReborn.MOD_ID)
public class ModRecipes { public class ModRecipes {
public static final RebornRecipeType<RebornRecipe> ALLOY_SMELTER = RecipeManager.newRecipeType(RebornRecipe.class, new Identifier("techreborn:alloy_smelter")); public static final RebornRecipeType<RebornRecipe> ALLOY_SMELTER = RecipeManager.newRecipeType(RebornRecipe.class, new Identifier("techreborn:alloy_smelter"));
public static final RebornRecipeType<RebornRecipe> ASSEMBLING_MACHINE = RecipeManager.newRecipeType(RebornRecipe.class, new Identifier("techreborn:assembling_machine")); public static final RebornRecipeType<RebornRecipe> ASSEMBLING_MACHINE = RecipeManager.newRecipeType(RebornRecipe.class, new Identifier("techreborn:assembling_machine"));
public static final RebornRecipeType<BlastFurnaceRecipe> BLAST_FURNACE = RecipeManager.newRecipeType(BlastFurnaceRecipe.class, new Identifier("techreborn:blast_furnace")); public static final RebornRecipeType<BlastFurnaceRecipe> BLAST_FURNACE = RecipeManager.newRecipeType(BlastFurnaceRecipe.class, new Identifier("techreborn:blast_furnace"));
@ -54,28 +51,6 @@ public class ModRecipes {
public static final RebornRecipeType<RebornRecipe> RECYCLER = RecipeManager.newRecipeType(RebornRecipe.class, new Identifier("techreborn:recycler")); public static final RebornRecipeType<RebornRecipe> RECYCLER = RecipeManager.newRecipeType(RebornRecipe.class, new Identifier("techreborn:recycler"));
public static final RebornRecipeType<RebornRecipe> SCRAPBOX = RecipeManager.newRecipeType(RebornRecipe.class, new Identifier("techreborn:scrapbox")); public static final RebornRecipeType<RebornRecipe> SCRAPBOX = RecipeManager.newRecipeType(RebornRecipe.class, new Identifier("techreborn:scrapbox"));
public static final RebornRecipeType<RebornRecipe> VACUUM_FREEZER = RecipeManager.newRecipeType(RebornRecipe.class, new Identifier("techreborn:vacuum_freezer")); public static final RebornRecipeType<RebornRecipe> VACUUM_FREEZER = RecipeManager.newRecipeType(RebornRecipe.class, new Identifier("techreborn:vacuum_freezer"));
public static final RebornRecipeType<RebornRecipe> FLUID_REPLICATOR = RecipeManager.newRecipeType(RebornRecipe.class, new Identifier("techreborn:fluid_replicator")); public static final RebornRecipeType<FluidReplicatorRecipe> FLUID_REPLICATOR = RecipeManager.newRecipeType(FluidReplicatorRecipe.class, new Identifier("techreborn:fluid_replicator"));
public static void init() {
/*
RollingMachineRecipes.init();
FluidGeneratorRecipes.init();
IndustrialElectrolyzerRecipes.init();
ScrapboxRecipes.init();
FusionReactorRecipes.init();
FluidReplicatorRecipes.init();
*/
}
} }

View file

@ -31,6 +31,7 @@ import net.minecraft.inventory.Inventory;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.math.Direction; import net.minecraft.util.math.Direction;
import net.minecraft.util.registry.Registry; import net.minecraft.util.registry.Registry;
import org.checkerframework.checker.nullness.qual.NonNull;
import reborncore.common.fluid.container.GenericFluidContainer; import reborncore.common.fluid.container.GenericFluidContainer;
import net.minecraft.fluid.Fluid; import net.minecraft.fluid.Fluid;
import reborncore.common.fluid.container.ItemFluidInfo; import reborncore.common.fluid.container.ItemFluidInfo;
@ -41,6 +42,7 @@ import java.util.stream.Collectors;
public class FluidUtils { public class FluidUtils {
@NonNull
public static Fluid fluidFromBlock(Block block){ public static Fluid fluidFromBlock(Block block){
if(block instanceof FluidBlockExtensions){ if(block instanceof FluidBlockExtensions){
return ((FluidBlockExtensions) block).getFluid(); return ((FluidBlockExtensions) block).getFluid();
@ -136,11 +138,11 @@ public class FluidUtils {
return false; return false;
} }
public static boolean fluidEquals(Fluid fluid, Fluid fluid1) { public static boolean fluidEquals(@NonNull Fluid fluid, @NonNull Fluid fluid1) {
return false; return fluid == fluid1;
} }
public static FluidInstance getFluidStackInContainer(ItemStack invStack) { public static FluidInstance getFluidStackInContainer(@NonNull ItemStack invStack) {
return null; return null;
} }
} }

View file

@ -2,15 +2,15 @@
"type": "techreborn:fluid_replicator", "type": "techreborn:fluid_replicator",
"power": 20, "power": 20,
"time": 100, "time": 100,
"tank": {
"fluid": "techreborn:compressedair",
"amount": 1000
},
"ingredients": [ "ingredients": [
{ {
"item": "techreborn:uu_matter", "item": "techreborn:uu_matter",
"count": 2 "count": 2
} }
], ],
"results": [ "results": []
{
"fluid": "techreborn:compressedair"
}
]
} }

View file

@ -2,14 +2,14 @@
"type": "techreborn:fluid_replicator", "type": "techreborn:fluid_replicator",
"power": 2, "power": 2,
"time": 80, "time": 80,
"tank": {
"fluid": "minecraft:lava",
"amount": 1000
},
"ingredients": [ "ingredients": [
{ {
"item": "techreborn:uu_matter" "item": "techreborn:uu_matter"
} }
], ],
"results": [ "results": []
{
"fluid": "minecraft:lava"
}
]
} }

View file

@ -2,14 +2,14 @@
"type": "techreborn:fluid_replicator", "type": "techreborn:fluid_replicator",
"power": 2, "power": 2,
"time": 40, "time": 40,
"tank": {
"fluid": "minecraft:water",
"amount": 1000
},
"ingredients": [ "ingredients": [
{ {
"item": "techreborn:uu_matter" "item": "techreborn:uu_matter"
} }
], ],
"results": [ "results": []
{
"fluid": "minecraft:water"
}
]
} }

View file

@ -1148,6 +1148,105 @@
} }
] ]
}, },
"techreborn/blockentity/generator/advanced/SemiFluidGeneratorBlockEntity": {
"className": "techreborn/blockentity/generator/advanced/SemiFluidGeneratorBlockEntity",
"annotations": [
{
"desc": "Lreborncore/common/registration/RebornRegister;",
"values": [
"value",
"techreborn"
],
"api": 458752
}
],
"fields": [
{
"access": 9,
"name": "maxOutput",
"desc": "I",
"annotations": [
{
"desc": "Lreborncore/common/registration/config/ConfigRegistry;",
"values": [
"config",
"generators",
"category",
"semifluid_generator",
"key",
"SemifluidGeneratorMaxOutput",
"comment",
"Semifluid Generator Max Output (Value in EU)"
],
"api": 458752
}
]
},
{
"access": 9,
"name": "maxEnergy",
"desc": "I",
"annotations": [
{
"desc": "Lreborncore/common/registration/config/ConfigRegistry;",
"values": [
"config",
"generators",
"category",
"semifluid_generator",
"key",
"SemifluidGeneratorMaxEnergy",
"comment",
"Semifluid Generator Max Energy (Value in EU)"
],
"api": 458752
}
]
},
{
"access": 9,
"name": "tankCapacity",
"desc": "I",
"annotations": [
{
"desc": "Lreborncore/common/registration/config/ConfigRegistry;",
"values": [
"config",
"generators",
"category",
"semifluid_generator",
"key",
"SemifluidGeneratorTankCapacity",
"comment",
"Semifluid Generator Tank Capacity"
],
"api": 458752
}
]
},
{
"access": 9,
"name": "energyPerTick",
"desc": "I",
"annotations": [
{
"desc": "Lreborncore/common/registration/config/ConfigRegistry;",
"values": [
"config",
"generators",
"category",
"semifluid_generator",
"key",
"SemifluidGeneratorEnergyPerTick",
"comment",
"Semifluid Generator Energy Per Tick (Value in EU)"
],
"api": 458752
}
]
}
]
},
"techreborn/blockentity/machine/tier1/RollingMachineBlockEntity": { "techreborn/blockentity/machine/tier1/RollingMachineBlockEntity": {
"className": "techreborn/blockentity/machine/tier1/RollingMachineBlockEntity", "className": "techreborn/blockentity/machine/tier1/RollingMachineBlockEntity",
"annotations": [ "annotations": [
@ -1258,132 +1357,6 @@
} }
] ]
}, },
"techreborn/blockentity/generator/advanced/SemiFluidGeneratorBlockEntity": {
"className": "techreborn/blockentity/generator/advanced/SemiFluidGeneratorBlockEntity",
"annotations": [
{
"desc": "Lreborncore/common/registration/RebornRegister;",
"values": [
"value",
"techreborn"
],
"api": 458752
}
],
"fields": [
{
"access": 9,
"name": "maxOutput",
"desc": "I",
"annotations": [
{
"desc": "Lreborncore/common/registration/config/ConfigRegistry;",
"values": [
"config",
"generators",
"category",
"semifluid_generator",
"key",
"SemifluidGeneratorMaxOutput",
"comment",
"Semifluid Generator Max Output (Value in EU)"
],
"api": 458752
}
]
},
{
"access": 9,
"name": "maxEnergy",
"desc": "I",
"annotations": [
{
"desc": "Lreborncore/common/registration/config/ConfigRegistry;",
"values": [
"config",
"generators",
"category",
"semifluid_generator",
"key",
"SemifluidGeneratorMaxEnergy",
"comment",
"Semifluid Generator Max Energy (Value in EU)"
],
"api": 458752
}
]
},
{
"access": 9,
"name": "tankCapacity",
"desc": "I",
"annotations": [
{
"desc": "Lreborncore/common/registration/config/ConfigRegistry;",
"values": [
"config",
"generators",
"category",
"semifluid_generator",
"key",
"SemifluidGeneratorTankCapacity",
"comment",
"Semifluid Generator Tank Capacity"
],
"api": 458752
}
]
},
{
"access": 9,
"name": "energyPerTick",
"desc": "I",
"annotations": [
{
"desc": "Lreborncore/common/registration/config/ConfigRegistry;",
"values": [
"config",
"generators",
"category",
"semifluid_generator",
"key",
"SemifluidGeneratorEnergyPerTick",
"comment",
"Semifluid Generator Energy Per Tick (Value in EU)"
],
"api": 458752
}
]
}
]
},
"techreborn/api/fluidreplicator/FluidReplicatorRecipe": {
"className": "techreborn/api/fluidreplicator/FluidReplicatorRecipe",
"fields": [
{
"access": 18,
"name": "input",
"desc": "I",
"annotations": [
{
"desc": "Ljavax/annotation/Nonnull;",
"api": 458752
}
]
},
{
"access": 18,
"name": "output",
"desc": "Lreborncore/fluid/Fluid;",
"annotations": [
{
"desc": "Ljavax/annotation/Nonnull;",
"api": 458752
}
]
}
]
},
"techreborn/init/TRContent": { "techreborn/init/TRContent": {
"className": "techreborn/init/TRContent", "className": "techreborn/init/TRContent",
"annotations": [ "annotations": [
@ -2206,6 +2179,105 @@
} }
] ]
}, },
"techreborn/blockentity/fusionReactor/FusionControlComputerBlockEntity": {
"className": "techreborn/blockentity/fusionReactor/FusionControlComputerBlockEntity",
"annotations": [
{
"desc": "Lreborncore/common/registration/RebornRegister;",
"values": [
"value",
"techreborn"
],
"api": 458752
}
],
"fields": [
{
"access": 9,
"name": "maxInput",
"desc": "I",
"annotations": [
{
"desc": "Lreborncore/common/registration/config/ConfigRegistry;",
"values": [
"config",
"machines",
"category",
"fusion_reactor",
"key",
"FusionReactorMaxInput",
"comment",
"Fusion Reactor Max Input (Value in EU)"
],
"api": 458752
}
]
},
{
"access": 9,
"name": "maxOutput",
"desc": "I",
"annotations": [
{
"desc": "Lreborncore/common/registration/config/ConfigRegistry;",
"values": [
"config",
"machines",
"category",
"fusion_reactor",
"key",
"FusionReactorMaxOutput",
"comment",
"Fusion Reactor Max Output (Value in EU)"
],
"api": 458752
}
]
},
{
"access": 9,
"name": "maxEnergy",
"desc": "I",
"annotations": [
{
"desc": "Lreborncore/common/registration/config/ConfigRegistry;",
"values": [
"config",
"machines",
"category",
"fusion_reactor",
"key",
"FusionReactorMaxEnergy",
"comment",
"Fusion Reactor Max Energy (Value in EU)"
],
"api": 458752
}
]
},
{
"access": 9,
"name": "maxCoilSize",
"desc": "I",
"annotations": [
{
"desc": "Lreborncore/common/registration/config/ConfigRegistry;",
"values": [
"config",
"machines",
"category",
"fusion_reactor",
"key",
"FusionReactorMaxCoilSize",
"comment",
"Fusion Reactor Max Coil size (Radius)"
],
"api": 458752
}
]
}
]
},
"techreborn/config/ConfigTechReborn": { "techreborn/config/ConfigTechReborn": {
"className": "techreborn/config/ConfigTechReborn", "className": "techreborn/config/ConfigTechReborn",
"annotations": [ "annotations": [
@ -2935,105 +3007,6 @@
} }
] ]
}, },
"techreborn/blockentity/fusionReactor/FusionControlComputerBlockEntity": {
"className": "techreborn/blockentity/fusionReactor/FusionControlComputerBlockEntity",
"annotations": [
{
"desc": "Lreborncore/common/registration/RebornRegister;",
"values": [
"value",
"techreborn"
],
"api": 458752
}
],
"fields": [
{
"access": 9,
"name": "maxInput",
"desc": "I",
"annotations": [
{
"desc": "Lreborncore/common/registration/config/ConfigRegistry;",
"values": [
"config",
"machines",
"category",
"fusion_reactor",
"key",
"FusionReactorMaxInput",
"comment",
"Fusion Reactor Max Input (Value in EU)"
],
"api": 458752
}
]
},
{
"access": 9,
"name": "maxOutput",
"desc": "I",
"annotations": [
{
"desc": "Lreborncore/common/registration/config/ConfigRegistry;",
"values": [
"config",
"machines",
"category",
"fusion_reactor",
"key",
"FusionReactorMaxOutput",
"comment",
"Fusion Reactor Max Output (Value in EU)"
],
"api": 458752
}
]
},
{
"access": 9,
"name": "maxEnergy",
"desc": "I",
"annotations": [
{
"desc": "Lreborncore/common/registration/config/ConfigRegistry;",
"values": [
"config",
"machines",
"category",
"fusion_reactor",
"key",
"FusionReactorMaxEnergy",
"comment",
"Fusion Reactor Max Energy (Value in EU)"
],
"api": 458752
}
]
},
{
"access": 9,
"name": "maxCoilSize",
"desc": "I",
"annotations": [
{
"desc": "Lreborncore/common/registration/config/ConfigRegistry;",
"values": [
"config",
"machines",
"category",
"fusion_reactor",
"key",
"FusionReactorMaxCoilSize",
"comment",
"Fusion Reactor Max Coil size (Radius)"
],
"api": 458752
}
]
}
]
},
"techreborn/blockentity/machine/tier1/RecyclerBlockEntity": { "techreborn/blockentity/machine/tier1/RecyclerBlockEntity": {
"className": "techreborn/blockentity/machine/tier1/RecyclerBlockEntity", "className": "techreborn/blockentity/machine/tier1/RecyclerBlockEntity",
"annotations": [ "annotations": [
@ -3112,6 +3085,55 @@
} }
] ]
}, },
"techreborn/blockentity/machine/tier3/QuantumTankBlockEntity": {
"className": "techreborn/blockentity/machine/tier3/QuantumTankBlockEntity",
"annotations": [
{
"desc": "Lreborncore/common/registration/RebornRegister;",
"values": [
"value",
"techreborn"
],
"api": 458752
}
],
"methods": [
{
"access": 1,
"name": "getTank",
"desc": "()Lreborncore/common/util/Tank;",
"annotations": [
{
"desc": "Ljavax/annotation/Nullable;",
"api": 458752
}
]
}
],
"fields": [
{
"access": 9,
"name": "maxStorage",
"desc": "I",
"annotations": [
{
"desc": "Lreborncore/common/registration/config/ConfigRegistry;",
"values": [
"config",
"machines",
"category",
"quantum_tank",
"key",
"QuantumTankMaxStorage",
"comment",
"Maximum amount of millibuckets a Quantum Tank can store"
],
"api": 458752
}
]
}
]
},
"techreborn/blockentity/machine/multiblock/IndustrialSawmillBlockEntity": { "techreborn/blockentity/machine/multiblock/IndustrialSawmillBlockEntity": {
"className": "techreborn/blockentity/machine/multiblock/IndustrialSawmillBlockEntity", "className": "techreborn/blockentity/machine/multiblock/IndustrialSawmillBlockEntity",
"annotations": [ "annotations": [
@ -3182,55 +3204,6 @@
} }
] ]
}, },
"techreborn/blockentity/machine/tier3/QuantumTankBlockEntity": {
"className": "techreborn/blockentity/machine/tier3/QuantumTankBlockEntity",
"annotations": [
{
"desc": "Lreborncore/common/registration/RebornRegister;",
"values": [
"value",
"techreborn"
],
"api": 458752
}
],
"methods": [
{
"access": 1,
"name": "getTank",
"desc": "()Lreborncore/common/util/Tank;",
"annotations": [
{
"desc": "Ljavax/annotation/Nullable;",
"api": 458752
}
]
}
],
"fields": [
{
"access": 9,
"name": "maxStorage",
"desc": "I",
"annotations": [
{
"desc": "Lreborncore/common/registration/config/ConfigRegistry;",
"values": [
"config",
"machines",
"category",
"quantum_tank",
"key",
"QuantumTankMaxStorage",
"comment",
"Maximum amount of millibuckets a Quantum Tank can store"
],
"api": 458752
}
]
}
]
},
"techreborn/blockentity/machine/multiblock/FluidReplicatorBlockEntity": { "techreborn/blockentity/machine/multiblock/FluidReplicatorBlockEntity": {
"className": "techreborn/blockentity/machine/multiblock/FluidReplicatorBlockEntity", "className": "techreborn/blockentity/machine/multiblock/FluidReplicatorBlockEntity",
"annotations": [ "annotations": [
@ -3612,134 +3585,6 @@
], ],
"api": 458752 "api": 458752
} }
],
"fields": [
{
"access": 9,
"name": "secondaryGemDrops",
"desc": "Z",
"annotations": [
{
"desc": "Lreborncore/common/registration/config/ConfigRegistry;",
"values": [
"config",
"compat",
"category",
"general",
"key",
"secondaryGemDrops",
"comment",
"Drop red and yellow garnets and peridot from any harvested oreRuby, oreSapphire, oreSphalerite. False will also disable drop from TechReborn ores."
],
"api": 458752
}
]
},
{
"access": 9,
"name": "redGarnetDropChance",
"desc": "D",
"annotations": [
{
"desc": "Lreborncore/common/registration/config/ConfigRegistry;",
"values": [
"config",
"misc",
"category",
"blocks",
"key",
"redGarnetDropChance",
"comment",
"Chance to get Red Garnet from Ruby Ore"
],
"api": 458752
}
]
},
{
"access": 9,
"name": "peridotDropChance",
"desc": "D",
"annotations": [
{
"desc": "Lreborncore/common/registration/config/ConfigRegistry;",
"values": [
"config",
"misc",
"category",
"blocks",
"key",
"peridotDropChance",
"comment",
"Chance to get Peridot from Sapphire Ore"
],
"api": 458752
}
]
},
{
"access": 9,
"name": "aluminiumDropChance",
"desc": "D",
"annotations": [
{
"desc": "Lreborncore/common/registration/config/ConfigRegistry;",
"values": [
"config",
"misc",
"category",
"blocks",
"key",
"aluminiumDropChance",
"comment",
"Chance to get Aluminium dust from Sodalite Ore"
],
"api": 458752
}
]
},
{
"access": 9,
"name": "redstoneDropChance",
"desc": "D",
"annotations": [
{
"desc": "Lreborncore/common/registration/config/ConfigRegistry;",
"values": [
"config",
"misc",
"category",
"blocks",
"key",
"redstoneDropChance",
"comment",
"Chance to get Redstone from Cinnabar Ore"
],
"api": 458752
}
]
},
{
"access": 9,
"name": "yellowGarnetDropChance",
"desc": "D",
"annotations": [
{
"desc": "Lreborncore/common/registration/config/ConfigRegistry;",
"values": [
"config",
"misc",
"category",
"blocks",
"key",
"yellowGarnetDropChance",
"comment",
"Chance to get Yellow Garnet gem from Sphalerite Ore"
],
"api": 458752
}
]
}
] ]
}, },
"techreborn/items/ItemManual": { "techreborn/items/ItemManual": {
@ -4689,22 +4534,6 @@
} }
] ]
}, },
"techreborn/utils/RecipeUtils": {
"className": "techreborn/utils/RecipeUtils",
"methods": [
{
"access": 9,
"name": "getEmptyCell",
"desc": "(I)Lnet/minecraft/class_1799;",
"annotations": [
{
"desc": "Ljavax/annotation/Nonnull;",
"api": 458752
}
]
}
]
},
"techreborn/blockentity/machine/tier1/ExtractorBlockEntity": { "techreborn/blockentity/machine/tier1/ExtractorBlockEntity": {
"className": "techreborn/blockentity/machine/tier1/ExtractorBlockEntity", "className": "techreborn/blockentity/machine/tier1/ExtractorBlockEntity",
"annotations": [ "annotations": [
@ -4762,6 +4591,22 @@
} }
] ]
}, },
"techreborn/utils/RecipeUtils": {
"className": "techreborn/utils/RecipeUtils",
"methods": [
{
"access": 9,
"name": "getEmptyCell",
"desc": "(I)Lnet/minecraft/class_1799;",
"annotations": [
{
"desc": "Ljavax/annotation/Nonnull;",
"api": 458752
}
]
}
]
},
"techreborn/blockentity/generator/basic/WindMillBlockEntity": { "techreborn/blockentity/generator/basic/WindMillBlockEntity": {
"className": "techreborn/blockentity/generator/basic/WindMillBlockEntity", "className": "techreborn/blockentity/generator/basic/WindMillBlockEntity",
"annotations": [ "annotations": [
@ -4860,19 +4705,6 @@
] ]
} }
] ]
},
"techreborn/init/ModRecipes": {
"className": "techreborn/init/ModRecipes",
"annotations": [
{
"desc": "Lreborncore/common/registration/RebornRegister;",
"values": [
"value",
"techreborn"
],
"api": 458752
}
]
} }
} }
} }