Cleanup & reformat

This commit is contained in:
John Yorke committed 2021-11-25 23:38:31 -04:00
1 parent f479b19255
commit 38e0cefaa2
76 files changed
+2371 -2766

No files matched your search

@@ -17,34 +17,34 @@ import thaumcraft.client.fx.ParticleEngine;
import thaumcraft.client.fx.particles.FXSparkle;
import thaumcraft.common.config.Config;
public class BlockLumos extends Block implements ITileEntityProvider
{
public BlockLumos ()
{
public class BlockLumos extends Block implements ITileEntityProvider {
public BlockLumos () {
super(Config.airyMaterial);
this.setStepSound(new Block.SoundType("stone", -1, -1));
this.setBlockName("BlockLumos");
this.setTickRandomly(false);
this.setLightLevel(1.0F);
this.setBlockTextureName("thaumcraft:blank");
setStepSound(new Block.SoundType("stone", -1, -1));
setBlockName("BlockLumos");
setTickRandomly(false);
setLightLevel(1.0F);
setBlockTextureName("thaumcraft:blank");
}
@Override
public void onBlockDestroyedByPlayer (World world, int x, int y, int z, int meta)
{
public void onBlockDestroyedByPlayer (final World world, final int x, final int y, final int z, final int meta) {
super.onBlockDestroyedByPlayer(world, x, y, z, meta);
world.playSound(x, y, z, "thaumcraft:ice", 0.3F, 1.1F + world.rand.nextFloat() * 0.1F, true);
for (int i = 0; i < 9; i++)
if (world.isRemote) spawnBreakParticles(world, x, y, z);
for (int i = 0; i < 9; i++) {
if (world.isRemote) {
spawnBreakParticles(world, x, y, z);
}
}
}
@SideOnly (Side.CLIENT)
void spawnBreakParticles (World world, double x, double y, double z)
{
FXSparkle fx = new FXSparkle(world, x + world.rand.nextFloat(), y + world.rand.nextFloat(), z + world.rand.nextFloat(),
1.75F, 6, 3 + world.rand.nextInt(3));
void spawnBreakParticles (final World world, final double x, final double y, final double z) {
final FXSparkle fx = new FXSparkle(world, x + world.rand.nextFloat(), y + world.rand.nextFloat(),
z + world.rand.nextFloat(), 1.75F, 6, 3 + world.rand.nextInt(3));
fx.motionX += world.rand.nextGaussian() * 0.1D;
fx.motionY += world.rand.nextGaussian() * 0.1D;
fx.motionZ += world.rand.nextGaussian() * 0.1D;
@@ -53,75 +53,68 @@ public class BlockLumos extends Block implements ITileEntityProvider
}
@Override
public void setBlockBoundsBasedOnState (IBlockAccess world, int x, int y, int z)
{
int meta = world.getBlockMetadata(x, y, z);
if (meta == 0) setBlockBounds(0.3F, 0.3F, 0.3F, 0.7F, 0.7F, 0.7F);
else setBlockBounds(0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F);
public void setBlockBoundsBasedOnState (final IBlockAccess world, final int x, final int y, final int z) {
final int meta = world.getBlockMetadata(x, y, z);
if (meta == 0) {
setBlockBounds(0.3F, 0.3F, 0.3F, 0.7F, 0.7F, 0.7F);
}
else {
setBlockBounds(0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F);
}
}
@Override
public AxisAlignedBB getCollisionBoundingBoxFromPool (World world, int x, int y, int z)
{
public AxisAlignedBB getCollisionBoundingBoxFromPool (final World world, final int x, final int y, final int z) {
return null;
}
@Override
public int getRenderType ()
{
public int getRenderType () {
return -1;
}
@Override
public boolean isSideSolid (IBlockAccess world, int x, int y, int z, ForgeDirection side)
{
public boolean isSideSolid (final IBlockAccess world, final int x, final int y, final int z, final ForgeDirection side) {
return false;
}
@Override
public boolean isBlockNormalCube ()
{
public boolean isBlockNormalCube () {
return false;
}
@Override
public boolean isOpaqueCube ()
{
public boolean isOpaqueCube () {
return false;
}
@Override
public boolean isReplaceable (IBlockAccess world, int x, int y, int z)
{
public boolean isReplaceable (final IBlockAccess world, final int x, final int y, final int z) {
return true;
}
@Override
public boolean canBeReplacedByLeaves (IBlockAccess world, int x, int y, int z)
{
public boolean canBeReplacedByLeaves (final IBlockAccess world, final int x, final int y, final int z) {
return true;
}
public boolean renderAsNormalBlock ()
{
@Override
public boolean renderAsNormalBlock () {
return false;
}
@Override
public Item getItemDropped (int a, Random random, int b)
{
public Item getItemDropped (final int a, final Random random, final int b) {
return null;
}
@Override
public Item getItem (World world, int x, int y, int z)
{
public Item getItem (final World world, final int x, final int y, final int z) {
return null;
}
@Override
public TileEntity createNewTileEntity (World world, int m)
{
public TileEntity createNewTileEntity (final World world, final int m) {
return new TileLumos();
}
}