mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-08-27 07:52:18 +00:00
fix: some tile write nbt returns
This commit is contained in:
parent
5aa8611e43
commit
c85a80617a
@ -35,7 +35,7 @@ import static dan200.computercraft.client.gui.FixedWidthFontRenderer.*;
|
||||
import static net.minecraft.client.util.GlAllocationUtils.allocateByteBuffer;
|
||||
|
||||
public class TileEntityMonitorRenderer implements BlockEntityRenderer<TileMonitor>
|
||||
{ //FIXME get rid of GL Calls. Buffered things or whatever, more research needed.
|
||||
{
|
||||
/**
|
||||
* {@link TileMonitor#RENDER_MARGIN}, but a tiny bit of additional padding to ensure that there is no space between the monitor frame and contents.
|
||||
*/
|
||||
|
@ -334,7 +334,6 @@ public abstract class TileComputerBase extends TileGeneric implements IComputerT
|
||||
@Override
|
||||
public NbtCompound writeNbt( @Nonnull NbtCompound nbt )
|
||||
{
|
||||
super.writeNbt( nbt );
|
||||
// Save ID, label and power state
|
||||
if( computerID >= 0 )
|
||||
{
|
||||
@ -345,7 +344,7 @@ public abstract class TileComputerBase extends TileGeneric implements IComputerT
|
||||
nbt.putString( NBT_LABEL, label );
|
||||
}
|
||||
nbt.putBoolean( NBT_ON, on );
|
||||
return nbt;
|
||||
return super.writeNbt( nbt );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -124,7 +124,6 @@ public final class TileDiskDrive extends TileGeneric implements DefaultInventory
|
||||
@Override
|
||||
public NbtCompound writeNbt( @Nonnull NbtCompound nbt )
|
||||
{
|
||||
super.writeNbt( nbt );
|
||||
if( customName != null )
|
||||
{
|
||||
nbt.putString( NBT_NAME, Text.Serializer.toJson( customName ) );
|
||||
@ -136,7 +135,7 @@ public final class TileDiskDrive extends TileGeneric implements DefaultInventory
|
||||
diskStack.writeNbt( item );
|
||||
nbt.put( NBT_ITEM, item );
|
||||
}
|
||||
return nbt;
|
||||
return super.writeNbt( nbt );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -329,13 +329,12 @@ public class TileWiredModemFull extends TileGeneric implements IPeripheralTile
|
||||
@Override
|
||||
public NbtCompound writeNbt( NbtCompound nbt )
|
||||
{
|
||||
super.writeNbt( nbt );
|
||||
nbt.putBoolean( NBT_PERIPHERAL_ENABLED, peripheralAccessAllowed );
|
||||
for( int i = 0; i < peripherals.length; i++ )
|
||||
{
|
||||
peripherals[i].write( nbt, Integer.toString( i ) );
|
||||
}
|
||||
return nbt;
|
||||
return super.writeNbt( nbt );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -307,14 +307,13 @@ public class TileMonitor extends TileGeneric implements IPeripheralTile
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public NbtCompound writeNbt( NbtCompound tag )
|
||||
public NbtCompound writeNbt( NbtCompound nbt )
|
||||
{
|
||||
super.writeNbt( tag );
|
||||
tag.putInt( NBT_X, xIndex );
|
||||
tag.putInt( NBT_Y, yIndex );
|
||||
tag.putInt( NBT_WIDTH, width );
|
||||
tag.putInt( NBT_HEIGHT, height );
|
||||
return tag;
|
||||
nbt.putInt( NBT_X, xIndex );
|
||||
nbt.putInt( NBT_Y, yIndex );
|
||||
nbt.putInt( NBT_WIDTH, width );
|
||||
nbt.putInt( NBT_HEIGHT, height );
|
||||
return super.writeNbt( nbt );
|
||||
}
|
||||
|
||||
// @Override //TODO: make BlockEntityRenderer work with this, i guess.
|
||||
|
Loading…
x
Reference in New Issue
Block a user