Lots of compile fixes

This commit is contained in:
Sebastian Hartte
2020-06-04 03:02:48 +02:00
parent 6eb2a9504a
commit 237463dd94
241 changed files with 3438 additions and 3474 deletions
@@ -29,7 +29,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.item.ItemUseContext;
import net.minecraft.util.ActionResult;
import net.minecraft.util.ActionResultType;
import net.minecraft.util.EnumActionResult;
import net.minecraft.util.ActionResultType;
import net.minecraft.util.Direction;
import net.minecraft.util.Hand;
import net.minecraft.util.math.BlockPos;
@@ -71,9 +71,9 @@ public abstract class AbstractStorageCell<T extends IAEStack<T>> extends AEBaseI
protected final MaterialType component;
protected final int totalBytes;
public AbstractStorageCell( final MaterialType whichCell, final int kilobytes )
{
this.setMaxStackSize( 1 );
public AbstractStorageCell(Properties properties, final MaterialType whichCell, final int kilobytes ) {
super(properties);
// FIXME this.setMaxStackSize( 1 ); ---- see point of registration
this.totalBytes = kilobytes * 1024;
this.component = whichCell;
}
@@ -120,7 +120,7 @@ public abstract class AbstractStorageCell<T extends IAEStack<T>> extends AEBaseI
@Override
public String getUnlocalizedGroupName( final Set<ItemStack> others, final ItemStack is )
{
return GuiText.StorageCells.getUnlocalized();
return GuiText.StorageCells.getTranslationKey();
}
@Override
@@ -37,9 +37,9 @@ public final class BasicItemStorageCell extends AbstractStorageCell<IAEItemStack
protected final int perType;
protected final double idleDrain;
public BasicItemStorageCell( final MaterialType whichCell, final int kilobytes )
public BasicItemStorageCell( Properties props, final MaterialType whichCell, final int kilobytes )
{
super( whichCell, kilobytes );
super( props, whichCell, kilobytes );
switch( whichCell )
{
case CELL1K_PART:
@@ -43,9 +43,10 @@ import appeng.items.contents.CellConfig;
public class ItemCreativeStorageCell extends AEBaseItem implements ICellWorkbenchItem
{
public ItemCreativeStorageCell()
public ItemCreativeStorageCell(Properties props)
{
this.setMaxStackSize( 1 );
super(props);
// FIXME this.setMaxStackSize( 1 );
}
@Override
@@ -39,7 +39,7 @@ import appeng.capabilities.Capabilities;
import appeng.core.AppEng;
import appeng.core.localization.GuiText;
import appeng.items.AEBaseItem;
import appeng.spatial.StorageHelper;
import net.minecraftforge.common.util.LazyOptional;
public class ItemSpatialStorageCell extends AEBaseItem implements ISpatialStorageCell
@@ -51,9 +51,10 @@ public class ItemSpatialStorageCell extends AEBaseItem implements ISpatialStorag
private final int maxRegion;
public ItemSpatialStorageCell( final int spatialScale )
public ItemSpatialStorageCell( Properties props, final int spatialScale )
{
this.setMaxStackSize( 1 );
super(props);
// FIXME this.setMaxStackSize( 1 );
this.maxRegion = spatialScale;
}
@@ -64,13 +65,13 @@ public class ItemSpatialStorageCell extends AEBaseItem implements ISpatialStorag
final int id = this.getStoredDimensionID( stack );
if( id >= 0 )
{
lines.add( GuiText.CellId.getLocal() + ": " + id );
lines.add( GuiText.CellId.textComponent().appendText( ": " + id ) );
}
final WorldCoord wc = this.getStoredSize( stack );
if( wc.x > 0 )
{
lines.add( GuiText.StoredSize.getLocal() + ": " + wc.x + " x " + wc.y + " x " + wc.z );
lines.add( GuiText.StoredSize.textComponent().appendText( ": " + wc.x + " x " + wc.y + " x " + wc.z ) );
}
}
@@ -89,17 +90,19 @@ public class ItemSpatialStorageCell extends AEBaseItem implements ISpatialStorag
@Override
public ISpatialDimension getSpatialDimension()
{
final int id = AppEng.instance().getStorageDimensionID();
World w = DimensionManager.getWorld( id );
if( w == null )
{
DimensionManager.initDimension( id );
w = DimensionManager.getWorld( id );
}
World w = null;
// FIXME final int id = AppEng.instance().getStorageDimensionID();
// FIXME World w = DimensionManager.getWorld( id );
// FIXME if( w == null )
// FIXME {
// FIXME DimensionManager.initDimension( id );
// FIXME w = DimensionManager.getWorld( id );
// FIXME }
if( w != null && w.hasCapability( Capabilities.SPATIAL_DIMENSION, null ) )
if( w != null )
{
return w.getCapability( Capabilities.SPATIAL_DIMENSION, null );
LazyOptional<ISpatialDimension> spatialCap = w.getCapability(Capabilities.SPATIAL_DIMENSION, null);
return spatialCap.orElse(null);
}
return null;
}
@@ -157,10 +160,10 @@ public class ItemSpatialStorageCell extends AEBaseItem implements ISpatialStorag
BlockPos offset = manager.getCellDimensionOrigin( cellid );
this.setStorageCell( is, cellid, targetSize );
StorageHelper.getInstance()
.swapRegions( w, min.x + 1, min.y + 1, min.z + 1, manager.getWorld(), offset.getX(), offset.getY(),
offset.getZ(), targetX - 1, targetY - 1,
targetZ - 1 );
// FIXME StorageHelper.getInstance()
// FIXME .swapRegions( w, min.x + 1, min.y + 1, min.z + 1, manager.getWorld(), offset.getX(), offset.getY(),
// FIXME offset.getZ(), targetX - 1, targetY - 1,
// FIXME targetZ - 1 );
return new TransitionResult( true, 0 );
}