1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-10-28 04:17:38 +00:00

What is this?

This's -> gone
This commit is contained in:
ToadDev
2021-06-11 13:03:21 -07:00
parent 668cdcdd39
commit 9129da2e3d
199 changed files with 2556 additions and 2603 deletions

View File

@@ -38,7 +38,7 @@ public final class TransformedModel
public TransformedModel( @Nonnull BakedModel model )
{
this.model = Objects.requireNonNull( model );
this.matrix = AffineTransformation.identity();
matrix = AffineTransformation.identity();
}
public static TransformedModel of( @Nonnull ModelIdentifier location )
@@ -60,26 +60,26 @@ public final class TransformedModel
@Nonnull
public BakedModel getModel()
{
return this.model;
return model;
}
@Nonnull
public AffineTransformation getMatrix()
{
return this.matrix;
return matrix;
}
public void push( MatrixStack matrixStack )
{
matrixStack.push();
AffineTransformationAccess access = (AffineTransformationAccess) (Object) this.matrix;
AffineTransformationAccess access = (AffineTransformationAccess) (Object) matrix;
if( access.getTranslation() != null )
{
matrixStack.translate( access.getTranslation().getX(), access.getTranslation().getY(), access.getTranslation().getZ() );
}
matrixStack.multiply( this.matrix.getRotation2() );
matrixStack.multiply( matrix.getRotation2() );
if( access.getScale() != null )
{

View File

@@ -47,13 +47,13 @@ final class FileAttributes implements BasicFileAttributes
@Override
public boolean isRegularFile()
{
return !this.isDirectory;
return !isDirectory;
}
@Override
public boolean isDirectory()
{
return this.isDirectory;
return isDirectory;
}
@Override
@@ -71,7 +71,7 @@ final class FileAttributes implements BasicFileAttributes
@Override
public long size()
{
return this.size;
return size;
}
@Override

View File

@@ -31,12 +31,12 @@ public class FileOperationException extends IOException
public FileOperationException( @Nonnull String message )
{
super( Objects.requireNonNull( message, "message cannot be null" ) );
this.filename = null;
filename = null;
}
@Nullable
public String getFilename()
{
return this.filename;
return filename;
}
}

View File

@@ -59,11 +59,11 @@ public interface IMount
@Nonnull
default BasicFileAttributes getAttributes( @Nonnull String path ) throws IOException
{
if( !this.exists( path ) )
if( !exists( path ) )
{
throw new FileOperationException( path, "No such file" );
}
return new FileAttributes( this.isDirectory( path ), this.getSize( path ) );
return new FileAttributes( isDirectory( path ), getSize( path ) );
}
/**

View File

@@ -30,10 +30,10 @@ public interface IArguments
default Object[] getAll()
{
Object[] result = new Object[this.count()];
Object[] result = new Object[count()];
for( int i = 0; i < result.length; i++ )
{
result[i] = this.get( i );
result[i] = get( i );
}
return result;
}
@@ -71,7 +71,7 @@ public interface IArguments
*/
default int getInt( int index ) throws LuaException
{
return (int) this.getLong( index );
return (int) getLong( index );
}
/**
@@ -83,7 +83,7 @@ public interface IArguments
*/
default long getLong( int index ) throws LuaException
{
Object value = this.get( index );
Object value = get( index );
if( !(value instanceof Number) )
{
throw LuaValues.badArgumentOf( index, "number", value );
@@ -101,7 +101,7 @@ public interface IArguments
*/
default double getFiniteDouble( int index ) throws LuaException
{
return checkFinite( index, this.getDouble( index ) );
return checkFinite( index, getDouble( index ) );
}
/**
@@ -114,7 +114,7 @@ public interface IArguments
*/
default double getDouble( int index ) throws LuaException
{
Object value = this.get( index );
Object value = get( index );
if( !(value instanceof Number) )
{
throw LuaValues.badArgumentOf( index, "number", value );
@@ -131,7 +131,7 @@ public interface IArguments
*/
default boolean getBoolean( int index ) throws LuaException
{
Object value = this.get( index );
Object value = get( index );
if( !(value instanceof Boolean) )
{
throw LuaValues.badArgumentOf( index, "boolean", value );
@@ -149,7 +149,7 @@ public interface IArguments
@Nonnull
default ByteBuffer getBytes( int index ) throws LuaException
{
return LuaValues.encode( this.getString( index ) );
return LuaValues.encode( getString( index ) );
}
/**
@@ -162,7 +162,7 @@ public interface IArguments
@Nonnull
default String getString( int index ) throws LuaException
{
Object value = this.get( index );
Object value = get( index );
if( !(value instanceof String) )
{
throw LuaValues.badArgumentOf( index, "string", value );
@@ -182,7 +182,7 @@ public interface IArguments
@Nonnull
default <T extends Enum<T>> T getEnum( int index, Class<T> klass ) throws LuaException
{
return LuaValues.checkEnum( index, klass, this.getString( index ) );
return LuaValues.checkEnum( index, klass, getString( index ) );
}
/**
@@ -195,7 +195,7 @@ public interface IArguments
@Nonnull
default Map<?, ?> getTable( int index ) throws LuaException
{
Object value = this.get( index );
Object value = get( index );
if( !(value instanceof Map) )
{
throw LuaValues.badArgumentOf( index, "table", value );
@@ -212,7 +212,7 @@ public interface IArguments
*/
default Optional<ByteBuffer> optBytes( int index ) throws LuaException
{
return this.optString( index ).map( LuaValues::encode );
return optString( index ).map( LuaValues::encode );
}
/**
@@ -224,7 +224,7 @@ public interface IArguments
*/
default Optional<String> optString( int index ) throws LuaException
{
Object value = this.get( index );
Object value = get( index );
if( value == null )
{
return Optional.empty();
@@ -248,7 +248,7 @@ public interface IArguments
@Nonnull
default <T extends Enum<T>> Optional<T> optEnum( int index, Class<T> klass ) throws LuaException
{
Optional<String> str = this.optString( index );
Optional<String> str = optString( index );
return str.isPresent() ? Optional.of( LuaValues.checkEnum( index, klass, str.get() ) ) : Optional.empty();
}
@@ -262,7 +262,7 @@ public interface IArguments
*/
default double optDouble( int index, double def ) throws LuaException
{
return this.optDouble( index ).orElse( def );
return optDouble( index ).orElse( def );
}
/**
@@ -275,7 +275,7 @@ public interface IArguments
@Nonnull
default Optional<Double> optDouble( int index ) throws LuaException
{
Object value = this.get( index );
Object value = get( index );
if( value == null )
{
return Optional.empty();
@@ -297,7 +297,7 @@ public interface IArguments
*/
default int optInt( int index, int def ) throws LuaException
{
return this.optInt( index ).orElse( def );
return optInt( index ).orElse( def );
}
/**
@@ -310,7 +310,7 @@ public interface IArguments
@Nonnull
default Optional<Integer> optInt( int index ) throws LuaException
{
return this.optLong( index ).map( Long::intValue );
return optLong( index ).map( Long::intValue );
}
/**
@@ -322,7 +322,7 @@ public interface IArguments
*/
default Optional<Long> optLong( int index ) throws LuaException
{
Object value = this.get( index );
Object value = get( index );
if( value == null )
{
return Optional.empty();
@@ -345,7 +345,7 @@ public interface IArguments
*/
default long optLong( int index, long def ) throws LuaException
{
return this.optLong( index ).orElse( def );
return optLong( index ).orElse( def );
}
/**
@@ -358,7 +358,7 @@ public interface IArguments
*/
default double optFiniteDouble( int index, double def ) throws LuaException
{
return this.optFiniteDouble( index ).orElse( def );
return optFiniteDouble( index ).orElse( def );
}
/**
@@ -370,7 +370,7 @@ public interface IArguments
*/
default Optional<Double> optFiniteDouble( int index ) throws LuaException
{
Optional<Double> value = this.optDouble( index );
Optional<Double> value = optDouble( index );
if( value.isPresent() )
{
LuaValues.checkFiniteNum( index, value.get() );
@@ -388,7 +388,7 @@ public interface IArguments
*/
default boolean optBoolean( int index, boolean def ) throws LuaException
{
return this.optBoolean( index ).orElse( def );
return optBoolean( index ).orElse( def );
}
/**
@@ -400,7 +400,7 @@ public interface IArguments
*/
default Optional<Boolean> optBoolean( int index ) throws LuaException
{
Object value = this.get( index );
Object value = get( index );
if( value == null )
{
return Optional.empty();
@@ -422,7 +422,7 @@ public interface IArguments
*/
default String optString( int index, String def ) throws LuaException
{
return this.optString( index ).orElse( def );
return optString( index ).orElse( def );
}
/**
@@ -435,7 +435,7 @@ public interface IArguments
*/
default Map<?, ?> optTable( int index, Map<Object, Object> def ) throws LuaException
{
return this.optTable( index ).orElse( def );
return optTable( index ).orElse( def );
}
/**
@@ -447,7 +447,7 @@ public interface IArguments
*/
default Optional<Map<?, ?>> optTable( int index ) throws LuaException
{
Object value = this.get( index );
Object value = get( index );
if( value == null )
{
return Optional.empty();

View File

@@ -20,14 +20,14 @@ public class LuaException extends Exception
public LuaException( @Nullable String message )
{
super( message );
this.hasLevel = false;
this.level = 1;
hasLevel = false;
level = 1;
}
public LuaException( @Nullable String message, int level )
{
super( message );
this.hasLevel = true;
hasLevel = true;
this.level = level;
}
@@ -38,7 +38,7 @@ public class LuaException extends Exception
*/
public boolean hasLevel()
{
return this.hasLevel;
return hasLevel;
}
/**
@@ -48,6 +48,6 @@ public class LuaException extends Exception
*/
public int getLevel()
{
return this.level;
return level;
}
}

View File

@@ -31,14 +31,14 @@ public final class MethodResult
private MethodResult( Object[] arguments, ILuaCallback callback )
{
this.result = arguments;
result = arguments;
this.callback = callback;
this.adjust = 0;
adjust = 0;
}
private MethodResult( Object[] arguments, ILuaCallback callback, int adjust )
{
this.result = arguments;
result = arguments;
this.callback = callback;
this.adjust = adjust;
}
@@ -141,18 +141,18 @@ public final class MethodResult
@Nullable
public Object[] getResult()
{
return this.result;
return result;
}
@Nullable
public ILuaCallback getCallback()
{
return this.callback;
return callback;
}
public int getErrorAdjust()
{
return this.adjust;
return adjust;
}
/**
@@ -168,10 +168,10 @@ public final class MethodResult
{
throw new IllegalArgumentException( "cannot adjust by a negative amount" );
}
if( adjust == 0 || this.callback == null )
if( adjust == 0 || callback == null )
{
return this;
}
return new MethodResult( this.result, this.callback, this.adjust + adjust );
return new MethodResult( result, callback, this.adjust + adjust );
}
}

View File

@@ -47,30 +47,30 @@ public final class ObjectArguments implements IArguments
{
return this;
}
if( count >= this.args.size() )
if( count >= args.size() )
{
return EMPTY;
}
return new ObjectArguments( this.args.subList( count, this.args.size() ) );
return new ObjectArguments( args.subList( count, args.size() ) );
}
@Override
public Object[] getAll()
{
return this.args.toArray();
return args.toArray();
}
@Override
public int count()
{
return this.args.size();
return args.size();
}
@Nullable
@Override
public Object get( int index )
{
return index >= this.args.size() ? null : this.args.get( index );
return index >= args.size() ? null : args.get( index );
}
}

View File

@@ -53,7 +53,7 @@ public class Packet
*/
public int getChannel()
{
return this.channel;
return channel;
}
/**
@@ -63,7 +63,7 @@ public class Packet
*/
public int getReplyChannel()
{
return this.replyChannel;
return replyChannel;
}
/**
@@ -74,7 +74,7 @@ public class Packet
@Nullable
public Object getPayload()
{
return this.payload;
return payload;
}
/**
@@ -85,17 +85,17 @@ public class Packet
@Nonnull
public IPacketSender getSender()
{
return this.sender;
return sender;
}
@Override
public int hashCode()
{
int result;
result = this.channel;
result = 31 * result + this.replyChannel;
result = 31 * result + (this.payload != null ? this.payload.hashCode() : 0);
result = 31 * result + this.sender.hashCode();
result = channel;
result = 31 * result + replyChannel;
result = 31 * result + (payload != null ? payload.hashCode() : 0);
result = 31 * result + sender.hashCode();
return result;
}
@@ -106,25 +106,25 @@ public class Packet
{
return true;
}
if( o == null || this.getClass() != o.getClass() )
if( o == null || getClass() != o.getClass() )
{
return false;
}
Packet packet = (Packet) o;
if( this.channel != packet.channel )
if( channel != packet.channel )
{
return false;
}
if( this.replyChannel != packet.replyChannel )
if( replyChannel != packet.replyChannel )
{
return false;
}
if( !Objects.equals( this.payload, packet.payload ) )
if( !Objects.equals( payload, packet.payload ) )
{
return false;
}
return this.sender.equals( packet.sender );
return sender.equals( packet.sender );
}
}

View File

@@ -46,7 +46,7 @@ public interface IWiredNode extends IPacketNetwork
*/
default boolean connectTo( @Nonnull IWiredNode node )
{
return this.getNetwork().connect( this, node );
return getNetwork().connect( this, node );
}
/**
@@ -72,7 +72,7 @@ public interface IWiredNode extends IPacketNetwork
*/
default boolean disconnectFrom( @Nonnull IWiredNode node )
{
return this.getNetwork().disconnect( this, node );
return getNetwork().disconnect( this, node );
}
/**
@@ -86,7 +86,7 @@ public interface IWiredNode extends IPacketNetwork
*/
default boolean remove()
{
return this.getNetwork().remove( this );
return getNetwork().remove( this );
}
/**
@@ -99,6 +99,6 @@ public interface IWiredNode extends IPacketNetwork
*/
default void updatePeripherals( @Nonnull Map<String, IPeripheral> peripherals )
{
this.getNetwork().updatePeripherals( this, peripherals );
getNetwork().updatePeripherals( this, peripherals );
}
}

View File

@@ -43,7 +43,7 @@ public interface IComputerAccess
@Nullable
default String mount( @Nonnull String desiredLocation, @Nonnull IMount mount )
{
return this.mount( desiredLocation, mount, this.getAttachmentName() );
return mount( desiredLocation, mount, getAttachmentName() );
}
/**
@@ -93,7 +93,7 @@ public interface IComputerAccess
@Nullable
default String mountWritable( @Nonnull String desiredLocation, @Nonnull IWritableMount mount )
{
return this.mountWritable( desiredLocation, mount, this.getAttachmentName() );
return mountWritable( desiredLocation, mount, getAttachmentName() );
}
/**

View File

@@ -45,7 +45,7 @@ public interface IWorkMonitor
default boolean runWork( @Nonnull Runnable runnable )
{
Objects.requireNonNull( runnable, "runnable should not be null" );
if( !this.canWork() )
if( !canWork() )
{
return false;
}
@@ -57,7 +57,7 @@ public interface IWorkMonitor
}
finally
{
this.trackWork( System.nanoTime() - start, TimeUnit.NANOSECONDS );
trackWork( System.nanoTime() - start, TimeUnit.NANOSECONDS );
}
return true;

View File

@@ -33,7 +33,7 @@ public abstract class AbstractPocketUpgrade implements IPocketUpgrade
{
this.id = id;
this.adjective = adjective;
this.stack = new ItemStack( item );
stack = new ItemStack( item );
}
protected AbstractPocketUpgrade( Identifier id, String adjective, ItemStack stack )
@@ -48,20 +48,20 @@ public abstract class AbstractPocketUpgrade implements IPocketUpgrade
@Override
public final Identifier getUpgradeID()
{
return this.id;
return id;
}
@Nonnull
@Override
public final String getUnlocalisedAdjective()
{
return this.adjective;
return adjective;
}
@Nonnull
@Override
public final ItemStack getCraftingItem()
{
return this.stack;
return stack;
}
}

View File

@@ -53,27 +53,27 @@ public abstract class AbstractTurtleUpgrade implements ITurtleUpgrade
@Override
public final Identifier getUpgradeID()
{
return this.id;
return id;
}
@Nonnull
@Override
public final String getUnlocalisedAdjective()
{
return this.adjective;
return adjective;
}
@Nonnull
@Override
public final TurtleUpgradeType getType()
{
return this.type;
return type;
}
@Nonnull
@Override
public final ItemStack getCraftingItem()
{
return this.stack;
return stack;
}
}

View File

@@ -54,7 +54,7 @@ public class FakePlayer extends ServerPlayerEntity
public FakePlayer( ServerWorld world, GameProfile gameProfile )
{
super( world.getServer(), world, gameProfile, new ServerPlayerInteractionManager( world ) );
this.networkHandler = new FakeNetHandler( this );
networkHandler = new FakeNetHandler( this );
}
// region Direct networkHandler access

View File

@@ -267,7 +267,7 @@ public interface ITurtleAccess
default ItemStorage getItemHandler()
{
return ItemStorage.wrap( this.getInventory() );
return ItemStorage.wrap( getInventory() );
}
/**

View File

@@ -91,7 +91,7 @@ public final class TurtleCommandResult
*/
public boolean isSuccess()
{
return this.success;
return success;
}
/**
@@ -102,7 +102,7 @@ public final class TurtleCommandResult
@Nullable
public String getErrorMessage()
{
return this.errorMessage;
return errorMessage;
}
/**
@@ -113,6 +113,6 @@ public final class TurtleCommandResult
@Nullable
public Object[] getResults()
{
return this.results;
return results;
}
}

View File

@@ -32,7 +32,7 @@ public class TurtleActionEvent extends TurtleEvent
public TurtleAction getAction()
{
return this.action;
return action;
}
/**
@@ -47,7 +47,7 @@ public class TurtleActionEvent extends TurtleEvent
@Deprecated
public void setCanceled( boolean cancel )
{
this.setCanceled( cancel, null );
setCanceled( cancel, null );
}
/**
@@ -61,7 +61,7 @@ public class TurtleActionEvent extends TurtleEvent
*/
public void setCanceled( boolean cancel, @Nullable String failureMessage )
{
this.cancelled = true;
cancelled = true;
this.failureMessage = cancel ? failureMessage : null;
}
@@ -75,11 +75,11 @@ public class TurtleActionEvent extends TurtleEvent
@Nullable
public String getFailureMessage()
{
return this.failureMessage;
return failureMessage;
}
public boolean isCancelled()
{
return this.cancelled;
return cancelled;
}
}

View File

@@ -46,7 +46,7 @@ public class TurtleAttackEvent extends TurtlePlayerEvent
@Nonnull
public Entity getTarget()
{
return this.target;
return target;
}
/**
@@ -57,7 +57,7 @@ public class TurtleAttackEvent extends TurtlePlayerEvent
@Nonnull
public ITurtleUpgrade getUpgrade()
{
return this.upgrade;
return upgrade;
}
/**
@@ -68,6 +68,6 @@ public class TurtleAttackEvent extends TurtlePlayerEvent
@Nonnull
public TurtleSide getSide()
{
return this.side;
return side;
}
}

View File

@@ -52,7 +52,7 @@ public abstract class TurtleBlockEvent extends TurtlePlayerEvent
*/
public World getWorld()
{
return this.world;
return world;
}
/**
@@ -62,7 +62,7 @@ public abstract class TurtleBlockEvent extends TurtlePlayerEvent
*/
public BlockPos getPos()
{
return this.pos;
return pos;
}
/**
@@ -97,7 +97,7 @@ public abstract class TurtleBlockEvent extends TurtlePlayerEvent
@Nonnull
public BlockState getBlock()
{
return this.block;
return block;
}
/**
@@ -108,7 +108,7 @@ public abstract class TurtleBlockEvent extends TurtlePlayerEvent
@Nonnull
public ITurtleUpgrade getUpgrade()
{
return this.upgrade;
return upgrade;
}
/**
@@ -119,7 +119,7 @@ public abstract class TurtleBlockEvent extends TurtlePlayerEvent
@Nonnull
public TurtleSide getSide()
{
return this.side;
return side;
}
}
@@ -161,7 +161,7 @@ public abstract class TurtleBlockEvent extends TurtlePlayerEvent
@Nonnull
public ItemStack getStack()
{
return this.stack;
return stack;
}
}
@@ -196,7 +196,7 @@ public abstract class TurtleBlockEvent extends TurtlePlayerEvent
@Nonnull
public BlockState getState()
{
return this.state;
return state;
}
/**
@@ -207,7 +207,7 @@ public abstract class TurtleBlockEvent extends TurtlePlayerEvent
@Nonnull
public Map<String, Object> getData()
{
return this.data;
return data;
}
/**
@@ -218,7 +218,7 @@ public abstract class TurtleBlockEvent extends TurtlePlayerEvent
public void addData( @Nonnull Map<String, ?> newData )
{
Objects.requireNonNull( newData, "newData cannot be null" );
this.data.putAll( newData );
data.putAll( newData );
}
}
}

View File

@@ -46,7 +46,7 @@ public abstract class TurtleEvent
@Nonnull
public ITurtleAccess getTurtle()
{
return this.turtle;
return turtle;
}
}

View File

@@ -53,7 +53,7 @@ public class TurtleInspectItemEvent extends TurtleActionEvent
@Nonnull
public ItemStack getStack()
{
return this.stack;
return stack;
}
/**
@@ -64,7 +64,7 @@ public class TurtleInspectItemEvent extends TurtleActionEvent
@Nonnull
public Map<String, Object> getData()
{
return this.data;
return data;
}
/**
@@ -74,7 +74,7 @@ public class TurtleInspectItemEvent extends TurtleActionEvent
*/
public boolean onMainThread()
{
return this.mainThread;
return mainThread;
}
/**
@@ -85,6 +85,6 @@ public class TurtleInspectItemEvent extends TurtleActionEvent
public void addData( @Nonnull Map<String, ?> newData )
{
Objects.requireNonNull( newData, "newData cannot be null" );
this.data.putAll( newData );
data.putAll( newData );
}
}

View File

@@ -39,7 +39,7 @@ public abstract class TurtleInventoryEvent extends TurtleBlockEvent
@Nullable
public Inventory getItemHandler()
{
return this.handler;
return handler;
}
/**
@@ -81,7 +81,7 @@ public abstract class TurtleInventoryEvent extends TurtleBlockEvent
@Nonnull
public ItemStack getStack()
{
return this.stack;
return stack;
}
}
}

View File

@@ -39,6 +39,6 @@ public abstract class TurtlePlayerEvent extends TurtleActionEvent
@Nonnull
public FakePlayer getPlayer()
{
return this.player;
return player;
}
}

View File

@@ -41,7 +41,7 @@ public class TurtleRefuelEvent extends TurtleActionEvent
*/
public ItemStack getStack()
{
return this.stack;
return stack;
}
/**
@@ -53,7 +53,7 @@ public class TurtleRefuelEvent extends TurtleActionEvent
@Nullable
public Handler getHandler()
{
return this.handler;
return handler;
}
/**