mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-11-08 09:23:00 +00:00
Initial update to 1.12
- Convert most recipes to JSON - Add JSON factories for impostor and turtle recipes. - Several mappings changes - Migrate to Forge's new registry system
This commit is contained in:
@@ -51,8 +51,9 @@ public class ItemAdvancedModem extends ItemPeripheralBase
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSubItems( @Nonnull Item itemID, @Nullable CreativeTabs tabs, @Nonnull NonNullList<ItemStack> list )
|
||||
public void getSubItems( @Nullable CreativeTabs tabs, @Nonnull NonNullList<ItemStack> list )
|
||||
{
|
||||
if( !isInCreativeTab( tabs ) ) return;
|
||||
list.add( PeripheralItemFactory.create( PeripheralType.AdvancedModem, null, 1 ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -62,8 +62,9 @@ public class ItemCable extends ItemPeripheralBase
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSubItems( @Nonnull Item itemID, @Nullable CreativeTabs tabs, @Nonnull NonNullList<ItemStack> list )
|
||||
public void getSubItems( @Nullable CreativeTabs tabs, @Nonnull NonNullList<ItemStack> list )
|
||||
{
|
||||
if( !isInCreativeTab( tabs ) ) return;
|
||||
list.add( PeripheralItemFactory.create( PeripheralType.WiredModem, null, 1 ) );
|
||||
list.add( PeripheralItemFactory.create( PeripheralType.Cable, null, 1 ) );
|
||||
}
|
||||
@@ -108,7 +109,7 @@ public class ItemCable extends ItemPeripheralBase
|
||||
}
|
||||
|
||||
// Try to add on the side of something
|
||||
if( !existing.isAir( existingState, world, pos ) && (type == PeripheralType.Cable || existing.isSideSolid( existingState, world, pos, side )) )
|
||||
if( !existing.isAir( existingState, world, pos ) && (type == PeripheralType.Cable || existingState.isSideSolid( world, pos, side )) )
|
||||
{
|
||||
BlockPos offset = pos.offset( side );
|
||||
Block offsetExisting = world.getBlockState( offset ).getBlock();
|
||||
|
||||
@@ -77,8 +77,9 @@ public class ItemPeripheral extends ItemPeripheralBase
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSubItems( @Nonnull Item itemID, @Nullable CreativeTabs tabs, @Nonnull NonNullList<ItemStack> list )
|
||||
public void getSubItems( @Nonnull CreativeTabs tabs, @Nonnull NonNullList<ItemStack> list )
|
||||
{
|
||||
if( !isInCreativeTab( tabs ) ) return;
|
||||
list.add( PeripheralItemFactory.create( PeripheralType.DiskDrive, null, 1 ) );
|
||||
list.add( PeripheralItemFactory.create( PeripheralType.Printer, null, 1 ) );
|
||||
list.add( PeripheralItemFactory.create( PeripheralType.Monitor, null, 1 ) );
|
||||
|
||||
@@ -14,6 +14,7 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.ITickable;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.NonNullList;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.util.List;
|
||||
@@ -46,7 +47,7 @@ public abstract class TilePeripheralBase extends TileGeneric
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getDroppedItems( @Nonnull List<ItemStack> drops, boolean creative )
|
||||
public void getDroppedItems( @Nonnull NonNullList<ItemStack> drops, boolean creative )
|
||||
{
|
||||
if( !creative )
|
||||
{
|
||||
|
||||
@@ -30,6 +30,7 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
@@ -298,7 +299,7 @@ public class TileCable extends TileModemBase
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getDroppedItems( @Nonnull List<ItemStack> drops, boolean creative )
|
||||
public void getDroppedItems( @Nonnull NonNullList<ItemStack> drops, boolean creative )
|
||||
{
|
||||
if( !creative )
|
||||
{
|
||||
|
||||
@@ -46,9 +46,9 @@ public abstract class WirelessModemPeripheral extends ModemPeripheral
|
||||
minRange = (double) ComputerCraft.modem_rangeDuringStorm;
|
||||
maxRange = (double) ComputerCraft.modem_highAltitudeRangeDuringStorm;
|
||||
}
|
||||
if( position.yCoord > 96.0 && maxRange > minRange )
|
||||
if( position.y > 96.0 && maxRange > minRange )
|
||||
{
|
||||
return minRange + ( position.yCoord - 96.0 ) * ( ( maxRange - minRange ) / ( ( world.getHeight() - 1 ) - 96.0 ) );
|
||||
return minRange + ( position.y - 96.0 ) * ( ( maxRange - minRange ) / ( ( world.getHeight() - 1 ) - 96.0 ) );
|
||||
}
|
||||
return minRange;
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ public class ContainerPrinter extends Container
|
||||
public void addListener( IContainerListener crafting )
|
||||
{
|
||||
super.addListener( crafting );
|
||||
crafting.sendProgressBarUpdate( this, 0, m_printer.isPrinting() ? 1 : 0 );
|
||||
crafting.sendWindowProperty( this, 0, m_printer.isPrinting() ? 1 : 0 );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -81,7 +81,7 @@ public class ContainerPrinter extends Container
|
||||
{
|
||||
if( printing != m_lastPrinting )
|
||||
{
|
||||
listener.sendProgressBarUpdate( this, 0, printing ? 1 : 0 );
|
||||
listener.sendWindowProperty( this, 0, printing ? 1 : 0 );
|
||||
}
|
||||
}
|
||||
m_lastPrinting = printing;
|
||||
|
||||
Reference in New Issue
Block a user