parent
d25bb23e8e
commit
315c0aa509
327 changed files with 1686 additions and 2476 deletions
|
@ -10,7 +10,7 @@ import techreborn.client.GuiHandler;
|
|||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.tiles.TileDigitalChest;
|
||||
|
||||
public class BlockDigitalChest extends BlockMachineBase
|
||||
public class BlockDigitalChest extends BlockMachineBase implements IAdvancedRotationTexture
|
||||
{
|
||||
|
||||
private final String prefix = "techreborn:blocks/machine/greg_machines/";
|
||||
|
@ -37,4 +37,28 @@ public class BlockDigitalChest extends BlockMachineBase
|
|||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFront(boolean isActive)
|
||||
{
|
||||
return prefix + "quantum_chest";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSide(boolean isActive)
|
||||
{
|
||||
return prefix + "qchest_side";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTop(boolean isActive)
|
||||
{
|
||||
return prefix + "quantum_top";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getBottom(boolean isActive)
|
||||
{
|
||||
return prefix + "machine_bottom";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -14,7 +14,6 @@ import net.minecraft.util.math.BlockPos;
|
|||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import reborncore.common.util.ItemNBTHelper;
|
||||
import reborncore.shields.RebornCoreShields;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
|
||||
/**
|
||||
|
|
|
@ -34,7 +34,7 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
public class BlockOre extends BaseBlock implements IOreNameProvider
|
||||
public class BlockOre extends BaseBlock implements ITexturedBlock, IOreNameProvider
|
||||
{
|
||||
|
||||
public static final String[] ores = new String[] { "galena", "iridium", "ruby", "sapphire", "bauxite", "pyrite",
|
||||
|
@ -198,17 +198,17 @@ public class BlockOre extends BaseBlock implements IOreNameProvider
|
|||
// return meta;
|
||||
// }
|
||||
|
||||
// @Override
|
||||
// public String getTextureNameFromState(IBlockState BlockStateContainer, EnumFacing facing)
|
||||
// {
|
||||
// return "techreborn:blocks/ore/ore" + StringUtils.toFirstCapital(ores[getMetaFromState(BlockStateContainer)]);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public int amountOfStates()
|
||||
// {
|
||||
// return ores.length;
|
||||
// }
|
||||
@Override
|
||||
public String getTextureNameFromState(IBlockState BlockStateContainer, EnumFacing facing)
|
||||
{
|
||||
return "techreborn:blocks/ore/ore" + StringUtils.toFirstCapital(ores[getMetaFromState(BlockStateContainer)]);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int amountOfStates()
|
||||
{
|
||||
return ores.length;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int damageDropped(IBlockState state) {
|
||||
|
|
|
@ -27,7 +27,7 @@ import techreborn.client.TechRebornCreativeTabMisc;
|
|||
import techreborn.init.ModBlocks;
|
||||
import techreborn.world.config.IOreNameProvider;
|
||||
|
||||
public class BlockOre2 extends BaseBlock implements IOreNameProvider
|
||||
public class BlockOre2 extends BaseBlock implements ITexturedBlock, IOreNameProvider
|
||||
{
|
||||
|
||||
public static final String[] ores = new String[] { "copper", "tin"};
|
||||
|
@ -119,17 +119,17 @@ public class BlockOre2 extends BaseBlock implements IOreNameProvider
|
|||
// return meta;
|
||||
// }
|
||||
|
||||
// @Override
|
||||
// public String getTextureNameFromState(IBlockState BlockStateContainer, EnumFacing facing)
|
||||
// {
|
||||
// return "techreborn:blocks/ore/ore" + StringUtils.toFirstCapital(ores[getMetaFromState(BlockStateContainer)]);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public int amountOfStates()
|
||||
// {
|
||||
// return ores.length;
|
||||
// }
|
||||
@Override
|
||||
public String getTextureNameFromState(IBlockState BlockStateContainer, EnumFacing facing)
|
||||
{
|
||||
return "techreborn:blocks/ore/ore" + StringUtils.toFirstCapital(ores[getMetaFromState(BlockStateContainer)]);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int amountOfStates()
|
||||
{
|
||||
return ores.length;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int damageDropped(IBlockState state) {
|
||||
|
|
|
@ -15,7 +15,7 @@ import techreborn.client.GuiHandler;
|
|||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.tiles.TileQuantumChest;
|
||||
|
||||
public class BlockQuantumChest extends BlockMachineBase
|
||||
public class BlockQuantumChest extends BlockMachineBase implements IAdvancedRotationTexture
|
||||
{
|
||||
|
||||
private final String prefix = "techreborn:blocks/machine/greg_machines/";
|
||||
|
@ -42,4 +42,28 @@ public class BlockQuantumChest extends BlockMachineBase
|
|||
playerIn.openGui(Core.INSTANCE, GuiHandler.quantumChestID, worldIn, pos.getX(), pos.getY(), pos.getZ());
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFront(boolean isActive)
|
||||
{
|
||||
return prefix + "quantum_chest";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSide(boolean isActive)
|
||||
{
|
||||
return prefix + "qchest_side";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTop(boolean isActive)
|
||||
{
|
||||
return prefix + "quantum_top";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getBottom(boolean isActive)
|
||||
{
|
||||
return prefix + "machine_bottom";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ import techreborn.client.GuiHandler;
|
|||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.tiles.TileQuantumTank;
|
||||
|
||||
public class BlockQuantumTank extends BlockMachineBase
|
||||
public class BlockQuantumTank extends BlockMachineBase implements IAdvancedRotationTexture
|
||||
{
|
||||
|
||||
private final String prefix = "techreborn:blocks/machine/greg_machines/";
|
||||
|
@ -44,4 +44,28 @@ public class BlockQuantumTank extends BlockMachineBase
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFront(boolean isActive)
|
||||
{
|
||||
return "techreborn:blocks/machine/generators/thermal_generator_side_off";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSide(boolean isActive)
|
||||
{
|
||||
return "techreborn:blocks/machine/generators/thermal_generator_side_off";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTop(boolean isActive)
|
||||
{
|
||||
return prefix + "quantum_top";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getBottom(boolean isActive)
|
||||
{
|
||||
return "techreborn:blocks/machine/generators/thermal_generator_bottom";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package techreborn.blocks;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import me.modmuss50.jsonDestroyer.api.ITexturedBlock;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.properties.PropertyInteger;
|
||||
|
@ -13,21 +12,18 @@ import net.minecraft.util.EnumFacing;
|
|||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import reborncore.common.BaseBlock;
|
||||
import reborncore.common.blocks.PropertyString;
|
||||
import reborncore.common.util.ArrayUtils;
|
||||
import techreborn.client.TechRebornCreativeTabMisc;
|
||||
import techreborn.init.ModBlocks;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
public class BlockStorage extends BaseBlock
|
||||
public class BlockStorage extends BaseBlock implements ITexturedBlock
|
||||
{
|
||||
|
||||
public static final String[] types = new String[] { "silver", "aluminum", "titanium", "chrome", "steel", "brass",
|
||||
"lead", "electrum", "zinc", "platinum", "tungsten", "nickel", "invar", "iridium" };
|
||||
static List<String> oreNamesList = Lists.newArrayList(ArrayUtils.arrayToLowercase(types));
|
||||
public PropertyString VARIANTS = new PropertyString("type", oreNamesList);
|
||||
public PropertyInteger METADATA;
|
||||
|
||||
public BlockStorage(Material material)
|
||||
{
|
||||
|
@ -35,7 +31,7 @@ public class BlockStorage extends BaseBlock
|
|||
setUnlocalizedName("techreborn.storage");
|
||||
setCreativeTab(TechRebornCreativeTabMisc.instance);
|
||||
setHardness(2f);
|
||||
this.setDefaultState(this.getStateFromMeta(0));
|
||||
this.setDefaultState(this.getDefaultState().withProperty(METADATA, 0));
|
||||
}
|
||||
|
||||
public static ItemStack getStorageBlockByName(String name, int count)
|
||||
|
@ -78,22 +74,37 @@ public class BlockStorage extends BaseBlock
|
|||
}
|
||||
|
||||
@Override
|
||||
public IBlockState getStateFromMeta(int meta) {
|
||||
if(meta > types.length){
|
||||
meta = 0;
|
||||
}
|
||||
return getBlockState().getBaseState().withProperty(VARIANTS, oreNamesList.get(meta));
|
||||
public String getTextureNameFromState(IBlockState BlockStateContainer, EnumFacing facing)
|
||||
{
|
||||
return "techreborn:blocks/storage/" + types[getMetaFromState(BlockStateContainer)] + "_block";
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetaFromState(IBlockState state) {
|
||||
return oreNamesList.indexOf(state.getValue(VARIANTS));
|
||||
public int amountOfStates()
|
||||
{
|
||||
return types.length;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBlockState getStateFromMeta(int meta)
|
||||
{
|
||||
if(meta > types.length){
|
||||
meta = 0;
|
||||
}
|
||||
return this.getDefaultState().withProperty(METADATA, meta);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetaFromState(IBlockState state)
|
||||
{
|
||||
return state.getValue(METADATA);
|
||||
}
|
||||
|
||||
protected BlockStateContainer createBlockState()
|
||||
{
|
||||
VARIANTS = new PropertyString("type", oreNamesList);
|
||||
return new BlockStateContainer(this, VARIANTS);
|
||||
|
||||
METADATA = PropertyInteger.create("type", 0, types.length - 1);
|
||||
return new BlockStateContainer(this, METADATA);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package techreborn.blocks;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import me.modmuss50.jsonDestroyer.api.ITexturedBlock;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.properties.PropertyInteger;
|
||||
|
@ -13,8 +12,6 @@ import net.minecraft.util.EnumFacing;
|
|||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import reborncore.common.BaseBlock;
|
||||
import reborncore.common.blocks.PropertyString;
|
||||
import reborncore.common.util.ArrayUtils;
|
||||
import techreborn.client.TechRebornCreativeTabMisc;
|
||||
import techreborn.init.ModBlocks;
|
||||
|
||||
|
@ -22,14 +19,13 @@ import java.security.InvalidParameterException;
|
|||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
public class BlockStorage2 extends BaseBlock
|
||||
public class BlockStorage2 extends BaseBlock implements ITexturedBlock
|
||||
{
|
||||
|
||||
public static final String[] types = new String[] { "tungstensteel",
|
||||
"iridium_reinforced_tungstensteel", "iridium_reinforced_stone", "ruby", "sapphire", "peridot",
|
||||
"yellowGarnet", "redGarnet", "copper", "tin", "refinedIron" };
|
||||
static List<String> oreNamesList = Lists.newArrayList(ArrayUtils.arrayToLowercase(types));
|
||||
public PropertyString VARIANTS = new PropertyString("type", oreNamesList);
|
||||
public PropertyInteger METADATA;
|
||||
|
||||
public BlockStorage2(Material material)
|
||||
{
|
||||
|
@ -37,7 +33,7 @@ public class BlockStorage2 extends BaseBlock
|
|||
setUnlocalizedName("techreborn.storage2");
|
||||
setCreativeTab(TechRebornCreativeTabMisc.instance);
|
||||
setHardness(2f);
|
||||
this.setDefaultState(this.getStateFromMeta(0));
|
||||
this.setDefaultState(this.getDefaultState().withProperty(METADATA, 0));
|
||||
}
|
||||
|
||||
public static ItemStack getStorageBlockByName(String name, int count)
|
||||
|
@ -75,22 +71,37 @@ public class BlockStorage2 extends BaseBlock
|
|||
}
|
||||
|
||||
@Override
|
||||
public IBlockState getStateFromMeta(int meta) {
|
||||
if(meta > types.length){
|
||||
meta = 0;
|
||||
}
|
||||
return getBlockState().getBaseState().withProperty(VARIANTS, oreNamesList.get(meta));
|
||||
public String getTextureNameFromState(IBlockState BlockStateContainer, EnumFacing facing)
|
||||
{
|
||||
return "techreborn:blocks/storage/" + types[getMetaFromState(BlockStateContainer)] + "_block";
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetaFromState(IBlockState state) {
|
||||
return oreNamesList.indexOf(state.getValue(VARIANTS));
|
||||
public int amountOfStates()
|
||||
{
|
||||
return types.length;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBlockState getStateFromMeta(int meta)
|
||||
{
|
||||
if(meta > types.length){
|
||||
meta = 0;
|
||||
}
|
||||
return this.getDefaultState().withProperty(METADATA, meta);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetaFromState(IBlockState state)
|
||||
{
|
||||
return state.getValue(METADATA);
|
||||
}
|
||||
|
||||
protected BlockStateContainer createBlockState()
|
||||
{
|
||||
VARIANTS = new PropertyString("type", oreNamesList);
|
||||
return new BlockStateContainer(this, VARIANTS);
|
||||
|
||||
METADATA = PropertyInteger.create("type", 0, types.length - 1);
|
||||
return new BlockStateContainer(this, METADATA);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,53 @@
|
|||
package techreborn.blocks.generator;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import reborncore.common.blocks.IAdvancedRotationTexture;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.tiles.generator.TileHeatGenerator;
|
||||
|
||||
public class BlockHeatGenerator extends BlockMachineBase implements IAdvancedRotationTexture
|
||||
{
|
||||
|
||||
private final String prefix = "techreborn:blocks/machine/generators/";
|
||||
|
||||
public BlockHeatGenerator(Material material)
|
||||
{
|
||||
super();
|
||||
setUnlocalizedName("techreborn.heatgenerator");
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int p_149915_2_)
|
||||
{
|
||||
return new TileHeatGenerator();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFront(boolean isActive)
|
||||
{
|
||||
return prefix + "heat_generator_side";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSide(boolean isActive)
|
||||
{
|
||||
return prefix + "heat_generator_side";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTop(boolean isActive)
|
||||
{
|
||||
return prefix + "heat_generator_top";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getBottom(boolean isActive)
|
||||
{
|
||||
return prefix + "heat_generator_bottom";
|
||||
}
|
||||
|
||||
}
|
|
@ -21,7 +21,6 @@ public class RegisterItemJsons
|
|||
register(ModItems.lithiumBattery, "lithiumBattery");
|
||||
register(ModItems.energyCrystal, "energyCrystal");
|
||||
register(ModItems.lapotronCrystal, "lapotronCrystal");
|
||||
register(ModItems.lapotronicOrb, "lapotronOrb");
|
||||
register(ModItems.nanosaber, "nanosaber");
|
||||
}
|
||||
|
||||
|
|
|
@ -32,12 +32,6 @@ public class AlloySmelterRecipeHandler implements IRecipeHandler<AlloySmelterRec
|
|||
return RecipeCategoryUids.ALLOY_SMELTER;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getRecipeCategoryUid(@Nonnull AlloySmelterRecipe recipe) {
|
||||
return RecipeCategoryUids.ALLOY_SMELTER;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public IRecipeWrapper getRecipeWrapper(@Nonnull AlloySmelterRecipe recipe)
|
||||
|
|
|
@ -32,12 +32,6 @@ public class AssemblingMachineRecipeHandler implements IRecipeHandler<Assembling
|
|||
return RecipeCategoryUids.ASSEMBLING_MACHINE;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getRecipeCategoryUid(@Nonnull AssemblingMachineRecipe recipe) {
|
||||
return RecipeCategoryUids.ASSEMBLING_MACHINE;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public IRecipeWrapper getRecipeWrapper(@Nonnull AssemblingMachineRecipe recipe)
|
||||
|
|
|
@ -32,12 +32,6 @@ public class BlastFurnaceRecipeHandler implements IRecipeHandler<BlastFurnaceRec
|
|||
return RecipeCategoryUids.BLAST_FURNACE;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getRecipeCategoryUid(@Nonnull BlastFurnaceRecipe recipe) {
|
||||
return RecipeCategoryUids.BLAST_FURNACE;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public IRecipeWrapper getRecipeWrapper(@Nonnull BlastFurnaceRecipe recipe)
|
||||
|
|
|
@ -32,12 +32,6 @@ public class CentrifugeRecipeHandler implements IRecipeHandler<CentrifugeRecipe>
|
|||
return RecipeCategoryUids.CENTRIFUGE;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getRecipeCategoryUid(@Nonnull CentrifugeRecipe recipe) {
|
||||
return RecipeCategoryUids.CENTRIFUGE;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public IRecipeWrapper getRecipeWrapper(@Nonnull CentrifugeRecipe recipe)
|
||||
|
|
|
@ -32,12 +32,6 @@ public class ChemicalReactorRecipeHandler implements IRecipeHandler<ChemicalReac
|
|||
return RecipeCategoryUids.CHEMICAL_REACTOR;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getRecipeCategoryUid(@Nonnull ChemicalReactorRecipe recipe) {
|
||||
return RecipeCategoryUids.CHEMICAL_REACTOR;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public IRecipeWrapper getRecipeWrapper(@Nonnull ChemicalReactorRecipe recipe)
|
||||
|
|
|
@ -32,12 +32,6 @@ public class CompressorRecipeHandler implements IRecipeHandler<CompressorRecipe>
|
|||
return RecipeCategoryUids.COMPRESSOR;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getRecipeCategoryUid(@Nonnull CompressorRecipe recipe) {
|
||||
return RecipeCategoryUids.COMPRESSOR;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public IRecipeWrapper getRecipeWrapper(@Nonnull CompressorRecipe recipe)
|
||||
|
|
|
@ -32,12 +32,6 @@ public class ExtractorRecipeHandler implements IRecipeHandler<ExtractorRecipe>
|
|||
return RecipeCategoryUids.EXTRACTOR;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getRecipeCategoryUid(@Nonnull ExtractorRecipe recipe) {
|
||||
return RecipeCategoryUids.EXTRACTOR;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public IRecipeWrapper getRecipeWrapper(@Nonnull ExtractorRecipe recipe)
|
||||
|
|
|
@ -24,12 +24,6 @@ public class FusionReactorRecipeHandler implements IRecipeHandler<FusionReactorR
|
|||
return RecipeCategoryUids.FUSION_REACTOR;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getRecipeCategoryUid(@Nonnull FusionReactorRecipe recipe) {
|
||||
return RecipeCategoryUids.FUSION_REACTOR;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public IRecipeWrapper getRecipeWrapper(@Nonnull FusionReactorRecipe recipe)
|
||||
|
|
|
@ -32,12 +32,6 @@ public class GrinderRecipeHandler implements IRecipeHandler<GrinderRecipe>
|
|||
return RecipeCategoryUids.GRINDER;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getRecipeCategoryUid(@Nonnull GrinderRecipe recipe) {
|
||||
return RecipeCategoryUids.GRINDER;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public IRecipeWrapper getRecipeWrapper(@Nonnull GrinderRecipe recipe)
|
||||
|
|
|
@ -32,12 +32,6 @@ public class ImplosionCompressorRecipeHandler implements IRecipeHandler<Implosio
|
|||
return RecipeCategoryUids.IMPLOSION_COMPRESSOR;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getRecipeCategoryUid(@Nonnull ImplosionCompressorRecipe recipe) {
|
||||
return RecipeCategoryUids.IMPLOSION_COMPRESSOR;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public IRecipeWrapper getRecipeWrapper(@Nonnull ImplosionCompressorRecipe recipe)
|
||||
|
|
|
@ -32,12 +32,6 @@ public class IndustrialElectrolyzerRecipeHandler implements IRecipeHandler<Indus
|
|||
return RecipeCategoryUids.INDUSTRIAL_ELECTROLYZER;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getRecipeCategoryUid(@Nonnull IndustrialElectrolyzerRecipe recipe) {
|
||||
return RecipeCategoryUids.INDUSTRIAL_ELECTROLYZER;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public IRecipeWrapper getRecipeWrapper(@Nonnull IndustrialElectrolyzerRecipe recipe)
|
||||
|
|
|
@ -32,12 +32,6 @@ public class IndustrialGrinderRecipeHandler implements IRecipeHandler<Industrial
|
|||
return RecipeCategoryUids.INDUSTRIAL_GRINDER;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getRecipeCategoryUid(@Nonnull IndustrialGrinderRecipe recipe) {
|
||||
return RecipeCategoryUids.INDUSTRIAL_GRINDER;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public IRecipeWrapper getRecipeWrapper(@Nonnull IndustrialGrinderRecipe recipe)
|
||||
|
|
|
@ -32,12 +32,6 @@ public class IndustrialSawmillRecipeHandler implements IRecipeHandler<Industrial
|
|||
return RecipeCategoryUids.INDUSTRIAL_SAWMILL;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getRecipeCategoryUid(@Nonnull IndustrialSawmillRecipe recipe) {
|
||||
return RecipeCategoryUids.INDUSTRIAL_SAWMILL;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public IRecipeWrapper getRecipeWrapper(@Nonnull IndustrialSawmillRecipe recipe)
|
||||
|
|
|
@ -22,12 +22,6 @@ public class RollingMachineRecipeHandler implements IRecipeHandler<RollingMachin
|
|||
return RecipeCategoryUids.ROLLING_MACHINE;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getRecipeCategoryUid(@Nonnull RollingMachineRecipeWrapper recipe) {
|
||||
return RecipeCategoryUids.ROLLING_MACHINE;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public IRecipeWrapper getRecipeWrapper(@Nonnull RollingMachineRecipeWrapper recipe)
|
||||
|
|
|
@ -32,12 +32,6 @@ public class ScrapboxRecipeHandler implements IRecipeHandler<ScrapboxRecipe>
|
|||
return RecipeCategoryUids.SCRAPBOX;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getRecipeCategoryUid(@Nonnull ScrapboxRecipe recipe) {
|
||||
return RecipeCategoryUids.SCRAPBOX;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public IRecipeWrapper getRecipeWrapper(@Nonnull ScrapboxRecipe recipe)
|
||||
|
|
|
@ -29,13 +29,7 @@ public class VacuumFreezerRecipeHandler implements IRecipeHandler<VacuumFreezerR
|
|||
@Override
|
||||
public String getRecipeCategoryUid()
|
||||
{
|
||||
return RecipeCategoryUids.SCRAPBOX;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getRecipeCategoryUid(@Nonnull VacuumFreezerRecipe recipe) {
|
||||
return RecipeCategoryUids.SCRAPBOX;
|
||||
return RecipeCategoryUids.VACUUM_FREEZER;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
|
|
|
@ -27,6 +27,7 @@ public class ConfigTechReborn
|
|||
public static int ThermalGeneratorOutput;
|
||||
public static int CentrifugeInputTick;
|
||||
public static int DragonEggSiphonerOutput;
|
||||
public static int HeatGeneratorOutput;
|
||||
public static int AverageEuOutTickTime;
|
||||
public static int ExtraOutputPerLesuBlock;
|
||||
public static int BaseLesuOutput;
|
||||
|
@ -213,6 +214,10 @@ public class ConfigTechReborn
|
|||
.get(CATEGORY_POWER, "Centrifuge Max Tick", 30, "Set the max power the Centrifuge uses per tick")
|
||||
.getInt();
|
||||
|
||||
HeatGeneratorOutput = config
|
||||
.get(CATEGORY_POWER, "HeatGenerator Max Output", 30, "Set the max output for the HeatGenerator")
|
||||
.getInt();
|
||||
|
||||
AesuMaxOutput = config.get(CATEGORY_POWER, "AESU Max Output", 30, "Set the max output for the AESU").getInt();
|
||||
|
||||
AesuMaxStorage = config.get(CATEGORY_POWER, "AESU Max Storage", 30, "Set the max Storage for the AESU")
|
||||
|
|
|
@ -5,9 +5,7 @@ import net.minecraft.dispenser.BehaviorDefaultDispenseItem;
|
|||
import net.minecraft.dispenser.IBlockSource;
|
||||
import net.minecraft.dispenser.IPosition;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntityDispenser;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import techreborn.api.ScrapboxList;
|
||||
|
||||
public class BehaviorDispenseScrapbox extends BehaviorDefaultDispenseItem
|
||||
|
@ -23,8 +21,7 @@ public class BehaviorDispenseScrapbox extends BehaviorDefaultDispenseItem
|
|||
float zOffset = source.getWorld().rand.nextFloat() * 0.8F + 0.1F;
|
||||
stack.splitStack(1);
|
||||
|
||||
TileEntityDispenser tile = source.getBlockTileEntity();
|
||||
EnumFacing enumfacing = tile.getWorld().getBlockState(new BlockPos(source.getX(), source.getY(), source.getZ())).getValue(BlockDispenser.FACING);
|
||||
EnumFacing enumfacing = BlockDispenser.getFacing(source.getBlockMetadata());
|
||||
IPosition iposition = BlockDispenser.getDispensePosition(source);
|
||||
doDispense(source.getWorld(), out, 6, enumfacing, iposition);
|
||||
return stack;
|
||||
|
|
|
@ -7,7 +7,6 @@ import net.minecraft.item.ItemBlock;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import org.apache.commons.lang3.ArrayUtils;
|
||||
import reborncore.common.tile.TileMachineBase;
|
||||
import reborncore.common.util.StringUtils;
|
||||
import techreborn.Core;
|
||||
|
@ -23,6 +22,7 @@ import techreborn.blocks.generator.BlockDieselGenerator;
|
|||
import techreborn.blocks.generator.BlockDragonEggSiphoner;
|
||||
import techreborn.blocks.generator.BlockGasTurbine;
|
||||
import techreborn.blocks.generator.BlockGenerator;
|
||||
import techreborn.blocks.generator.BlockHeatGenerator;
|
||||
import techreborn.blocks.generator.BlockLightningRod;
|
||||
import techreborn.blocks.generator.BlockMagicEnergyAbsorber;
|
||||
import techreborn.blocks.generator.BlockMagicEnergyConverter;
|
||||
|
@ -76,6 +76,7 @@ import techreborn.tiles.generator.TileDieselGenerator;
|
|||
import techreborn.tiles.generator.TileDragonEggSiphoner;
|
||||
import techreborn.tiles.generator.TileGasTurbine;
|
||||
import techreborn.tiles.generator.TileGenerator;
|
||||
import techreborn.tiles.generator.TileHeatGenerator;
|
||||
import techreborn.tiles.generator.TileSemifluidGenerator;
|
||||
import techreborn.tiles.generator.TileSolarPanel;
|
||||
import techreborn.tiles.generator.TileThermalGenerator;
|
||||
|
@ -137,6 +138,7 @@ public class ModBlocks
|
|||
public static Block ComputerCube;
|
||||
public static Block FusionCoil;
|
||||
public static Block LightningRod;
|
||||
public static Block heatGenerator;
|
||||
public static Block industrialSawmill;
|
||||
public static Block chargeBench;
|
||||
public static Block playerDetector;
|
||||
|
@ -180,69 +182,51 @@ public class ModBlocks
|
|||
thermalGenerator = new BlockThermalGenerator();
|
||||
registerBlock(thermalGenerator, "techreborn.thermalGenerator");
|
||||
GameRegistry.registerTileEntity(TileThermalGenerator.class, "TileThermalGeneratorTR");
|
||||
Core.proxy.registerCustomBlockStateLocation(thermalGenerator, "machines/generators/thermal_generator");
|
||||
|
||||
quantumTank = new BlockQuantumTank();
|
||||
registerBlock(quantumTank, ItemBlockQuantumTank.class, "techreborn.quantumTank");
|
||||
GameRegistry.registerTileEntity(TileQuantumTank.class, "TileQuantumTankTR");
|
||||
Core.proxy.registerCustomBlockStateLocation(quantumTank, "machines/tier3_machines/quantum_tank");
|
||||
|
||||
quantumChest = new BlockQuantumChest();
|
||||
registerBlock(quantumChest, ItemBlockQuantumChest.class, "techreborn.quantumChest");
|
||||
GameRegistry.registerTileEntity(TileQuantumChest.class, "TileQuantumChestTR");
|
||||
Core.proxy.registerCustomBlockStateLocation(quantumChest, "machines/tier3_machines/quantum_chest");
|
||||
|
||||
|
||||
digitalChest = new BlockDigitalChest();
|
||||
registerBlock(digitalChest, ItemBlockDigitalChest.class, "techreborn.digitalChest");
|
||||
GameRegistry.registerTileEntity(TileDigitalChest.class, "TileDigitalChestTR");
|
||||
Core.proxy.registerCustomBlockStateLocation(digitalChest, "machines/tier2_machines/digital_chest");
|
||||
|
||||
|
||||
centrifuge = new BlockCentrifuge();
|
||||
registerBlock(centrifuge, "techreborn.centrifuge");
|
||||
GameRegistry.registerTileEntity(TileCentrifuge.class, "TileCentrifugeTR");
|
||||
Core.proxy.registerCustomBlockStateLocation(centrifuge, "machines/tier2_machines/centrifuge");
|
||||
Core.proxy.registerCustomBlockSateLocation(centrifuge, "machines/centrifuge");
|
||||
|
||||
RollingMachine = new BlockRollingMachine(Material.ROCK);
|
||||
registerBlock(RollingMachine, "rollingmachine");
|
||||
GameRegistry.registerTileEntity(TileRollingMachine.class, "TileRollingMachineTR");
|
||||
Core.proxy.registerCustomBlockStateLocation(RollingMachine, "machines/tier1_machines/rolling_machine");
|
||||
|
||||
|
||||
BlastFurnace = new BlockBlastFurnace(Material.ROCK);
|
||||
registerBlock(BlastFurnace, "blastFurnace");
|
||||
GameRegistry.registerTileEntity(TileBlastFurnace.class, "TileBlastFurnaceTR");
|
||||
Core.proxy.registerCustomBlockStateLocation(BlastFurnace, "machines/tier2_machines/industrial_blast_furnace");
|
||||
|
||||
|
||||
AlloySmelter = new BlockAlloySmelter(Material.ROCK);
|
||||
registerBlock(AlloySmelter, "alloySmelter");
|
||||
GameRegistry.registerTileEntity(TileAlloySmelter.class, "TileAlloySmalterTR");
|
||||
Core.proxy.registerCustomBlockStateLocation(AlloySmelter, "machines/tier1_machines/electric_alloy_smelter");
|
||||
|
||||
IndustrialGrinder = new BlockIndustrialGrinder(Material.ROCK);
|
||||
registerBlock(IndustrialGrinder, "grinder");
|
||||
GameRegistry.registerTileEntity(TileIndustrialGrinder.class, "TileIndustrialGrinderTR");
|
||||
Core.proxy.registerCustomBlockStateLocation(IndustrialGrinder, "machines/tier2_machines/industrial_grinder");
|
||||
|
||||
|
||||
ImplosionCompressor = new BlockImplosionCompressor(Material.ROCK);
|
||||
registerBlock(ImplosionCompressor, "implosioncompressor");
|
||||
GameRegistry.registerTileEntity(TileImplosionCompressor.class, "TileImplosionCompressorTR");
|
||||
Core.proxy.registerCustomBlockStateLocation(ImplosionCompressor, "machines/tier2_machines/implosion_compressor");
|
||||
|
||||
MatterFabricator = new BlockMatterFabricator(Material.ROCK);
|
||||
registerBlock(MatterFabricator, "matterfabricator");
|
||||
GameRegistry.registerTileEntity(TileMatterFabricator.class, "TileMatterFabricatorTR");
|
||||
Core.proxy.registerCustomBlockStateLocation(MatterFabricator, "machines/tier3_machines/matter_fabricator");
|
||||
|
||||
|
||||
ChunkLoader = new BlockChunkLoader(Material.ROCK);
|
||||
registerBlock(ChunkLoader, "chunkloader");
|
||||
GameRegistry.registerTileEntity(TileChunkLoader.class, "TileChunkLoaderTR");
|
||||
Core.proxy.registerCustomBlockStateLocation(ChunkLoader, "machines/tier3_machines/industrial_chunk_loader");
|
||||
|
||||
|
||||
chargeBench = new BlockChargeBench(Material.ROCK);
|
||||
registerBlock(chargeBench, "chargebench");
|
||||
|
@ -258,141 +242,88 @@ public class ModBlocks
|
|||
|
||||
ore = new BlockOre(Material.ROCK);
|
||||
registerBlock(ore, ItemBlockOre.class, "techreborn.ore");
|
||||
Core.proxy.registerCustomBlockStateLocation(ore, "storage/ores");
|
||||
for (int i = 0; i < BlockOre.ores.length; i++) {
|
||||
Core.proxy.registerSubBlockInventoryLocation(ore, i, "storage/ores", BlockOre.ores[i]);
|
||||
}
|
||||
|
||||
ore2 = new BlockOre2(Material.ROCK);
|
||||
registerBlock(ore2, ItemBlockOre2.class, "techreborn.ore2");
|
||||
Core.proxy.registerCustomBlockStateLocation(ore2, "storage/ores");
|
||||
for (int i = 0; i < BlockOre2.ores.length; i++) {
|
||||
Core.proxy.registerSubBlockInventoryLocation(ore2, i, "storage/ores", BlockOre2.ores[i]);
|
||||
}
|
||||
|
||||
storage = new BlockStorage(Material.IRON);
|
||||
registerBlock(storage, ItemBlockStorage.class, "techreborn.storage");
|
||||
Core.proxy.registerCustomBlockStateLocation(storage, "storage/storage");
|
||||
for (int i = 0; i < BlockStorage.types.length; i++) {
|
||||
Core.proxy.registerSubBlockInventoryLocation(storage, i, "storage/storage", BlockStorage.types[i]);
|
||||
}
|
||||
|
||||
storage2 = new BlockStorage2(Material.IRON);
|
||||
registerBlock(storage2, ItemBlockStorage2.class, "techreborn.storage2");
|
||||
Core.proxy.registerCustomBlockStateLocation(storage2, "storage/storage");
|
||||
for (int i = 0; i < BlockStorage2.types.length; i++) {
|
||||
Core.proxy.registerSubBlockInventoryLocation(storage2, i, "storage/storage", BlockStorage2.types[i]);
|
||||
}
|
||||
|
||||
Dragoneggenergysiphoner = new BlockDragonEggSiphoner(Material.ROCK);
|
||||
registerBlock(Dragoneggenergysiphoner, "dragoneggenergsiphon");
|
||||
GameRegistry.registerTileEntity(TileDragonEggSiphoner.class, "TileDragonEggSiphonerTR");
|
||||
Core.proxy.registerCustomBlockStateLocation(Dragoneggenergysiphoner, "machines/generators/dragon_egg_syphon");
|
||||
|
||||
|
||||
Magicenergeyconverter = new BlockMagicEnergyConverter(Material.ROCK);
|
||||
registerBlock(Magicenergeyconverter, "magicenergyconverter");
|
||||
Core.proxy.registerCustomBlockStateLocation(Magicenergeyconverter, "machines/generators/magic_energy_converter");
|
||||
|
||||
|
||||
AssemblyMachine = new BlockAssemblingMachine(Material.ROCK);
|
||||
registerBlock(AssemblyMachine, "assemblymachine");
|
||||
GameRegistry.registerTileEntity(TileAssemblingMachine.class, "TileAssemblyMachineTR");
|
||||
Core.proxy.registerCustomBlockStateLocation(AssemblyMachine, "machines/tier1_machines/assembly_machine");
|
||||
|
||||
|
||||
DieselGenerator = new BlockDieselGenerator(Material.ROCK);
|
||||
registerBlock(DieselGenerator, "dieselgenerator");
|
||||
GameRegistry.registerTileEntity(TileDieselGenerator.class, "TileDieselGeneratorTR");
|
||||
Core.proxy.registerCustomBlockStateLocation(DieselGenerator, "machines/generators/diesel_generator");
|
||||
|
||||
|
||||
IndustrialElectrolyzer = new BlockIndustrialElectrolyzer(Material.ROCK);
|
||||
registerBlock(IndustrialElectrolyzer, "industrialelectrolyzer");
|
||||
GameRegistry.registerTileEntity(TileIndustrialElectrolyzer.class, "TileIndustrialElectrolyzerTR");
|
||||
Core.proxy.registerCustomBlockStateLocation(IndustrialElectrolyzer, "machines/tier1_machines/industrial_electrolyzer");
|
||||
|
||||
|
||||
MagicalAbsorber = new BlockMagicEnergyAbsorber(Material.ROCK);
|
||||
registerBlock(MagicalAbsorber, "magicrnergyabsorber");
|
||||
Core.proxy.registerCustomBlockStateLocation(MagicalAbsorber, "machines/generators/magic_energy_absorber");
|
||||
|
||||
|
||||
Semifluidgenerator = new BlockSemiFluidGenerator(Material.ROCK);
|
||||
registerBlock(Semifluidgenerator, "semifluidgenerator");
|
||||
GameRegistry.registerTileEntity(TileSemifluidGenerator.class, "TileSemifluidGeneratorTR");
|
||||
Core.proxy.registerCustomBlockStateLocation(Semifluidgenerator, "machines/generators/semi_fluid_generator");
|
||||
|
||||
|
||||
Gasturbine = new BlockGasTurbine(Material.ROCK);
|
||||
registerBlock(Gasturbine, "gasturbine");
|
||||
GameRegistry.registerTileEntity(TileGasTurbine.class, "TileGassTurbineTR");
|
||||
Core.proxy.registerCustomBlockStateLocation(Gasturbine, "machines/generators/gas_turbine");
|
||||
|
||||
|
||||
AlloyFurnace = new BlockAlloyFurnace(Material.ROCK);
|
||||
registerBlock(AlloyFurnace, "alloyfurnace");
|
||||
GameRegistry.registerTileEntity(TileAlloyFurnace.class, "TileAlloyFurnaceTR");
|
||||
Core.proxy.registerCustomBlockStateLocation(AlloyFurnace, "machines/tier0_machines/alloy_furnace");
|
||||
|
||||
|
||||
ChemicalReactor = new BlockChemicalReactor(Material.ROCK);
|
||||
registerBlock(ChemicalReactor, "chemicalreactor");
|
||||
GameRegistry.registerTileEntity(TileChemicalReactor.class, "TileChemicalReactorTR");
|
||||
Core.proxy.registerCustomBlockStateLocation(ChemicalReactor, "machines/tier1_machines/chemical_reactor");
|
||||
|
||||
|
||||
Idsu = new BlockIDSU();
|
||||
registerBlock(Idsu, "idsu");
|
||||
GameRegistry.registerTileEntity(TileIDSU.class, "TileIDSUTR");
|
||||
Core.proxy.registerCustomBlockStateLocation(Idsu, "machines/energy/ev_storage_transmitter");
|
||||
|
||||
|
||||
Aesu = new BlockAESU();
|
||||
registerBlock(Aesu, ItemBlockAesu.class, "aesu");
|
||||
GameRegistry.registerTileEntity(TileAesu.class, "TileAesuTR");
|
||||
Core.proxy.registerCustomBlockStateLocation(Aesu, "machines/energy/ev_storage_adjust");
|
||||
|
||||
|
||||
Lesu = new BlockLESU();
|
||||
registerBlock(Lesu, "lesu");
|
||||
GameRegistry.registerTileEntity(TileLesu.class, "TileLesuTR");
|
||||
Core.proxy.registerCustomBlockStateLocation(Lesu, "machines/energy/ev_storage_multi");
|
||||
|
||||
|
||||
Supercondensator = new BlockSupercondensator(Material.ROCK);
|
||||
registerBlock(Supercondensator, "supercondensator");
|
||||
|
||||
|
||||
LesuStorage = new BlockLESUStorage(Material.ROCK);
|
||||
registerBlock(LesuStorage, "lesustorage");
|
||||
GameRegistry.registerTileEntity(TileLesuStorage.class, "TileLesuStorageTR");
|
||||
Core.proxy.registerCustomBlockStateLocation(Lesu, "machines/energy/ev_storage_multi_storage");
|
||||
|
||||
|
||||
Distillationtower = new BlockDistillationTower(Material.ROCK);
|
||||
registerBlock(Distillationtower, "distillationtower");
|
||||
Core.proxy.registerCustomBlockStateLocation(Distillationtower, "machines/tier2_machines/distillation_tower");
|
||||
|
||||
|
||||
ElectricCraftingTable = new BlockElectricCraftingTable(Material.ROCK);
|
||||
registerBlock(ElectricCraftingTable, "electriccraftingtable");
|
||||
Core.proxy.registerCustomBlockStateLocation(ElectricCraftingTable, "machines/tier1_machines/electric_crafting_table");
|
||||
|
||||
|
||||
VacuumFreezer = new BlockVacuumFreezer(Material.ROCK);
|
||||
registerBlock(VacuumFreezer, "vacuumfreezer");
|
||||
GameRegistry.registerTileEntity(TileVacuumFreezer.class, "TileVacuumFreezerTR");
|
||||
Core.proxy.registerCustomBlockStateLocation(VacuumFreezer, "machines/tier2_machines/vacuum_freezer");
|
||||
|
||||
PlasmaGenerator = new BlockPlasmaGenerator(Material.ROCK);
|
||||
registerBlock(PlasmaGenerator, "plasmagenerator");
|
||||
Core.proxy.registerCustomBlockStateLocation(PlasmaGenerator, "machines/generators/plasma_generator");
|
||||
|
||||
|
||||
ComputerCube = new BlockComputerCube(Material.ROCK);
|
||||
registerBlock(ComputerCube, "computercube");
|
||||
Core.proxy.registerCustomBlockStateLocation(ComputerCube, "machines/machines/tier2_machines/computer_cube");
|
||||
|
||||
FusionControlComputer = new BlockFusionControlComputer(Material.ROCK);
|
||||
registerBlock(FusionControlComputer, "fusioncontrolcomputer");
|
||||
|
@ -403,14 +334,14 @@ public class ModBlocks
|
|||
|
||||
LightningRod = new BlockLightningRod(Material.ROCK);
|
||||
registerBlock(LightningRod, "lightningrod");
|
||||
Core.proxy.registerCustomBlockStateLocation(LightningRod, "machines/generators/lightning_rod");
|
||||
|
||||
heatGenerator = new BlockHeatGenerator(Material.ROCK);
|
||||
registerBlock(heatGenerator, "heatgenerator");
|
||||
GameRegistry.registerTileEntity(TileHeatGenerator.class, "TileHeatGeneratorTR");
|
||||
|
||||
industrialSawmill = new BlockIndustrialSawmill(Material.ROCK);
|
||||
registerBlock(industrialSawmill, "industrialSawmill");
|
||||
GameRegistry.registerTileEntity(TileIndustrialSawmill.class, "TileIndustrialSawmillTR");
|
||||
Core.proxy.registerCustomBlockStateLocation(industrialSawmill, "machines/tier2_machines/industrial_saw_mill");
|
||||
|
||||
|
||||
machineframe = new BlockMachineFrame(Material.IRON);
|
||||
registerBlock(machineframe, ItemBlockMachineFrame.class, "techreborn.machineFrame");
|
||||
|
@ -418,51 +349,36 @@ public class ModBlocks
|
|||
Grinder = new BlockGrinder(Material.IRON);
|
||||
registerBlock(Grinder, "techreborn.grinder");
|
||||
GameRegistry.registerTileEntity(TileGrinder.class, "TileGrinderTR");
|
||||
Core.proxy.registerCustomBlockStateLocation(Grinder, "machines/tier1_machines/grinder");
|
||||
|
||||
|
||||
Generator = new BlockGenerator();
|
||||
registerBlock(Generator, "techreborn.generator");
|
||||
GameRegistry.registerTileEntity(TileGenerator.class, "TileGeneratorTR");
|
||||
Core.proxy.registerCustomBlockStateLocation(Generator, "machines/generators/generator");
|
||||
|
||||
|
||||
Extractor = new BlockExtractor(Material.IRON);
|
||||
registerBlock(Extractor, "techreborn.extractor");
|
||||
GameRegistry.registerTileEntity(TileExtractor.class, "TileExtractorTR");
|
||||
Core.proxy.registerCustomBlockStateLocation(Extractor, "machines/tier1_machines/extractor");
|
||||
|
||||
|
||||
Compressor = new BlockCompressor(Material.IRON);
|
||||
registerBlock(Compressor, "techreborn.compressor");
|
||||
GameRegistry.registerTileEntity(TileCompressor.class, "TileCompressorTR");
|
||||
Core.proxy.registerCustomBlockStateLocation(Compressor, "machines/tier1_machines/compressor");
|
||||
|
||||
|
||||
ElectricFurnace = new BlockElectricFurnace(Material.IRON);
|
||||
registerBlock(ElectricFurnace, "techreborn.electricfurnace");
|
||||
GameRegistry.registerTileEntity(TileElectricFurnace.class, "TileElectricFurnaceTR");
|
||||
Core.proxy.registerCustomBlockStateLocation(ElectricFurnace, "machines/tier1_machines/electric_furnace");
|
||||
|
||||
|
||||
solarPanel = new BlockSolarPanel();
|
||||
registerBlock(solarPanel, "techreborn.solarpanel");
|
||||
GameRegistry.registerTileEntity(TileSolarPanel.class, "TileSolarPanel");
|
||||
Core.proxy.registerCustomBlockStateLocation(solarPanel, "machines/generators/solar_panel");
|
||||
|
||||
|
||||
waterMill = new BlockWaterMill();
|
||||
registerBlock(waterMill, "techreborn.watermill");
|
||||
GameRegistry.registerTileEntity(TileWaterMill.class, "TileWaterMill");
|
||||
Core.proxy.registerCustomBlockStateLocation(waterMill, "machines/generators/water_mill");
|
||||
|
||||
|
||||
windMill = new BlockWindMill();
|
||||
registerBlock(windMill, "techreborn.windmill");
|
||||
GameRegistry.registerTileEntity(TileWindMill.class, "TileWindMill");
|
||||
GameRegistry.registerTileEntity(TileMachineBase.class, "TileMachineBaseTR");
|
||||
Core.proxy.registerCustomBlockStateLocation(windMill, "machines/generators/wind_mill");
|
||||
|
||||
GameRegistry.registerTileEntity(TileMachineBase.class, "TileMachineBaseTR");
|
||||
|
||||
rubberLog = new BlockRubberLog();
|
||||
registerBlock(rubberLog, "rubberLog");
|
||||
|
@ -485,44 +401,30 @@ public class ModBlocks
|
|||
recycler = new BlockRecycler(Material.IRON);
|
||||
registerBlock(recycler, "recycler");
|
||||
GameRegistry.registerTileEntity(TileRecycler.class, "TileRecyclerTR");
|
||||
Core.proxy.registerCustomBlockStateLocation(recycler, "machines/tier1_machines/recycler");
|
||||
|
||||
|
||||
batBox = new BlockBatBox();
|
||||
registerBlock(batBox, "batBox");
|
||||
GameRegistry.registerTileEntity(TileBatBox.class, "TileBatBox");
|
||||
Core.proxy.registerCustomBlockStateLocation(batBox, "machines/energy/lv_storage");
|
||||
|
||||
|
||||
mfe = new BlockMFE();
|
||||
registerBlock(mfe, "mfe");
|
||||
GameRegistry.registerTileEntity(TileMFE.class, "TileMFE");
|
||||
Core.proxy.registerCustomBlockStateLocation(mfe, "machines/energy/mv_storage");
|
||||
|
||||
|
||||
mfsu = new BlockMFSU();
|
||||
registerBlock(mfsu, "mfsu");
|
||||
GameRegistry.registerTileEntity(TileMFSU.class, "TileMFSU");
|
||||
Core.proxy.registerCustomBlockStateLocation(mfsu, "machines/energy/hv_storage");
|
||||
|
||||
|
||||
lvt = new BlockLVTransformer();
|
||||
registerBlock(lvt, "lvt");
|
||||
GameRegistry.registerTileEntity(TileLVTransformer.class, "TileLVTransformer");
|
||||
Core.proxy.registerCustomBlockStateLocation(lvt, "machines/energy/lv_transformer");
|
||||
|
||||
|
||||
mvt = new BlockMVTransformer();
|
||||
registerBlock(mvt, "mvt");
|
||||
GameRegistry.registerTileEntity(TileMVTransformer.class, "TileMVTransformer");
|
||||
Core.proxy.registerCustomBlockStateLocation(mvt, "machines/energy/mv_transformer");
|
||||
|
||||
|
||||
hvt = new BlockHVTransformer();
|
||||
registerBlock(hvt, "hvt");
|
||||
GameRegistry.registerTileEntity(TileHVTransformer.class, "TileHVTransformer");
|
||||
Core.proxy.registerCustomBlockStateLocation(hvt, "machines/energy/hv_transformer");
|
||||
|
||||
|
||||
pump = new BlockPump();
|
||||
registerBlock(pump, "pump");
|
||||
|
@ -531,19 +433,13 @@ public class ModBlocks
|
|||
ironFurnace = new BlockIronFurnace();
|
||||
registerBlock(ironFurnace, "ironfurnace");
|
||||
GameRegistry.registerTileEntity(TileIronFurnace.class, "TileIronFurnaceTR");
|
||||
Core.proxy.registerCustomBlockStateLocation(hvt, "machines/tier0_machines/furnace");
|
||||
|
||||
|
||||
nuke = new BlockNuke();
|
||||
registerBlock(nuke, "nuke");
|
||||
Core.proxy.registerCustomBlockStateLocation(nuke, "nuke");
|
||||
|
||||
|
||||
scrapboxinator = new BlockScrapboxinator(Material.IRON);
|
||||
registerBlock(scrapboxinator, "scrapboxinator");
|
||||
GameRegistry.registerTileEntity(TileScrapboxinator.class, "TileScrapboxinatorTR");
|
||||
Core.proxy.registerCustomBlockStateLocation(scrapboxinator, "machines/tier1_machines/scrapboxinator");
|
||||
|
||||
|
||||
distributor = new BlockDistributor();
|
||||
registerBlock(distributor, "distributor");
|
||||
|
@ -580,10 +476,33 @@ public class ModBlocks
|
|||
for(String ore : BlockOre2.ores){
|
||||
OreDictionary.registerOre("ore" + StringUtils.toFirstCapital(ore), BlockOre2.getOreByName(ore));
|
||||
}
|
||||
|
||||
OreDictionary.registerOre("blockSilver", new ItemStack(storage, 1, 0));
|
||||
OreDictionary.registerOre("blockAluminum", new ItemStack(storage, 1, 1));
|
||||
OreDictionary.registerOre("blockTitanium", new ItemStack(storage, 1, 2));
|
||||
OreDictionary.registerOre("blockChrome", new ItemStack(storage, 1, 3));
|
||||
OreDictionary.registerOre("blockSteel", new ItemStack(storage, 1, 4));
|
||||
OreDictionary.registerOre("blockBrass", new ItemStack(storage, 1, 5));
|
||||
OreDictionary.registerOre("blockLead", new ItemStack(storage, 1, 6));
|
||||
OreDictionary.registerOre("blockElectrum", new ItemStack(storage, 1, 7));
|
||||
OreDictionary.registerOre("blockZinc", new ItemStack(storage, 1, 8));
|
||||
OreDictionary.registerOre("blockPlatinum", new ItemStack(storage, 1, 9));
|
||||
OreDictionary.registerOre("blockTungsten", new ItemStack(storage, 1, 10));
|
||||
OreDictionary.registerOre("blockNickel", new ItemStack(storage, 1, 11));
|
||||
OreDictionary.registerOre("blockInvar", new ItemStack(storage, 1, 12));
|
||||
OreDictionary.registerOre("blockOsmium", new ItemStack(storage, 1, 13));
|
||||
OreDictionary.registerOre("blockIridium", new ItemStack(storage, 1, 14));
|
||||
OreDictionary.registerOre("blockCopper", BlockStorage2.getStorageBlockByName("copper", 1));
|
||||
OreDictionary.registerOre("blockTin", BlockStorage2.getStorageBlockByName("tin", 1));
|
||||
|
||||
for(String name : ArrayUtils.addAll(BlockStorage.types, BlockStorage2.types)){
|
||||
OreDictionary.registerOre("block" + StringUtils.toFirstCapital(name), BlockStorage.getStorageBlockByName(name));
|
||||
}
|
||||
OreDictionary.registerOre("blockTungstensteel", new ItemStack(storage2, 1, 0));
|
||||
OreDictionary.registerOre("blockLodestone", new ItemStack(storage2, 1, 1));
|
||||
OreDictionary.registerOre("blockTellurium", new ItemStack(storage2, 1, 2));
|
||||
OreDictionary.registerOre("blockRuby", new ItemStack(storage2, 1, 5));
|
||||
OreDictionary.registerOre("blockSapphire", new ItemStack(storage2, 1, 6));
|
||||
OreDictionary.registerOre("blockPeridot", new ItemStack(storage2, 1, 7));
|
||||
OreDictionary.registerOre("blockYellowGarnet", new ItemStack(storage2, 1, 8));
|
||||
OreDictionary.registerOre("blockRedGarnet", new ItemStack(storage2, 1, 9));
|
||||
|
||||
OreDictionary.registerOre("craftingPiston", Blocks.PISTON);
|
||||
OreDictionary.registerOre("craftingPiston", Blocks.STICKY_PISTON);
|
||||
|
|
|
@ -4,6 +4,8 @@ import net.minecraft.init.Items;
|
|||
import net.minecraft.inventory.EntityEquipmentSlot;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.fluids.FluidContainerRegistry;
|
||||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import reborncore.common.powerSystem.PoweredItem;
|
||||
|
@ -17,7 +19,10 @@ import techreborn.items.*;
|
|||
import techreborn.items.armor.ItemLapotronPack;
|
||||
import techreborn.items.armor.ItemLithiumBatpack;
|
||||
import techreborn.items.armor.ItemTRArmour;
|
||||
import techreborn.items.battery.*;
|
||||
import techreborn.items.battery.ItemEnergyCrystal;
|
||||
import techreborn.items.battery.ItemLapotronCrystal;
|
||||
import techreborn.items.battery.ItemLithiumBattery;
|
||||
import techreborn.items.battery.ItemReBattery;
|
||||
import techreborn.items.tools.*;
|
||||
|
||||
public class ModItems
|
||||
|
@ -143,7 +148,7 @@ public class ModItems
|
|||
registerItem(lapotronpack, "lapotronPack");
|
||||
lithiumBattery = PoweredItem.createItem(ItemLithiumBattery.class);
|
||||
registerItem(lithiumBattery, "lithiumBattery");
|
||||
lapotronicOrb = PoweredItem.createItem(ItemLapotronOrb.class);
|
||||
lapotronicOrb = PoweredItem.createItem(ItemLapotronicOrb.class);
|
||||
registerItem(lapotronicOrb, "lapotronicOrb");
|
||||
omniTool = PoweredItem.createItem(ItemOmniTool.class);
|
||||
registerItem(omniTool, "omniTool");
|
||||
|
|
|
@ -2251,6 +2251,9 @@ public class ModRecipes
|
|||
ItemParts.getPartByName("energyFlowCircuit"), 'T', ModBlocks.Extractor, 'A',
|
||||
BlockMachineFrame.getFrameByName("highlyAdvancedMachine", 1), 'O', ModItems.lapotronicOrb);
|
||||
|
||||
CraftingHelper
|
||||
.addShapedOreRecipe(new ItemStack(ModBlocks.heatGenerator), "III", "IHI", "CGC", 'I', "plateIron", 'H',
|
||||
new ItemStack(Blocks.IRON_BARS), 'C', "circuitBasic", 'G', ModBlocks.Generator);
|
||||
|
||||
CraftingHelper
|
||||
.addShapedOreRecipe(new ItemStack(ModBlocks.Gasturbine), "IAI", "WGW", "IAI", 'I', "ingotInvar", 'A',
|
||||
|
|
|
@ -105,6 +105,6 @@ public class ItemFrequencyTransmitter extends ItemTextureBase implements ITextur
|
|||
|
||||
@Override public String getTextureName(int arg0)
|
||||
{
|
||||
return "techreborn:items/tool/frequency_transmitter";
|
||||
return "techreborn:items/tools/frequency_transmitter";
|
||||
}
|
||||
}
|
||||
|
|
65
src/main/java/techreborn/items/ItemLapotronicOrb.java
Normal file
65
src/main/java/techreborn/items/ItemLapotronicOrb.java
Normal file
|
@ -0,0 +1,65 @@
|
|||
package techreborn.items;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import reborncore.api.power.IEnergyItemInfo;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.config.ConfigTechReborn;
|
||||
|
||||
public class ItemLapotronicOrb extends ItemTextureBase implements IEnergyItemInfo
|
||||
{
|
||||
|
||||
public static final int maxCharge = ConfigTechReborn.LapotronicOrbMaxCharge;
|
||||
public static final int tier = ConfigTechReborn.LithiumBatpackTier;
|
||||
public double transferLimit = 10000;
|
||||
|
||||
public ItemLapotronicOrb()
|
||||
{
|
||||
super();
|
||||
setMaxStackSize(1);
|
||||
setMaxDamage(13);
|
||||
setUnlocalizedName("techreborn.lapotronicorb");
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getMaxPower(ItemStack stack)
|
||||
{
|
||||
return maxCharge;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canAcceptEnergy(ItemStack stack)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canProvideEnergy(ItemStack stack)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getMaxTransfer(ItemStack stack)
|
||||
{
|
||||
return transferLimit;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getStackTier(ItemStack stack)
|
||||
{
|
||||
return tier;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTextureName(int damage)
|
||||
{
|
||||
return "techreborn:items/tool/lapotronicEnergyOrb";
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxMeta()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
package techreborn.items.battery;
|
||||
|
||||
import techreborn.config.ConfigTechReborn;
|
||||
|
||||
public class ItemLapotronOrb extends ItemBattery {
|
||||
|
||||
public ItemLapotronOrb() {
|
||||
super("lapotronicorb", ConfigTechReborn.LapotronicOrbMaxCharge, 10000, 2);
|
||||
}
|
||||
}
|
|
@ -63,6 +63,8 @@ public class GuiManual extends GuiScreen
|
|||
new ItemStack(ModBlocks.thermalGenerator), "", Reference.pageNames.GENERATINGPOWER_PAGE));
|
||||
pageCollection.addPage(new CraftingInfoPage(ModBlocks.solarPanel.getLocalizedName(), pageCollection,
|
||||
new ItemStack(ModBlocks.solarPanel), "", Reference.pageNames.GENERATINGPOWER_PAGE));
|
||||
pageCollection.addPage(new CraftingInfoPage(ModBlocks.heatGenerator.getLocalizedName(), pageCollection,
|
||||
new ItemStack(ModBlocks.heatGenerator), "", Reference.pageNames.GENERATINGPOWER_PAGE));
|
||||
pageCollection.addPage(new CraftingInfoPage(ModBlocks.LightningRod.getLocalizedName(), pageCollection,
|
||||
new ItemStack(ModBlocks.LightningRod), "", Reference.pageNames.GENERATINGPOWER_PAGE));
|
||||
|
||||
|
|
|
@ -31,6 +31,9 @@ public class GeneratingPowerPage extends TitledPage
|
|||
buttonList.add(new GuiButtonItemTexture(3, getXMin() + 20, getYMin() + 60, 0, 46, 100, 20,
|
||||
new ItemStack(ModBlocks.solarPanel), ModBlocks.solarPanel.getUnlocalizedName(),
|
||||
ttl(ModBlocks.solarPanel.getLocalizedName())));
|
||||
buttonList.add(new GuiButtonItemTexture(4, getXMin() + 20, getYMin() + 80, 0, 46, 100, 20,
|
||||
new ItemStack(ModBlocks.heatGenerator), ModBlocks.heatGenerator.getUnlocalizedName(),
|
||||
ttl(ModBlocks.heatGenerator.getLocalizedName())));
|
||||
buttonList.add(new GuiButtonItemTexture(5, getXMin() + 20, getYMin() + 100, 0, 46, 100, 20,
|
||||
new ItemStack(ModBlocks.LightningRod), ModBlocks.LightningRod.getUnlocalizedName(),
|
||||
ttl(ModBlocks.LightningRod.getLocalizedName())));
|
||||
|
@ -48,6 +51,8 @@ public class GeneratingPowerPage extends TitledPage
|
|||
if (button.id == 3)
|
||||
collection.changeActivePage(ModBlocks.solarPanel.getLocalizedName());
|
||||
if (button.id == 4)
|
||||
collection.changeActivePage(ModBlocks.heatGenerator.getLocalizedName());
|
||||
if (button.id == 5)
|
||||
collection.changeActivePage(ModBlocks.LightningRod.getLocalizedName());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,8 +27,8 @@ public class TechRebornParts implements ICompatModule
|
|||
@Nullable
|
||||
public static Item cables;
|
||||
|
||||
// @Nullable
|
||||
// public static Item fluidPipe;
|
||||
@Nullable
|
||||
public static Item fluidPipe;
|
||||
|
||||
public static HashMap<EnumCableType, Class<? extends CableMultipart>> multipartHashMap = new HashMap<>();
|
||||
|
||||
|
@ -50,12 +50,12 @@ public class TechRebornParts implements ICompatModule
|
|||
cables.setRegistryName("cables");
|
||||
GameRegistry.register(cables);
|
||||
|
||||
// MultipartRegistry.registerPart(EmptyFluidPipe.class, "techreborn:fluidpipe.empty");
|
||||
// MultipartRegistry.registerPart(InsertingFluidPipe.class, "techreborn:fluidpipe.inserting");
|
||||
// MultipartRegistry.registerPart(ExtractingFluidPipe.class, "techreborn:fluidpipe.extracting");
|
||||
// fluidPipe = new ItemFluidPipe();
|
||||
// fluidPipe.setRegistryName("fluidPipe");
|
||||
// GameRegistry.register(fluidPipe);
|
||||
MultipartRegistry.registerPart(EmptyFluidPipe.class, "techreborn:fluidpipe.empty");
|
||||
MultipartRegistry.registerPart(InsertingFluidPipe.class, "techreborn:fluidpipe.inserting");
|
||||
MultipartRegistry.registerPart(ExtractingFluidPipe.class, "techreborn:fluidpipe.extracting");
|
||||
fluidPipe = new ItemFluidPipe();
|
||||
fluidPipe.setRegistryName("fluidPipe");
|
||||
GameRegistry.register(fluidPipe);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -280,7 +280,7 @@ public abstract class MultipartFluidPipe extends Multipart implements INormallyO
|
|||
@Override
|
||||
public List<ItemStack> getDrops() {
|
||||
List<ItemStack> list = new ArrayList<>();
|
||||
// list.add(new ItemStack(TechRebornParts.fluidPipe, 1, 0));
|
||||
list.add(new ItemStack(TechRebornParts.fluidPipe, 1, 0));
|
||||
return list;
|
||||
}
|
||||
|
||||
|
|
|
@ -191,10 +191,10 @@ public class TRPowerNet
|
|||
|
||||
public void setEnergy(int energy)
|
||||
{
|
||||
this.energy += energy;
|
||||
if (this.energy < 0)
|
||||
energy += energy;
|
||||
if (energy < 0)
|
||||
{
|
||||
this.energy = 0;
|
||||
energy = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -337,7 +337,7 @@ public class TRPowerNet
|
|||
|
||||
public int getTotalCollectible()
|
||||
{
|
||||
if (tile.canProvideEnergy(side.getOpposite()) && tile.getEnergy() > 0)
|
||||
if (tile.canProvideEnergy(side.getOpposite()) && tile.getEnergy() != 0)
|
||||
{
|
||||
return (int) Math.min(tile.getMaxOutput(), tile.getEnergy());
|
||||
}
|
||||
|
@ -347,7 +347,7 @@ public class TRPowerNet
|
|||
public int getTotalInsertible()
|
||||
{
|
||||
int total = 0;
|
||||
if (tile.canAcceptEnergy(side.getOpposite()) && tile.getMaxPower() - tile.getEnergy() > 0)
|
||||
if (tile.canAcceptEnergy(side.getOpposite()) && tile.getMaxPower() - tile.getEnergy() != 0)
|
||||
{
|
||||
total += tile.addEnergy(type.transferRate, true);
|
||||
}
|
||||
|
|
|
@ -163,8 +163,8 @@ public class ClientProxy extends CommonProxy
|
|||
}
|
||||
|
||||
@Override
|
||||
public void registerCustomBlockStateLocation(Block block, String resourceLocation, boolean item) {
|
||||
super.registerCustomBlockStateLocation(block, resourceLocation, item);
|
||||
public void registerCustomBlockSateLocation(Block block, String resourceLocation) {
|
||||
super.registerCustomBlockSateLocation(block, resourceLocation);
|
||||
ModelLoader.setCustomStateMapper(block, new DefaultStateMapper()
|
||||
{
|
||||
@Override
|
||||
|
@ -175,35 +175,7 @@ public class ClientProxy extends CommonProxy
|
|||
return new ModelResourceLocation(resourceDomain + ':' + resourceLocation, propertyString);
|
||||
}
|
||||
});
|
||||
if(item){
|
||||
String resourceDomain = Block.REGISTRY.getNameForObject(block).getResourceDomain();
|
||||
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(block), 0, new ModelResourceLocation(resourceDomain + ':' + resourceLocation, "inventory"));
|
||||
}
|
||||
String resourceDomain = Block.REGISTRY.getNameForObject(block).getResourceDomain();
|
||||
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(block), 0, new ModelResourceLocation(resourceDomain + ':' + resourceLocation, "inventory"));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void registerSubItemInventoryLocation(Item item, int meta, String location, String name) {
|
||||
super.registerSubItemInventoryLocation(item, meta, location, name);
|
||||
Block block = Block.getBlockFromItem(item);
|
||||
if(block != null){
|
||||
IBlockState state = block.getStateFromMeta(meta);
|
||||
String resourceDomain = Block.REGISTRY.getNameForObject(state.getBlock()).getResourceDomain();
|
||||
StateMapperBase base = new StateMapperBase() {
|
||||
@Override
|
||||
protected ModelResourceLocation getModelResourceLocation(IBlockState state) {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
String propertyString = base.getPropertyString(state.getProperties());
|
||||
ModelResourceLocation resourceLocation = new ModelResourceLocation(resourceDomain + ':' + location, propertyString);
|
||||
ModelLoader.setCustomModelResourceLocation(item, meta, resourceLocation);
|
||||
} else {
|
||||
ResourceLocation loc = item.getRegistryName();
|
||||
String resourceDomain = Item.REGISTRY.getNameForObject(item).getResourceDomain();
|
||||
ModelLoader.setCustomModelResourceLocation(item, meta, new ModelResourceLocation(resourceDomain + ':' + loc, "type=" + name));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package techreborn.proxies;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
|
||||
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
|
||||
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
|
||||
|
@ -39,20 +38,8 @@ public class CommonProxy implements ICompatModule
|
|||
|
||||
}
|
||||
|
||||
public void registerCustomBlockStateLocation(Block block, String name) {
|
||||
registerCustomBlockStateLocation(block, name, true);
|
||||
}
|
||||
public void registerCustomBlockSateLocation(Block block, String name) {
|
||||
|
||||
public void registerCustomBlockStateLocation(Block block, String name, boolean item) {
|
||||
|
||||
}
|
||||
|
||||
public void registerSubItemInventoryLocation(Item item, int meta , String location, String name){
|
||||
|
||||
}
|
||||
|
||||
public void registerSubBlockInventoryLocation(Block block, int meta , String location, String name){
|
||||
registerSubItemInventoryLocation(Item.getItemFromBlock(block), meta, location, name);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
135
src/main/java/techreborn/tiles/generator/TileHeatGenerator.java
Normal file
135
src/main/java/techreborn/tiles/generator/TileHeatGenerator.java
Normal file
|
@ -0,0 +1,135 @@
|
|||
package techreborn.tiles.generator;
|
||||
|
||||
import reborncore.common.IWrenchable;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import reborncore.api.power.EnumPowerTier;
|
||||
import reborncore.common.powerSystem.TilePowerAcceptor;
|
||||
import techreborn.config.ConfigTechReborn;
|
||||
import techreborn.init.ModBlocks;
|
||||
|
||||
public class TileHeatGenerator extends TilePowerAcceptor implements IWrenchable
|
||||
{
|
||||
|
||||
public static final int euTick = ConfigTechReborn.HeatGeneratorOutput;
|
||||
|
||||
public TileHeatGenerator()
|
||||
{
|
||||
super(1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity()
|
||||
{
|
||||
super.updateEntity();
|
||||
|
||||
if (!worldObj.isRemote)
|
||||
{
|
||||
if (worldObj.getBlockState(new BlockPos(getPos().getX() + 1, getPos().getY(), getPos().getZ()))
|
||||
.getBlock() == Blocks.LAVA)
|
||||
{
|
||||
addEnergy(euTick);
|
||||
} else if (worldObj.getBlockState(new BlockPos(getPos().getX(), getPos().getY(), getPos().getZ() + 1))
|
||||
.getBlock() == Blocks.LAVA)
|
||||
{
|
||||
addEnergy(euTick);
|
||||
} else if (worldObj.getBlockState(new BlockPos(getPos().getX(), getPos().getY(), getPos().getZ() - 1))
|
||||
.getBlock() == Blocks.LAVA)
|
||||
{
|
||||
addEnergy(euTick);
|
||||
} else if (worldObj.getBlockState(new BlockPos(getPos().getX() - 1, getPos().getY(), getPos().getZ()))
|
||||
.getBlock() == Blocks.LAVA)
|
||||
{
|
||||
addEnergy(euTick);
|
||||
} else if (worldObj.getBlockState(new BlockPos(getPos().getX(), getPos().getY() - 1, getPos().getZ()))
|
||||
.getBlock() == Blocks.LAVA)
|
||||
{
|
||||
addEnergy(euTick);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean wrenchCanSetFacing(EntityPlayer entityPlayer, EnumFacing side)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumFacing getFacing()
|
||||
{
|
||||
return getFacingEnum();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean wrenchCanRemove(EntityPlayer entityPlayer)
|
||||
{
|
||||
return entityPlayer.isSneaking();
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getWrenchDropRate()
|
||||
{
|
||||
return 1.0F;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getWrenchDrop(EntityPlayer entityPlayer)
|
||||
{
|
||||
return new ItemStack(ModBlocks.heatGenerator, 1);
|
||||
}
|
||||
|
||||
public boolean isComplete()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getMaxPower()
|
||||
{
|
||||
return 10000;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canAcceptEnergy(EnumFacing direction)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canProvideEnergy(EnumFacing direction)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getMaxOutput()
|
||||
{
|
||||
return 64;
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getMaxInput()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPowerTier getTier()
|
||||
{
|
||||
return EnumPowerTier.LOW;
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public void addWailaInfo(List<String> info)
|
||||
// {
|
||||
// super.addWailaInfo(info);
|
||||
// info.add("Power Generarating " + euTick +" EU/t");
|
||||
//
|
||||
// }
|
||||
|
||||
}
|
|
@ -21,7 +21,7 @@ import reborncore.common.util.Tank;
|
|||
import techreborn.config.ConfigTechReborn;
|
||||
import techreborn.init.ModBlocks;
|
||||
|
||||
public class TileThermalGenerator extends TilePowerAcceptor implements IWrenchable, IFluidHandler,IInventoryProvider
|
||||
public class TileThermalGenerator extends TilePowerAcceptor implements IWrenchable, IFluidHandler,IInventoryProvider
|
||||
{
|
||||
|
||||
public static final int euTick = ConfigTechReborn.ThermalGeneratorOutput;
|
||||
|
@ -136,13 +136,13 @@ public class TileThermalGenerator extends TilePowerAcceptor implements IWrencha
|
|||
}
|
||||
|
||||
@Override
|
||||
// TODO optimise this code
|
||||
public void updateEntity()
|
||||
{
|
||||
super.updateEntity();
|
||||
if (!worldObj.isRemote)
|
||||
{
|
||||
FluidUtils.drainContainers(this, inventory, 0, 1);
|
||||
boolean didFindLava = false;
|
||||
for (EnumFacing direction : EnumFacing.values())
|
||||
{
|
||||
if (worldObj.getBlockState(new BlockPos(getPos().getX() + direction.getFrontOffsetX(),
|
||||
|
@ -150,11 +150,22 @@ public class TileThermalGenerator extends TilePowerAcceptor implements IWrencha
|
|||
.getBlock() == Blocks.LAVA)
|
||||
{
|
||||
addEnergy(1);
|
||||
didFindLava = true;
|
||||
}
|
||||
}
|
||||
if (worldObj.getTotalWorldTime() % 40 == 0) {
|
||||
|
||||
if (worldObj.getTotalWorldTime() % 40 == 0)
|
||||
{
|
||||
BlockMachineBase bmb = (BlockMachineBase) worldObj.getBlockState(pos).getBlock();
|
||||
boolean didFindLava = false;
|
||||
for (EnumFacing direction : EnumFacing.values())
|
||||
{
|
||||
if (worldObj.getBlockState(new BlockPos(getPos().getX() + direction.getFrontOffsetX(),
|
||||
getPos().getY() + direction.getFrontOffsetY(),
|
||||
getPos().getZ() + direction.getFrontOffsetZ())).getBlock() == Blocks.LAVA)
|
||||
{
|
||||
didFindLava = true;
|
||||
}
|
||||
}
|
||||
bmb.setActive(didFindLava, worldObj, pos);
|
||||
}
|
||||
}
|
||||
|
@ -213,4 +224,4 @@ public class TileThermalGenerator extends TilePowerAcceptor implements IWrencha
|
|||
public Inventory getInventory() {
|
||||
return inventory;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,93 +0,0 @@
|
|||
{
|
||||
"forge_marker": 1,
|
||||
"defaults": {
|
||||
"textures": {},
|
||||
"transform": "forge:default-block",
|
||||
"model": "cube_all"
|
||||
},
|
||||
"variants": {
|
||||
"inventory": [{}],
|
||||
"type": {
|
||||
"galena": {
|
||||
"textures": {
|
||||
"all": "techreborn:blocks/ore/oreGalena"
|
||||
}
|
||||
},
|
||||
"iridium": {
|
||||
"textures": {
|
||||
"all": "techreborn:blocks/ore/oreIridium"
|
||||
}
|
||||
},
|
||||
"ruby": {
|
||||
"textures": {
|
||||
"all": "techreborn:blocks/ore/oreRuby"
|
||||
}
|
||||
},
|
||||
"sapphire": {
|
||||
"textures": {
|
||||
"all": "techreborn:blocks/ore/oreSapphire"
|
||||
}
|
||||
},
|
||||
"bauxite": {
|
||||
"textures": {
|
||||
"all": "techreborn:blocks/ore/oreBauxite"
|
||||
}
|
||||
},
|
||||
"pyrite": {
|
||||
"textures": {
|
||||
"all": "techreborn:blocks/ore/orePyrite"
|
||||
}
|
||||
},
|
||||
"cinnabar": {
|
||||
"textures": {
|
||||
"all": "techreborn:blocks/ore/oreCinnabar"
|
||||
}
|
||||
},
|
||||
"sphalerite": {
|
||||
"textures": {
|
||||
"all": "techreborn:blocks/ore/oreSphalerite"
|
||||
}
|
||||
},
|
||||
"tungston": {
|
||||
"textures": {
|
||||
"all": "techreborn:blocks/ore/oreTungston"
|
||||
}
|
||||
},
|
||||
"sheldonite": {
|
||||
"textures": {
|
||||
"all": "techreborn:blocks/ore/oreSheldonite"
|
||||
}
|
||||
},
|
||||
"peridot": {
|
||||
"textures": {
|
||||
"all": "techreborn:blocks/ore/orePeridot"
|
||||
}
|
||||
},
|
||||
"sodalite": {
|
||||
"textures": {
|
||||
"all": "techreborn:blocks/ore/oreSodalite"
|
||||
}
|
||||
},
|
||||
"lead": {
|
||||
"textures": {
|
||||
"all": "techreborn:blocks/ore/oreLead"
|
||||
}
|
||||
},
|
||||
"silver": {
|
||||
"textures": {
|
||||
"all": "techreborn:blocks/ore/oreSilver"
|
||||
}
|
||||
},
|
||||
"copper": {
|
||||
"textures": {
|
||||
"all": "techreborn:blocks/ore/oreCopper"
|
||||
}
|
||||
},
|
||||
"tin": {
|
||||
"textures": {
|
||||
"all": "techreborn:blocks/ore/oreTin"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,138 +0,0 @@
|
|||
{
|
||||
"forge_marker": 1,
|
||||
"defaults": {
|
||||
"textures": {},
|
||||
"transform": "forge:default-block",
|
||||
"model": "cube_all"
|
||||
},
|
||||
"variants": {
|
||||
"inventory": [{}],
|
||||
"type": {
|
||||
"silver": {
|
||||
"textures": {
|
||||
"all": "techreborn:blocks/storage/silver_block"
|
||||
}
|
||||
},
|
||||
"aluminum": {
|
||||
"textures": {
|
||||
"all": "techreborn:blocks/storage/aluminum_block"
|
||||
}
|
||||
},
|
||||
"titanium": {
|
||||
"textures": {
|
||||
"all": "techreborn:blocks/storage/titanium_block"
|
||||
}
|
||||
},
|
||||
"chrome": {
|
||||
"textures": {
|
||||
"all": "techreborn:blocks/storage/chrome_block"
|
||||
}
|
||||
},
|
||||
"steel": {
|
||||
"textures": {
|
||||
"all": "techreborn:blocks/storage/steel_block"
|
||||
}
|
||||
},
|
||||
"brass": {
|
||||
"textures": {
|
||||
"all": "techreborn:blocks/storage/brass_block"
|
||||
}
|
||||
},
|
||||
"lead": {
|
||||
"textures": {
|
||||
"all": "techreborn:blocks/storage/lead_block"
|
||||
}
|
||||
},
|
||||
"electrum": {
|
||||
"textures": {
|
||||
"all": "techreborn:blocks/storage/electrum_block"
|
||||
}
|
||||
},
|
||||
"zinc": {
|
||||
"textures": {
|
||||
"all": "techreborn:blocks/storage/zinc_block"
|
||||
}
|
||||
},
|
||||
"platinum": {
|
||||
"textures": {
|
||||
"all": "techreborn:blocks/storage/platinum_block"
|
||||
}
|
||||
},
|
||||
"tungsten": {
|
||||
"textures": {
|
||||
"all": "techreborn:blocks/storage/tungsten_block"
|
||||
}
|
||||
},
|
||||
"nickel": {
|
||||
"textures": {
|
||||
"all": "techreborn:blocks/storage/nickel_block"
|
||||
}
|
||||
},
|
||||
"invar": {
|
||||
"textures": {
|
||||
"all": "techreborn:blocks/storage/invar_block"
|
||||
}
|
||||
},
|
||||
"iridium": {
|
||||
"textures": {
|
||||
"all": "techreborn:blocks/storage/iridium_block"
|
||||
}
|
||||
},
|
||||
"tungstensteel": {
|
||||
"textures": {
|
||||
"all": "techreborn:blocks/storage/tungstensteel_block"
|
||||
}
|
||||
},
|
||||
"iridium_reinforced_tungstensteel": {
|
||||
"textures": {
|
||||
"all": "techreborn:blocks/storage/iridium_reinforced_tungstensteel_block"
|
||||
}
|
||||
},
|
||||
"iridium_reinforced_stone": {
|
||||
"textures": {
|
||||
"all": "techreborn:blocks/storage/iridium_reinforced_stone_block"
|
||||
}
|
||||
},
|
||||
"ruby": {
|
||||
"textures": {
|
||||
"all": "techreborn:blocks/storage/ruby_block"
|
||||
}
|
||||
},
|
||||
"sapphire": {
|
||||
"textures": {
|
||||
"all": "techreborn:blocks/storage/sapphire_block"
|
||||
}
|
||||
},
|
||||
"peridot": {
|
||||
"textures": {
|
||||
"all": "techreborn:blocks/storage/peridot_block"
|
||||
}
|
||||
},
|
||||
"yellowGarnet": {
|
||||
"textures": {
|
||||
"all": "techreborn:blocks/storage/yellowGarnet_block"
|
||||
}
|
||||
},
|
||||
"redGarnet": {
|
||||
"textures": {
|
||||
"all": "techreborn:blocks/storage/redGarnet_block"
|
||||
}
|
||||
},
|
||||
"copper": {
|
||||
"textures": {
|
||||
"all": "techreborn:blocks/storage/copper_block"
|
||||
}
|
||||
},
|
||||
"tin": {
|
||||
"textures": {
|
||||
"all": "techreborn:blocks/storage/tin_block"
|
||||
}
|
||||
},
|
||||
"refinedIron": {
|
||||
"textures": {
|
||||
"all": "techreborn:blocks/storage/refinedIron_block"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
{
|
||||
"parent": "techreborn:item/techrebornItem",
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/tool/lapotronOrb"
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"predicate": {
|
||||
"techreborn:empty": 1
|
||||
},
|
||||
"model": "techreborn:item/lapotronOrbEmpty"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"parent": "techreborn:item/techrebornItem",
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/tool/lapotronOrbEmpty"
|
||||
}
|
||||
}
|
Binary file not shown.
Before Width: | Height: | Size: 699 B |
Binary file not shown.
After Width: | Height: | Size: 9.7 KiB |
Binary file not shown.
Before Width: | Height: | Size: 15 KiB |
Binary file not shown.
Before Width: | Height: | Size: 215 B |
Before Width: | Height: | Size: 215 B After Width: | Height: | Size: 215 B |
Loading…
Add table
Add a link
Reference in a new issue