New ore textures
|
@ -48,9 +48,9 @@ import prospector.shootingstar.model.ModelCompound;
|
|||
import reborncore.api.ToolManager;
|
||||
import reborncore.common.BaseTileBlock;
|
||||
import reborncore.common.items.WrenchHelper;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.lib.ModInfo;
|
||||
import techreborn.tiles.TileAlarm;
|
||||
import techreborn.utils.TechRebornCreativeTab;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.List;
|
||||
|
@ -58,6 +58,16 @@ import java.util.List;
|
|||
public class BlockAlarm extends BaseTileBlock {
|
||||
public static PropertyDirection FACING;
|
||||
public static PropertyBool ACTIVE;
|
||||
private AxisAlignedBB[] bbs;
|
||||
|
||||
public BlockAlarm() {
|
||||
super(Material.ROCK);
|
||||
setUnlocalizedName("techreborn.alarm");
|
||||
this.setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH).withProperty(ACTIVE, false));
|
||||
this.bbs = GenBoundingBoxes(0.19, 0.81);
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/lighting"));
|
||||
}
|
||||
|
||||
private static AxisAlignedBB[] GenBoundingBoxes(double depth, double width) {
|
||||
AxisAlignedBB[] dimm = {
|
||||
|
@ -71,15 +81,22 @@ public class BlockAlarm extends BaseTileBlock {
|
|||
return dimm;
|
||||
}
|
||||
|
||||
private AxisAlignedBB[] bbs;
|
||||
public static boolean isActive(IBlockState state) {
|
||||
return state.getValue(ACTIVE);
|
||||
}
|
||||
|
||||
public BlockAlarm() {
|
||||
super(Material.ROCK);
|
||||
setUnlocalizedName("techreborn.alarm");
|
||||
this.setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH).withProperty(ACTIVE, false));
|
||||
this.bbs = GenBoundingBoxes(0.19, 0.81);
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/lighting"));
|
||||
public static EnumFacing getFacing(IBlockState state) {
|
||||
return (EnumFacing) state.getValue(FACING);
|
||||
}
|
||||
|
||||
public static void setFacing(EnumFacing facing, World world, BlockPos pos) {
|
||||
world.setBlockState(pos, world.getBlockState(pos).withProperty(FACING, facing));
|
||||
}
|
||||
|
||||
public static void setActive(boolean active, World world, BlockPos pos) {
|
||||
EnumFacing facing = world.getBlockState(pos).getValue(FACING);
|
||||
IBlockState state = world.getBlockState(pos).withProperty(ACTIVE, active).withProperty(FACING, facing);
|
||||
world.setBlockState(pos, state, 3);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -91,7 +108,7 @@ public class BlockAlarm extends BaseTileBlock {
|
|||
|
||||
@Override
|
||||
public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn,
|
||||
EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ) {
|
||||
EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ) {
|
||||
ItemStack stack = playerIn.getHeldItem(EnumHand.MAIN_HAND);
|
||||
TileEntity tileEntity = worldIn.getTileEntity(pos);
|
||||
|
||||
|
@ -129,24 +146,6 @@ public class BlockAlarm extends BaseTileBlock {
|
|||
return this.getDefaultState().withProperty(FACING, facing).withProperty(ACTIVE, active);
|
||||
}
|
||||
|
||||
public static boolean isActive(IBlockState state) {
|
||||
return state.getValue(ACTIVE);
|
||||
}
|
||||
|
||||
public static EnumFacing getFacing(IBlockState state) {
|
||||
return (EnumFacing) state.getValue(FACING);
|
||||
}
|
||||
|
||||
public static void setFacing(EnumFacing facing, World world, BlockPos pos) {
|
||||
world.setBlockState(pos, world.getBlockState(pos).withProperty(FACING, facing));
|
||||
}
|
||||
|
||||
public static void setActive(boolean active, World world, BlockPos pos) {
|
||||
EnumFacing facing = world.getBlockState(pos).getValue(FACING);
|
||||
IBlockState state = world.getBlockState(pos).withProperty(ACTIVE, active).withProperty(FACING, facing);
|
||||
world.setBlockState(pos, state, 3);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World worldIn, int meta) {
|
||||
|
@ -183,7 +182,7 @@ public class BlockAlarm extends BaseTileBlock {
|
|||
public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos) {
|
||||
return this.bbs[getFacing(state).getIndex()];
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void addInformation(final ItemStack stack, final World world, final List<String> tooltip, ITooltipFlag flag) {
|
||||
tooltip.add(TextFormatting.GRAY + I18n.format("techreborn.tooltip.alarm"));
|
||||
|
|
|
@ -24,8 +24,6 @@
|
|||
|
||||
package techreborn.blocks.generator;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -44,10 +42,12 @@ import reborncore.common.BaseTileBlock;
|
|||
import reborncore.common.RebornCoreConfig;
|
||||
import reborncore.common.blocks.BlockWrenchEventHandler;
|
||||
import reborncore.common.items.WrenchHelper;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.init.ModBlocks;
|
||||
import techreborn.lib.ModInfo;
|
||||
import techreborn.tiles.generator.TileCreativeSolarPanel;
|
||||
import techreborn.utils.TechRebornCreativeTab;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by modmuss50 on 25/02/2016.
|
||||
|
@ -61,7 +61,7 @@ public class BlockCreativeSolarPanel extends BaseTileBlock {
|
|||
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/generators"));
|
||||
BlockWrenchEventHandler.wrenableBlocks.add(this);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand,
|
||||
EnumFacing side, float hitX, float hitY, float hitZ) {
|
||||
|
@ -72,7 +72,7 @@ public class BlockCreativeSolarPanel extends BaseTileBlock {
|
|||
if (tileEntity == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if (!stack.isEmpty() && ToolManager.INSTANCE.canHandleTool(stack)) {
|
||||
if (WrenchHelper.handleWrench(stack, worldIn, pos, playerIn, side)) {
|
||||
return true;
|
||||
|
@ -81,18 +81,17 @@ public class BlockCreativeSolarPanel extends BaseTileBlock {
|
|||
|
||||
return super.onBlockActivated(worldIn, pos, state, playerIn, hand, side, hitX, hitY, hitZ);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<ItemStack> getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune) {
|
||||
NonNullList<ItemStack> items = NonNullList.create();
|
||||
|
||||
if (RebornCoreConfig.wrenchRequired){
|
||||
|
||||
if (RebornCoreConfig.wrenchRequired) {
|
||||
items.add(new ItemStack(ModBlocks.MACHINE_FRAMES, 1, 1));
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
super.getDrops(items, world, pos, state, fortune);
|
||||
}
|
||||
|
||||
|
||||
return items;
|
||||
}
|
||||
|
||||
|
|
|
@ -30,9 +30,9 @@ import prospector.shootingstar.ShootingStar;
|
|||
import prospector.shootingstar.model.ModelCompound;
|
||||
import reborncore.api.tile.IMachineGuiHandler;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.lib.ModInfo;
|
||||
import techreborn.tiles.generator.TileWaterMill;
|
||||
import techreborn.utils.TechRebornCreativeTab;
|
||||
|
||||
/**
|
||||
* Created by modmuss50 on 25/02/2016.
|
||||
|
|
|
@ -26,7 +26,6 @@ package techreborn.blocks.storage;
|
|||
|
||||
import com.google.common.base.Predicate;
|
||||
import com.google.common.collect.Iterators;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.properties.PropertyDirection;
|
||||
|
@ -47,8 +46,8 @@ import reborncore.common.BaseTileBlock;
|
|||
import reborncore.common.blocks.BlockWrenchEventHandler;
|
||||
import reborncore.common.items.WrenchHelper;
|
||||
import techreborn.Core;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.lib.ModInfo;
|
||||
import techreborn.utils.TechRebornCreativeTab;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.Random;
|
||||
|
@ -135,7 +134,7 @@ public abstract class BlockEnergyStorage extends BaseTileBlock {
|
|||
}
|
||||
return fullName.toLowerCase();
|
||||
}
|
||||
|
||||
|
||||
// Block
|
||||
@Override
|
||||
public boolean rotateBlock(World world, BlockPos pos, EnumFacing side) {
|
||||
|
@ -165,21 +164,21 @@ public abstract class BlockEnergyStorage extends BaseTileBlock {
|
|||
if (tileEntity == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if (!stack.isEmpty() && ToolManager.INSTANCE.canHandleTool(stack)) {
|
||||
if (WrenchHelper.handleWrench(stack, worldIn, pos, playerIn, side)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!playerIn.isSneaking()) {
|
||||
playerIn.openGui(Core.INSTANCE, guiID, worldIn, pos.getX(), pos.getY(), pos.getZ());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
return super.onBlockActivated(worldIn, pos, state, playerIn, hand, side, hitX, hitY, hitZ);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected BlockStateContainer createBlockState() {
|
||||
FACING = PropertyDirection.create("facing", Facings.ALL);
|
||||
|
|
|
@ -24,8 +24,6 @@
|
|||
|
||||
package techreborn.blocks.storage;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
|
@ -45,13 +43,15 @@ import reborncore.api.ToolManager;
|
|||
import reborncore.common.BaseTileBlock;
|
||||
import reborncore.common.RebornCoreConfig;
|
||||
import reborncore.common.items.WrenchHelper;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.init.ModBlocks;
|
||||
import techreborn.lib.ModInfo;
|
||||
import techreborn.tiles.lesu.TileLSUStorage;
|
||||
import techreborn.utils.TechRebornCreativeTab;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Energy storage block for LESU
|
||||
* Energy storage block for LESU
|
||||
*/
|
||||
public class BlockLSUStorage extends BaseTileBlock {
|
||||
|
||||
|
@ -60,7 +60,7 @@ public class BlockLSUStorage extends BaseTileBlock {
|
|||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/energy"));
|
||||
}
|
||||
|
||||
|
||||
// BaseTileBlock
|
||||
@Override
|
||||
public void breakBlock(World world, BlockPos pos, IBlockState state) {
|
||||
|
@ -72,12 +72,12 @@ public class BlockLSUStorage extends BaseTileBlock {
|
|||
}
|
||||
super.breakBlock(world, pos, state);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(final World world, final int meta) {
|
||||
return new TileLSUStorage();
|
||||
}
|
||||
|
||||
|
||||
// Block
|
||||
@Override
|
||||
public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase player, ItemStack itemstack) {
|
||||
|
@ -100,7 +100,7 @@ public class BlockLSUStorage extends BaseTileBlock {
|
|||
if (tileEntity == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if (!stack.isEmpty() && ToolManager.INSTANCE.canHandleTool(stack)) {
|
||||
if (WrenchHelper.handleWrench(stack, worldIn, pos, playerIn, side)) {
|
||||
return true;
|
||||
|
@ -109,24 +109,22 @@ public class BlockLSUStorage extends BaseTileBlock {
|
|||
|
||||
return super.onBlockActivated(worldIn, pos, state, playerIn, hand, side, hitX, hitY, hitZ);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<ItemStack> getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune) {
|
||||
NonNullList<ItemStack> items = NonNullList.create();
|
||||
|
||||
if (RebornCoreConfig.wrenchRequired){
|
||||
|
||||
if (RebornCoreConfig.wrenchRequired) {
|
||||
items.add(new ItemStack(ModBlocks.MACHINE_FRAMES, 1, 0));
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
super.getDrops(items, world, pos, state, fortune);
|
||||
}
|
||||
|
||||
|
||||
return items;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canBeConnectedTo(IBlockAccess world, BlockPos pos, EnumFacing facing)
|
||||
{
|
||||
public boolean canBeConnectedTo(IBlockAccess world, BlockPos pos, EnumFacing facing) {
|
||||
Block block = world.getBlockState(pos).getBlock();
|
||||
return this == block;
|
||||
}
|
||||
|
|
|
@ -26,7 +26,6 @@ package techreborn.blocks.transformers;
|
|||
|
||||
import com.google.common.base.Predicate;
|
||||
import com.google.common.collect.Iterators;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.properties.PropertyDirection;
|
||||
|
@ -46,8 +45,8 @@ import reborncore.api.ToolManager;
|
|||
import reborncore.common.BaseTileBlock;
|
||||
import reborncore.common.blocks.BlockWrenchEventHandler;
|
||||
import reborncore.common.items.WrenchHelper;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.lib.ModInfo;
|
||||
import techreborn.utils.TechRebornCreativeTab;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.Random;
|
||||
|
|
Before Width: | Height: | Size: 323 B After Width: | Height: | Size: 462 B |
Before Width: | Height: | Size: 633 B After Width: | Height: | Size: 823 B |
Before Width: | Height: | Size: 320 B After Width: | Height: | Size: 715 B |
Before Width: | Height: | Size: 385 B After Width: | Height: | Size: 377 B |
Before Width: | Height: | Size: 675 B After Width: | Height: | Size: 841 B |
Before Width: | Height: | Size: 296 B After Width: | Height: | Size: 416 B |
Before Width: | Height: | Size: 296 B After Width: | Height: | Size: 360 B |
Before Width: | Height: | Size: 317 B After Width: | Height: | Size: 664 B |
Before Width: | Height: | Size: 394 B After Width: | Height: | Size: 381 B |
Before Width: | Height: | Size: 307 B After Width: | Height: | Size: 656 B |
Before Width: | Height: | Size: 390 B After Width: | Height: | Size: 452 B |
Before Width: | Height: | Size: 636 B After Width: | Height: | Size: 837 B |
Before Width: | Height: | Size: 315 B After Width: | Height: | Size: 684 B |
Before Width: | Height: | Size: 444 B After Width: | Height: | Size: 460 B |
Before Width: | Height: | Size: 199 KiB After Width: | Height: | Size: 38 KiB |
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"pack":{
|
||||
"pack_format":3,
|
||||
"description":"TechReborn Resources"
|
||||
"description":"Tech Reborn Resources"
|
||||
}
|
||||
}
|