Squashed commit of the following:
commit 00d9c08c78680aba0310febfce5f42ccdb873eb6 Author: modmuss50 <modmuss50@gmail.com> Date: Fri Jan 22 13:38:27 2016 +0000 Rename to fix spelling issue commit cf780e5f6dc548b64da8e4e2f24f38377b692c5c Author: modmuss50 <modmuss50@gmail.com> Date: Fri Jan 22 13:27:15 2016 +0000 Update to new JSON-Destoryer version commit ef3c8636242a54787d53cef9dda373818030d991 Author: modmuss50 <modmuss50@gmail.com> Date: Wed Jan 20 17:27:41 2016 +0000 Update to new json destroyer
This commit is contained in:
parent
43768b9310
commit
7e7ad74203
21 changed files with 67 additions and 123 deletions
|
@ -16,7 +16,7 @@ public class BlockFusionCoil extends BlockMachineBase {
|
|||
private final String prefix = "techreborn:blocks/machine/";
|
||||
|
||||
@Override
|
||||
public String getTextureName(IBlockState blockState, EnumFacing facing) {
|
||||
public String getTextureNameFromState(IBlockState blockState, EnumFacing facing) {
|
||||
return prefix + "fusion_coil";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ public class BlockHighlyAdvancedMachine extends BlockMachineBase {
|
|||
|
||||
|
||||
@Override
|
||||
public String getTextureName(IBlockState blockState, EnumFacing facing) {
|
||||
public String getTextureNameFromState(IBlockState blockState, EnumFacing facing) {
|
||||
return prefix + "highlyadvancedmachine";
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package techreborn.blocks;
|
||||
|
||||
import me.modmuss50.jsonDestroyer.api.ITexturedBlock;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockDynamicLiquid;
|
||||
import net.minecraft.block.BlockStaticLiquid;
|
||||
|
@ -20,23 +21,17 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fluids.*;
|
||||
import reborncore.api.IBlockTextureProvider;
|
||||
import reborncore.common.BaseBlock;
|
||||
import reborncore.common.BaseTileBlock;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.init.ModBlocks;
|
||||
import techreborn.tiles.TileMachineBase;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import java.util.*;
|
||||
|
||||
public abstract class BlockMachineBase extends BaseTileBlock implements IBlockTextureProvider {
|
||||
public abstract class BlockMachineBase extends BaseTileBlock implements ITexturedBlock {
|
||||
|
||||
public static PropertyDirection FACING = PropertyDirection.create("facing", EnumFacing.Plane.HORIZONTAL);
|
||||
public static PropertyBool ACTIVE = PropertyBool.create("active");
|
||||
|
@ -328,7 +323,7 @@ public abstract class BlockMachineBase extends BaseTileBlock implements IBlockTe
|
|||
}
|
||||
|
||||
@Override
|
||||
public String getTextureName(IBlockState blockState, EnumFacing facing) {
|
||||
public String getTextureNameFromState(IBlockState blockState, EnumFacing facing) {
|
||||
if(this instanceof IRotationTexture){
|
||||
IRotationTexture rotationTexture = (IRotationTexture) this;
|
||||
if(getFacing(blockState) == facing){
|
||||
|
@ -395,7 +390,7 @@ public abstract class BlockMachineBase extends BaseTileBlock implements IBlockTe
|
|||
}
|
||||
|
||||
@Override
|
||||
public int amountOfVariants() {
|
||||
public int amountOfSates() {
|
||||
return 8; //0-3 off nsew, 4-8 on nsew
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package techreborn.blocks;
|
||||
|
||||
import me.modmuss50.jsonDestroyer.api.ITexturedBlock;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.properties.PropertyInteger;
|
||||
|
@ -15,7 +16,6 @@ import net.minecraft.world.IBlockAccess;
|
|||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import reborncore.api.IBlockTextureProvider;
|
||||
import reborncore.common.multiblock.BlockMultiblockBase;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.tiles.TileMachineCasing;
|
||||
|
@ -23,7 +23,7 @@ import techreborn.tiles.TileMachineCasing;
|
|||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
public class BlockMachineCasing extends BlockMultiblockBase implements IBlockTextureProvider{
|
||||
public class BlockMachineCasing extends BlockMultiblockBase implements ITexturedBlock {
|
||||
|
||||
public static final String[] types = new String[]
|
||||
{"standard", "reinforced", "advanced"};
|
||||
|
@ -100,12 +100,12 @@ public class BlockMachineCasing extends BlockMultiblockBase implements IBlockTex
|
|||
}
|
||||
|
||||
@Override
|
||||
public String getTextureName(IBlockState blockState, EnumFacing facing) {
|
||||
public String getTextureNameFromState(IBlockState blockState, EnumFacing facing) {
|
||||
return "techreborn:blocks/machine/casing" + types[getMetaFromState(blockState)] + "_full";
|
||||
}
|
||||
|
||||
@Override
|
||||
public int amountOfVariants() {
|
||||
public int amountOfSates() {
|
||||
return types.length;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package techreborn.blocks;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import me.modmuss50.jsonDestroyer.api.ITexturedBlock;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.properties.PropertyInteger;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
|
@ -11,7 +11,6 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import reborncore.api.IBlockTextureProvider;
|
||||
import reborncore.common.BaseBlock;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.init.ModBlocks;
|
||||
|
@ -19,7 +18,7 @@ import techreborn.init.ModBlocks;
|
|||
import java.security.InvalidParameterException;
|
||||
import java.util.List;
|
||||
|
||||
public class BlockMachineFrame extends BaseBlock implements IBlockTextureProvider {
|
||||
public class BlockMachineFrame extends BaseBlock implements ITexturedBlock {
|
||||
public PropertyInteger METADATA;
|
||||
|
||||
public static ItemStack getFrameByName(String name, int count) {
|
||||
|
@ -58,12 +57,12 @@ public class BlockMachineFrame extends BaseBlock implements IBlockTextureProvide
|
|||
}
|
||||
|
||||
@Override
|
||||
public String getTextureName(IBlockState blockState, EnumFacing facing) {
|
||||
public String getTextureNameFromState(IBlockState blockState, EnumFacing facing) {
|
||||
return "techreborn:blocks/machine/" + types[getMetaFromState(blockState)] + "_machine_block";
|
||||
}
|
||||
|
||||
@Override
|
||||
public int amountOfVariants() {
|
||||
public int amountOfSates() {
|
||||
return types.length;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package techreborn.blocks;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import me.modmuss50.jsonDestroyer.api.ITexturedBlock;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.properties.PropertyInteger;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
|
@ -17,7 +17,6 @@ import net.minecraft.world.IBlockAccess;
|
|||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import reborncore.api.IBlockTextureProvider;
|
||||
import reborncore.common.BaseBlock;
|
||||
import reborncore.common.util.OreDrop;
|
||||
import reborncore.common.util.OreDropSet;
|
||||
|
@ -32,7 +31,7 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
public class BlockOre extends BaseBlock implements IBlockTextureProvider {
|
||||
public class BlockOre extends BaseBlock implements ITexturedBlock {
|
||||
|
||||
public static ItemStack getOreByName(String name, int count) {
|
||||
for (int i = 0; i < types.length; i++) {
|
||||
|
@ -163,12 +162,12 @@ public class BlockOre extends BaseBlock implements IBlockTextureProvider {
|
|||
}
|
||||
|
||||
@Override
|
||||
public String getTextureName(IBlockState blockState, EnumFacing facing) {
|
||||
public String getTextureNameFromState(IBlockState blockState, EnumFacing facing) {
|
||||
return "techreborn:blocks/ore/ore" + types[getMetaFromState(blockState)];
|
||||
}
|
||||
|
||||
@Override
|
||||
public int amountOfVariants() {
|
||||
public int amountOfSates() {
|
||||
return types.length;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package techreborn.blocks;
|
||||
|
||||
|
||||
import me.modmuss50.jsonDestroyer.api.ITexturedBlock;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.properties.PropertyInteger;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
|
@ -19,7 +20,6 @@ import net.minecraft.world.IBlockAccess;
|
|||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import reborncore.api.IBlockTextureProvider;
|
||||
import reborncore.common.BaseTileBlock;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.tiles.TilePlayerDectector;
|
||||
|
@ -27,7 +27,7 @@ import techreborn.tiles.TilePlayerDectector;
|
|||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
public class BlockPlayerDetector extends BaseTileBlock implements IBlockTextureProvider {
|
||||
public class BlockPlayerDetector extends BaseTileBlock implements ITexturedBlock {
|
||||
|
||||
public PropertyInteger METADATA;
|
||||
|
||||
|
@ -123,12 +123,12 @@ public class BlockPlayerDetector extends BaseTileBlock implements IBlockTextureP
|
|||
}
|
||||
|
||||
@Override
|
||||
public String getTextureName(IBlockState blockState, EnumFacing facing) {
|
||||
public String getTextureNameFromState(IBlockState blockState, EnumFacing facing) {
|
||||
return "techreborn:blocks/machine/player_detector_" + types[getMetaFromState(blockState)];
|
||||
}
|
||||
|
||||
@Override
|
||||
public int amountOfVariants() {
|
||||
public int amountOfSates() {
|
||||
return types.length;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package techreborn.blocks;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import me.modmuss50.jsonDestroyer.api.ITexturedBlock;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.properties.PropertyInteger;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
|
@ -11,7 +11,6 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import reborncore.api.IBlockTextureProvider;
|
||||
import reborncore.common.BaseBlock;
|
||||
import techreborn.client.TechRebornCreativeTabMisc;
|
||||
import techreborn.init.ModBlocks;
|
||||
|
@ -19,7 +18,7 @@ import techreborn.init.ModBlocks;
|
|||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
public class BlockStorage extends BaseBlock implements IBlockTextureProvider {
|
||||
public class BlockStorage extends BaseBlock implements ITexturedBlock {
|
||||
|
||||
public static ItemStack getStorageBlockByName(String name, int count) {
|
||||
for (int i = 0; i < types.length; i++) {
|
||||
|
@ -68,12 +67,12 @@ public class BlockStorage extends BaseBlock implements IBlockTextureProvider {
|
|||
return getMetaFromState(state);
|
||||
}
|
||||
@Override
|
||||
public String getTextureName(IBlockState blockState, EnumFacing facing) {
|
||||
public String getTextureNameFromState(IBlockState blockState, EnumFacing facing) {
|
||||
return "techreborn:blocks/storage/" + types[getMetaFromState(blockState)] + "_block";
|
||||
}
|
||||
|
||||
@Override
|
||||
public int amountOfVariants() {
|
||||
public int amountOfSates() {
|
||||
return types.length;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package techreborn.blocks;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import me.modmuss50.jsonDestroyer.api.ITexturedBlock;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.properties.PropertyInteger;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
|
@ -11,7 +11,6 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import reborncore.api.IBlockTextureProvider;
|
||||
import reborncore.common.BaseBlock;
|
||||
import techreborn.client.TechRebornCreativeTabMisc;
|
||||
import techreborn.init.ModBlocks;
|
||||
|
@ -20,7 +19,7 @@ import java.security.InvalidParameterException;
|
|||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
public class BlockStorage2 extends BaseBlock implements IBlockTextureProvider {
|
||||
public class BlockStorage2 extends BaseBlock implements ITexturedBlock {
|
||||
|
||||
public static ItemStack getStorageBlockByName(String name, int count) {
|
||||
for (int i = 0; i < types.length; i++) {
|
||||
|
@ -66,12 +65,12 @@ public class BlockStorage2 extends BaseBlock implements IBlockTextureProvider {
|
|||
}
|
||||
|
||||
@Override
|
||||
public String getTextureName(IBlockState blockState, EnumFacing facing) {
|
||||
public String getTextureNameFromState(IBlockState blockState, EnumFacing facing) {
|
||||
return "techreborn:blocks/storage/" + types[getMetaFromState(blockState)] + "_block";
|
||||
}
|
||||
|
||||
@Override
|
||||
public int amountOfVariants() {
|
||||
public int amountOfSates() {
|
||||
return types.length;
|
||||
}
|
||||
|
||||
|
|
|
@ -6,14 +6,13 @@ import net.minecraft.world.IBlockAccess;
|
|||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fluids.BlockFluidClassic;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import reborncore.api.TextureRegistry;
|
||||
import techreborn.client.TechRebornCreativeTabMisc;
|
||||
import reborncore.RebornCore;
|
||||
|
||||
public class BlockFluidBase extends BlockFluidClassic {
|
||||
|
||||
public BlockFluidBase(Fluid fluid, Material material) {
|
||||
super(fluid, material);
|
||||
TextureRegistry.registerFluid(this);
|
||||
RebornCore.jsonDestroyer.registerObject(this);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package techreborn.blocks.fluid;
|
||||
|
||||
import me.modmuss50.jsonDestroyer.api.ITexturedFluid;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import reborncore.api.IFluidTextureProvider;
|
||||
|
||||
public class BlockFluidTechReborn extends BlockFluidBase implements IFluidTextureProvider {
|
||||
public class BlockFluidTechReborn extends BlockFluidBase implements ITexturedFluid {
|
||||
|
||||
String name;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue