The great format and clean up. IMPORTANT: Read below.

All devs and contributors should use the provided formatter settings. 
If your IDE does not support the format, the rules are simple, it is the
default java formatting rules, with 200char line lengths and 1 extra
line after class definitions.
This commit is contained in:
tterrag1098 committed 2015-01-07 19:50:18 -05:00
1 parent 906c730a3c
commit 4cfcc874dc
136 files changed
+10365 -11272

No files matched your search

@@ -10,76 +10,75 @@ import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.World;
public class BlockMarbleLamp extends BlockCarvable {
BlockMarbleLamp blockUnpowered;
BlockMarbleLamp blockPowered;
boolean powered;
public BlockMarbleLamp() {
super(Material.redstoneLight);
BlockMarbleLamp blockUnpowered;
BlockMarbleLamp blockPowered;
boolean powered;
powered = false;
blockUnpowered = this;
blockPowered = new BlockMarbleLamp(this);
public BlockMarbleLamp() {
super(Material.redstoneLight);
setHardness(0.3F);
}
powered = false;
blockUnpowered = this;
blockPowered = new BlockMarbleLamp(this);
public BlockMarbleLamp(BlockMarbleLamp unpoweredVersion) {
super(Material.redstoneLight);
setHardness(0.3F);
}
carverHelper = unpoweredVersion.carverHelper;
public BlockMarbleLamp(BlockMarbleLamp unpoweredVersion) {
super(Material.redstoneLight);
powered = true;
blockUnpowered = unpoweredVersion;
blockPowered = this;
carverHelper = unpoweredVersion.carverHelper;
setLightLevel(1.0F);
setHardness(0.3F);
}
powered = true;
blockUnpowered = unpoweredVersion;
blockPowered = this;
setLightLevel(1.0F);
setHardness(0.3F);
}
public void checkPower(World world, int x, int y, int z) {
if (world.isRemote) return;
public void checkPower(World world, int x, int y, int z) {
if (world.isRemote)
return;
boolean isGettingPower = world.isBlockIndirectlyGettingPowered(x, y, z);
int meta = world.getBlockMetadata(x, y, z);
boolean isGettingPower = world.isBlockIndirectlyGettingPowered(x, y, z);
int meta = world.getBlockMetadata(x, y, z);
if (powered && !isGettingPower) {
world.setBlock(x, y, z, blockUnpowered, meta, 2);
} else if (!powered && isGettingPower) {
world.setBlock(x, y, z, blockPowered, meta, 2);
}
}
if (powered && !isGettingPower) {
world.setBlock(x, y, z, blockUnpowered, meta, 2);
} else if (!powered && isGettingPower) {
world.setBlock(x, y, z, blockPowered, meta, 2);
}
}
@Override
public void onBlockAdded(World world, int x, int y, int z) {
checkPower(world, x, y, z);
}
@Override
public void onBlockAdded(World world, int x, int y, int z) {
checkPower(world, x, y, z);
}
@Override
public void onNeighborBlockChange(World world, int x, int y, int z, Block block) {
checkPower(world, x, y, z);
}
@Override
public void onNeighborBlockChange(World world, int x, int y, int z, Block block) {
checkPower(world, x, y, z);
}
/*
@Override
public void updateTick(World world, int x, int y, int z, Random rand){
if (world.isRemote) return;
/*
* @Override public void updateTick(World world, int x, int y, int z, Random
* rand){ if (world.isRemote) return;
*
* if(powered && !world.isBlockIndirectlyGettingPowered(x, y, z)){ int
* meta=world.getBlockMetadata(x, y, z); world.setBlock(x, y, z,
* Block.redstoneLampIdle.blockID, meta, 2); } }
*/
if(powered && !world.isBlockIndirectlyGettingPowered(x, y, z)){
int meta=world.getBlockMetadata(x, y, z);
world.setBlock(x, y, z, Block.redstoneLampIdle.blockID, meta, 2);
}
}*/
@Override
public Item getItemDropped(int par1, Random par2Random, int par3) {
return Item.getItemFromBlock(blockUnpowered);
}
@Override
public Item getItemDropped(int par1, Random par2Random, int par3) {
return Item.getItemFromBlock(blockUnpowered);
}
@Override
public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z) {
return new ItemStack(blockUnpowered, 1, world.getBlockMetadata(x, y, z));
}
@Override
public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z) {
return new ItemStack(blockUnpowered, 1, world.getBlockMetadata(x, y, z));
}
}