reformatted all src files (#141)

This commit is contained in:
YoungOnion
2022-09-17 05:08:02 -06:00
committed by GitHub
parent 3328bfcda2
commit 9011273229
1056 changed files with 88127 additions and 110597 deletions
@@ -19,124 +19,103 @@
package appeng.container.implementations;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraftforge.items.IItemHandler;
import appeng.api.config.FullnessMode;
import appeng.api.config.OperationMode;
import appeng.api.config.RedstoneMode;
import appeng.api.config.SecurityPermissions;
import appeng.api.config.Settings;
import appeng.api.config.*;
import appeng.container.guisync.GuiSync;
import appeng.container.slot.SlotOutput;
import appeng.container.slot.SlotRestrictedInput;
import appeng.tile.storage.TileIOPort;
import appeng.util.Platform;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraftforge.items.IItemHandler;
public class ContainerIOPort extends ContainerUpgradeable
{
public class ContainerIOPort extends ContainerUpgradeable {
@GuiSync( 2 )
public FullnessMode fMode = FullnessMode.EMPTY;
@GuiSync( 3 )
public OperationMode opMode = OperationMode.EMPTY;
@GuiSync(2)
public FullnessMode fMode = FullnessMode.EMPTY;
@GuiSync(3)
public OperationMode opMode = OperationMode.EMPTY;
public ContainerIOPort( final InventoryPlayer ip, final TileIOPort te )
{
super( ip, te );
}
public ContainerIOPort(final InventoryPlayer ip, final TileIOPort te) {
super(ip, te);
}
@Override
protected int getHeight()
{
return 166;
}
@Override
protected int getHeight() {
return 166;
}
@Override
protected void setupConfig()
{
int offX = 19;
int offY = 17;
@Override
protected void setupConfig() {
int offX = 19;
int offY = 17;
final IItemHandler cells = this.getUpgradeable().getInventoryByName( "cells" );
final IItemHandler cells = this.getUpgradeable().getInventoryByName("cells");
for( int y = 0; y < 3; y++ )
{
for( int x = 0; x < 2; x++ )
{
this.addSlotToContainer(
new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.STORAGE_CELLS, cells, x + y * 2, offX + x * 18, offY + y * 18, this
.getInventoryPlayer() ) );
}
}
for (int y = 0; y < 3; y++) {
for (int x = 0; x < 2; x++) {
this.addSlotToContainer(
new SlotRestrictedInput(SlotRestrictedInput.PlacableItemType.STORAGE_CELLS, cells, x + y * 2, offX + x * 18, offY + y * 18, this
.getInventoryPlayer()));
}
}
offX = 122;
offY = 17;
for( int y = 0; y < 3; y++ )
{
for( int x = 0; x < 2; x++ )
{
this.addSlotToContainer(
new SlotOutput( cells, 6 + x + y * 2, offX + x * 18, offY + y * 18, SlotRestrictedInput.PlacableItemType.STORAGE_CELLS.IIcon ) );
}
}
offX = 122;
offY = 17;
for (int y = 0; y < 3; y++) {
for (int x = 0; x < 2; x++) {
this.addSlotToContainer(
new SlotOutput(cells, 6 + x + y * 2, offX + x * 18, offY + y * 18, SlotRestrictedInput.PlacableItemType.STORAGE_CELLS.IIcon));
}
}
final IItemHandler upgrades = this.getUpgradeable().getInventoryByName( "upgrades" );
this.addSlotToContainer( ( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 0, 187, 8, this.getInventoryPlayer() ) )
.setNotDraggable() );
this.addSlotToContainer(
( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 1, 187, 8 + 18, this.getInventoryPlayer() ) )
.setNotDraggable() );
this.addSlotToContainer(
( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 2, 187, 8 + 18 * 2, this.getInventoryPlayer() ) )
.setNotDraggable() );
}
final IItemHandler upgrades = this.getUpgradeable().getInventoryByName("upgrades");
this.addSlotToContainer((new SlotRestrictedInput(SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 0, 187, 8, this.getInventoryPlayer()))
.setNotDraggable());
this.addSlotToContainer(
(new SlotRestrictedInput(SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 1, 187, 8 + 18, this.getInventoryPlayer()))
.setNotDraggable());
this.addSlotToContainer(
(new SlotRestrictedInput(SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 2, 187, 8 + 18 * 2, this.getInventoryPlayer()))
.setNotDraggable());
}
@Override
protected boolean supportCapacity()
{
return false;
}
@Override
protected boolean supportCapacity() {
return false;
}
@Override
public int availableUpgrades()
{
return 3;
}
@Override
public int availableUpgrades() {
return 3;
}
@Override
public void detectAndSendChanges()
{
this.verifyPermissions( SecurityPermissions.BUILD, false );
@Override
public void detectAndSendChanges() {
this.verifyPermissions(SecurityPermissions.BUILD, false);
if( Platform.isServer() )
{
this.setOperationMode( (OperationMode) this.getUpgradeable().getConfigManager().getSetting( Settings.OPERATION_MODE ) );
this.setFullMode( (FullnessMode) this.getUpgradeable().getConfigManager().getSetting( Settings.FULLNESS_MODE ) );
this.setRedStoneMode( (RedstoneMode) this.getUpgradeable().getConfigManager().getSetting( Settings.REDSTONE_CONTROLLED ) );
}
if (Platform.isServer()) {
this.setOperationMode((OperationMode) this.getUpgradeable().getConfigManager().getSetting(Settings.OPERATION_MODE));
this.setFullMode((FullnessMode) this.getUpgradeable().getConfigManager().getSetting(Settings.FULLNESS_MODE));
this.setRedStoneMode((RedstoneMode) this.getUpgradeable().getConfigManager().getSetting(Settings.REDSTONE_CONTROLLED));
}
this.standardDetectAndSendChanges();
}
this.standardDetectAndSendChanges();
}
public FullnessMode getFullMode()
{
return this.fMode;
}
public FullnessMode getFullMode() {
return this.fMode;
}
private void setFullMode( final FullnessMode fMode )
{
this.fMode = fMode;
}
private void setFullMode(final FullnessMode fMode) {
this.fMode = fMode;
}
public OperationMode getOperationMode()
{
return this.opMode;
}
public OperationMode getOperationMode() {
return this.opMode;
}
private void setOperationMode( final OperationMode opMode )
{
this.opMode = opMode;
}
private void setOperationMode(final OperationMode opMode) {
this.opMode = opMode;
}
}