1147 - Initial auto mappings pass
This commit is contained in:
parent
48198dbcb3
commit
4e03ac893c
291 changed files with 3335 additions and 3504 deletions
|
@ -24,13 +24,13 @@
|
|||
|
||||
package techreborn.api.recipe;
|
||||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import reborncore.common.crafting.Recipe;
|
||||
import reborncore.common.recipes.RecipeCrafter;
|
||||
import reborncore.common.util.Inventory;
|
||||
import techreborn.init.ModRecipes;
|
||||
|
||||
import java.util.List;
|
||||
import net.minecraft.block.entity.BlockEntity;
|
||||
|
||||
/**
|
||||
* @author drcrazy
|
||||
|
@ -44,14 +44,14 @@ public class ScrapboxRecipeCrafter extends RecipeCrafter {
|
|||
* @param inputSlots Slot IDs for input
|
||||
* @param outputSlots Slot IDs for output
|
||||
*/
|
||||
public ScrapboxRecipeCrafter(TileEntity parentTile, Inventory<?> inventory, int[] inputSlots, int[] outputSlots) {
|
||||
public ScrapboxRecipeCrafter(BlockEntity parentTile, Inventory<?> inventory, int[] inputSlots, int[] outputSlots) {
|
||||
super(ModRecipes.SCRAPBOX, parentTile, 1, 1, inventory, inputSlots, outputSlots);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateCurrentRecipe(){
|
||||
List<Recipe> scrapboxRecipeList = ModRecipes.SCRAPBOX.getRecipes(tile.getWorld());
|
||||
int random = tile.getWorld().rand.nextInt(scrapboxRecipeList.size());
|
||||
int random = tile.getWorld().random.nextInt(scrapboxRecipeList.size());
|
||||
// Sets the current recipe then syncs
|
||||
setCurrentRecipe(scrapboxRecipeList.get(random));
|
||||
this.currentNeededTicks = Math.max((int) (currentRecipe.getTime() * (1.0 - getSpeedMultiplier())), 1);
|
||||
|
|
|
@ -25,9 +25,9 @@
|
|||
package techreborn.api.recipe.recipes;
|
||||
|
||||
import com.google.gson.JsonObject;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.JsonUtils;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.block.entity.BlockEntity;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.JsonHelper;
|
||||
import reborncore.common.crafting.Recipe;
|
||||
import reborncore.common.crafting.RecipeType;
|
||||
import techreborn.tiles.machine.multiblock.TileIndustrialBlastFurnace;
|
||||
|
@ -36,14 +36,14 @@ public class BlastFurnaceRecipe extends Recipe {
|
|||
|
||||
int heat;
|
||||
|
||||
public BlastFurnaceRecipe(RecipeType<?> type, ResourceLocation name) {
|
||||
public BlastFurnaceRecipe(RecipeType<?> type, Identifier name) {
|
||||
super(type, name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deserialize(JsonObject jsonObject) {
|
||||
super.deserialize(jsonObject);
|
||||
heat = JsonUtils.getInt(jsonObject, "heat");
|
||||
heat = JsonHelper.getInt(jsonObject, "heat");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -53,7 +53,7 @@ public class BlastFurnaceRecipe extends Recipe {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean canCraft(final TileEntity tile) {
|
||||
public boolean canCraft(final BlockEntity tile) {
|
||||
if (tile instanceof TileIndustrialBlastFurnace) {
|
||||
final TileIndustrialBlastFurnace blastFurnace = (TileIndustrialBlastFurnace) tile;
|
||||
return blastFurnace.getHeat() >= heat;
|
||||
|
@ -62,7 +62,7 @@ public class BlastFurnaceRecipe extends Recipe {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onCraft(final TileEntity tile) {
|
||||
public boolean onCraft(final BlockEntity tile) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,9 +24,9 @@
|
|||
|
||||
package techreborn.api.recipe.recipes;
|
||||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraft.block.entity.BlockEntity;
|
||||
import net.minecraft.util.Identifier;
|
||||
|
||||
import reborncore.common.crafting.Recipe;
|
||||
import reborncore.common.crafting.RecipeType;
|
||||
import techreborn.tiles.machine.multiblock.TileIndustrialGrinder;
|
||||
|
@ -36,12 +36,12 @@ public class IndustrialGrinderRecipe extends Recipe {
|
|||
//TODO 1.14 fluids
|
||||
FluidStack fluidStack = null;
|
||||
|
||||
public IndustrialGrinderRecipe(RecipeType<?> type, ResourceLocation name) {
|
||||
public IndustrialGrinderRecipe(RecipeType<?> type, Identifier name) {
|
||||
super(type, name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canCraft(final TileEntity tileEntity) {
|
||||
public boolean canCraft(final BlockEntity tileEntity) {
|
||||
TileIndustrialGrinder tile = (TileIndustrialGrinder) tileEntity;
|
||||
if (!tile.getMultiBlock()) {
|
||||
return false;
|
||||
|
@ -63,7 +63,7 @@ public class IndustrialGrinderRecipe extends Recipe {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onCraft(final TileEntity tileEntity) {
|
||||
public boolean onCraft(final BlockEntity tileEntity) {
|
||||
TileIndustrialGrinder tile = (TileIndustrialGrinder) tileEntity;
|
||||
final FluidStack recipeFluid = fluidStack;
|
||||
final FluidStack tankFluid = tile.tank.getFluid();
|
||||
|
|
|
@ -24,9 +24,9 @@
|
|||
|
||||
package techreborn.api.recipe.recipes;
|
||||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraft.block.entity.BlockEntity;
|
||||
import net.minecraft.util.Identifier;
|
||||
|
||||
import reborncore.common.crafting.Recipe;
|
||||
import reborncore.common.crafting.RecipeType;
|
||||
import techreborn.tiles.machine.multiblock.TileIndustrialSawmill;
|
||||
|
@ -36,12 +36,12 @@ public class IndustrialSawmillRecipe extends Recipe {
|
|||
//TODO 1.14 fluids
|
||||
FluidStack fluidStack = null;
|
||||
|
||||
public IndustrialSawmillRecipe(RecipeType<?> type, ResourceLocation name) {
|
||||
public IndustrialSawmillRecipe(RecipeType<?> type, Identifier name) {
|
||||
super(type, name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canCraft(TileEntity tileEntity) {
|
||||
public boolean canCraft(BlockEntity tileEntity) {
|
||||
TileIndustrialSawmill tile = (TileIndustrialSawmill) tileEntity;
|
||||
if (!tile.getMutliBlock()) {
|
||||
return false;
|
||||
|
@ -63,7 +63,7 @@ public class IndustrialSawmillRecipe extends Recipe {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onCraft(TileEntity tileEntity) {
|
||||
public boolean onCraft(BlockEntity tileEntity) {
|
||||
TileIndustrialSawmill tile = (TileIndustrialSawmill) tileEntity;
|
||||
final FluidStack recipeFluid = fluidStack;
|
||||
final FluidStack tankFluid = tile.tank.getFluid();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue