mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-10-30 05:12:58 +00:00
style: some spaces and imports
This commit is contained in:
@@ -18,7 +18,6 @@ import net.minecraft.util.ActionResult;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.hit.BlockHitResult;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.BlockView;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
@@ -35,7 +34,8 @@ public abstract class BlockGeneric extends BlockWithEntity
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public BlockEntityType<? extends TileGeneric> getType() {
|
||||
public BlockEntityType<? extends TileGeneric> getType()
|
||||
{
|
||||
return type;
|
||||
}
|
||||
|
||||
@@ -98,10 +98,11 @@ public abstract class BlockGeneric extends BlockWithEntity
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public BlockEntity createBlockEntity(BlockPos pos, BlockState state)
|
||||
public BlockEntity createBlockEntity( BlockPos pos, BlockState state )
|
||||
{
|
||||
if (this.type != null) {
|
||||
return type.instantiate(pos, state);
|
||||
if ( this.type != null )
|
||||
{
|
||||
return type.instantiate( pos, state );
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ public class ClientTerminal implements ITerminal
|
||||
colour = nbt.getBoolean( "colour" );
|
||||
if( nbt.contains( "terminal" ) )
|
||||
{
|
||||
NbtCompound terminal = nbt.getCompound( "terminal" );
|
||||
NbtCompound terminal = nbt.getCompound( "terminal" );
|
||||
resizeTerminal( terminal.getInt( "term_width" ), terminal.getInt( "term_height" ) );
|
||||
this.terminal.readFromNBT( terminal );
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ public interface IColouredItem
|
||||
|
||||
static int getColourBasic( ItemStack stack )
|
||||
{
|
||||
NbtCompound tag = stack.getNbt();
|
||||
NbtCompound tag = stack.getNbt();
|
||||
return tag != null && tag.contains( NBT_COLOUR ) ? tag.getInt( NBT_COLOUR ) : -1;
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ public interface IColouredItem
|
||||
{
|
||||
if( colour == -1 )
|
||||
{
|
||||
NbtCompound tag = stack.getNbt();
|
||||
NbtCompound tag = stack.getNbt();
|
||||
if( tag != null )
|
||||
{
|
||||
tag.remove( NBT_COLOUR );
|
||||
|
||||
@@ -90,7 +90,7 @@ public class ServerTerminal implements ITerminal
|
||||
nbt.putBoolean( "colour", colour );
|
||||
if( terminal != null )
|
||||
{
|
||||
NbtCompound terminal = new NbtCompound();
|
||||
NbtCompound terminal = new NbtCompound();
|
||||
terminal.putInt( "term_width", this.terminal.getWidth() );
|
||||
terminal.putInt( "term_height", this.terminal.getHeight() );
|
||||
this.terminal.writeToNBT( terminal );
|
||||
|
||||
Reference in New Issue
Block a user