mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-20 12:09:45 +00:00
Fixed Combiner NEI texture, fixed Cardboard Box not working
This commit is contained in:
1 parent
cfdaf37e4b
commit
c223eabb95
2 files changed
+14
-6
No files matched your search
@@ -17,12 +17,15 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockCardboardBox extends BlockContainer
|
||||
{
|
||||
private static boolean testingPlace = false;
|
||||
|
||||
public IIcon[] icons = new IIcon[6];
|
||||
|
||||
public BlockCardboardBox()
|
||||
@@ -54,6 +57,12 @@ public class BlockCardboardBox extends BlockContainer
|
||||
return meta == 0 ? icons[1] : icons[2];
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isReplaceable(IBlockAccess world, int x, int y, int z)
|
||||
{
|
||||
return testingPlace;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer entityplayer, int facing, float hitX, float hitY, float hitZ)
|
||||
@@ -67,10 +76,15 @@ public class BlockCardboardBox extends BlockContainer
|
||||
{
|
||||
BlockData data = tileEntity.storedData;
|
||||
|
||||
testingPlace = true;
|
||||
|
||||
if(!data.block.canPlaceBlockAt(world, x, y, z))
|
||||
{
|
||||
testingPlace = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
testingPlace = false;
|
||||
|
||||
if(data.block != null)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user