Compare commits

...

16 Commits

Author SHA1 Message Date
yueh 6291a545c3 Fixes #3793: Limit filling fluid inventories to their max capacity. (#3794) 2018-10-21 11:18:02 +02:00
yueh 99fd5a9d53 Fixes #3790: Correctly handle fluids with NBT data. (#3791) 2018-10-21 11:17:27 +02:00
yueh 416c7d2683 Input P2P tunnels can now be assigned a new frequency. (#3765)
Shift right clicking an existing tunnel only allowed to copied the
stored frequency.

When shift right clicking now and the stored frequency being the same as
already stored one, it will now create a new one and save it to the memory
card. In other words doubling clicking will reset now, otherwise the old
behaviour is still kept.
2018-10-21 11:17:01 +02:00
yueh 0c88d1e7ee Fixes #3746: Revert OreDict use for cable anchors. Blame Forge for crashes. (#3764) 2018-10-06 00:02:41 +02:00
fscan d88f550eb0 Switch to new IItemHandler (#3669) 2018-10-04 20:39:06 +02:00
yueh e21c59b326 Fixes #3146: Prevent crash when GlassState is missing. (#3758) 2018-10-04 19:33:10 +02:00
yueh d8af8d26be Updated to new Forge RB (#3760) 2018-10-04 19:32:47 +02:00
yueh 02426bc101 Update bug_report.md
Fixed missing *
2018-10-02 17:38:22 +02:00
yueh 11f8471772 Updated issue templates
Updated bug report
Added feature request
2018-10-01 13:12:44 +02:00
yueh d35b720a16 Update issue templates (#3751) 2018-10-01 13:00:07 +02:00
mezz 7a5b84c10a Allow JEI to differentiate between different cable facades (#3750) 2018-10-01 11:18:38 +02:00
covers1624 800860d4e6 Fixes #3747: Fix issues with facade breaking textures. (#3748) 2018-10-01 11:12:38 +02:00
yueh ac81418684 Changed some fluid recipes to match their item variant. (#3744) 2018-09-28 18:25:05 +02:00
yueh 7daad58607 Fixes #3742: Do not use storableInStorageCell() to identify generic c… (#3743)
Annotated IStorageCell with Nonnull where appropriate.
2018-09-28 17:38:08 +02:00
yueh 038ca23523 Fixes #3688: Invalidate Storage Bus cache immediately upon missing TE. (#3737) 2018-09-28 17:36:58 +02:00
yueh 37d8833b95 Fixes #3708: Move knifes/wrenches to oredict as constants are unreliable (#3729) 2018-09-22 20:14:28 +02:00
36 changed files with 336 additions and 367 deletions
+30
View File
@@ -0,0 +1,30 @@
---
name: Bug report
about: You found a bug or encountered a crash? Please report it here.
---
<!-- Provide a summary of the issue in the Title above, please do not "[Tag]" it. -->
**Describe the bug**
<!-- Always use the most recent version from ae-mod.info, it might already be fixed. -->
**To Reproduce**
<!-- Please provide the steps to reproduce it, otherwise we might not be able to fix it. -->
**Expected behavior**
<!-- A clear and concise description of what you expected to happen. -->
**Additional context**
<!-- Screenshots, crashlogs, etc. -->
<!-- A complete crashlog is required when reporting a crash. No excerpts. -->
<!-- Please use pastebin or gist for posting the complete crashlog. -->
**Environment**
<!-- Include as many relevant details about the environment -->
<!-- Like the used version, SP/MP, other mods and their version -->
<!-- The following ones are required, please note "latest" is not a version -->
- Minecraft Version:
- AE2 Version:
- Forge Version:
+17
View File
@@ -0,0 +1,17 @@
---
name: Feature Request
about: A feature request or suggestion to improve Applied Energistics 2
---
<!-- Provide a summary of the issue in the Title above, please do not "[Tag]" it. -->
**Describe the feature**
<!-- Tell us how it should work. -->
**Reasons why it should be considered**
<!-- This can help us in various degrees, e.g. to determine if it fits our design ideas. -->
**Additional Context**
<!-- Use this for further details, e.g. screenshots, links to mods for integrations. -->
<!-- Features will only be considered for the latest/next version. -->
+2 -2
View File
@@ -9,7 +9,7 @@ aebasename=appliedenergistics2
#########################################################
minecraft_version=1.12.2
mcp_mappings=snapshot_20171003
forge_version=14.23.3.2655
forge_version=14.23.5.2768
#########################################################
# Installable #
@@ -19,7 +19,7 @@ hwyla_version=1.8.26-B41_1.12.2
#########################################################
# Provided APIs #
#########################################################
jei_version=4.10.0.198
jei_version=4.13.0.219
tesla_version=1.0.63
ic2_version=2.8.73-ex112
top_version=1.12-1.4.23-16
@@ -24,6 +24,8 @@
package appeng.api.implementations.items;
import javax.annotation.Nonnull;
import net.minecraft.item.ItemStack;
import appeng.api.storage.ICellWorkbenchItem;
@@ -52,7 +54,7 @@ public interface IStorageCell<T extends IAEStack<T>> extends ICellWorkbenchItem
*
* @return number of bytes
*/
int getBytes( ItemStack cellItem );
int getBytes( @Nonnull ItemStack cellItem );
/**
* Determines the number of bytes used for any type included on the cell.
@@ -61,7 +63,7 @@ public interface IStorageCell<T extends IAEStack<T>> extends ICellWorkbenchItem
*
* @return number of bytes
*/
int getBytesPerType( ItemStack cellItem );
int getBytesPerType( @Nonnull ItemStack cellItem );
/**
* Must be between 1 and 63, indicates how many types you want to store on
@@ -71,7 +73,7 @@ public interface IStorageCell<T extends IAEStack<T>> extends ICellWorkbenchItem
*
* @return number of types
*/
int getTotalTypes( ItemStack cellItem );
int getTotalTypes( @Nonnull ItemStack cellItem );
/**
* Allows you to fine tune which items are allowed on a given cell, if you
@@ -83,7 +85,7 @@ public interface IStorageCell<T extends IAEStack<T>> extends ICellWorkbenchItem
*
* @return true to preventAdditionOfItem
*/
boolean isBlackListed( ItemStack cellItem, T requestedAddition );
boolean isBlackListed( @Nonnull ItemStack cellItem, @Nonnull T requestedAddition );
/**
* Allows you to specify if this storage cell can be stored inside other
@@ -104,7 +106,7 @@ public interface IStorageCell<T extends IAEStack<T>> extends ICellWorkbenchItem
*
* @return if the ItemStack should behavior as a storage cell.
*/
boolean isStorageCell( ItemStack i );
boolean isStorageCell( @Nonnull ItemStack i );
/**
* @return drain in ae/t this storage cell will use.
@@ -114,5 +116,6 @@ public interface IStorageCell<T extends IAEStack<T>> extends ICellWorkbenchItem
/**
* @return the type of channel your cell should be part of
*/
@Nonnull
IStorageChannel<T> getChannel();
}
@@ -29,5 +29,5 @@ package appeng.api.implementations.items;
*/
public enum MemoryCardMessages
{
INVALID_MACHINE, SETTINGS_LOADED, SETTINGS_SAVED, SETTINGS_CLEARED
INVALID_MACHINE, SETTINGS_LOADED, SETTINGS_SAVED, SETTINGS_RESET, SETTINGS_CLEARED
}
@@ -67,8 +67,8 @@ import appeng.thirdparty.codechicken.lib.model.pipeline.transformers.QuadTinter;
public class FacadeBuilder
{
public static double THICK_THICKNESS = 2D / 16D;
public static double THIN_THICKNESS = 1D / 16D;
public static final double THICK_THICKNESS = 2D / 16D;
public static final double THIN_THICKNESS = 1D / 16D;
public static final AxisAlignedBB[] THICK_FACADE_BOXES = new AxisAlignedBB[] {
new AxisAlignedBB( 0.0, 0.0, 0.0, 1.0, THICK_THICKNESS, 1.0 ),
@@ -141,7 +141,7 @@ public class FacadeBuilder
IBlockState blockState = facadeRenderState.getSourceBlock();
// If we aren't forcing transparency let the block decide if it should render.
if( !transparent )
if( !transparent && layer != null )
{
if( !blockState.getBlock().canRenderInLayer( blockState, layer ) )
{
@@ -224,7 +224,7 @@ public class FacadeBuilder
List<BakedQuad> modelQuads = new ArrayList<>();
// If we are forcing transparent facades, fake the render layer, and grab all quads.
if( transparent )
if( transparent || layer == null )
{
for( BlockRenderLayer forcedLayer : BlockRenderLayer.values() )
{
@@ -100,15 +100,18 @@ class GlassBakedModel implements IBakedModel
@Override
public List<BakedQuad> getQuads( @Nullable IBlockState state, @Nullable EnumFacing side, long rand )
{
if( !( state instanceof IExtendedBlockState ) || side == null )
{
return Collections.emptyList();
}
IExtendedBlockState extState = (IExtendedBlockState) state;
final IExtendedBlockState extState = (IExtendedBlockState) state;
final GlassState glassState = extState.getValue( BlockQuartzGlass.GLASS_STATE );
GlassState glassState = extState.getValue( BlockQuartzGlass.GLASS_STATE );
if( glassState == null )
{
return Collections.emptyList();
}
final int cx = Math.abs( glassState.getX() % 10 );
final int cy = Math.abs( glassState.getY() % 10 );
@@ -125,12 +128,12 @@ class GlassBakedModel implements IBakedModel
v /= 2;
}
TextureAtlasSprite glassTexture = this.glassTextures[texIdx];
final TextureAtlasSprite glassTexture = this.glassTextures[texIdx];
// Render the glass side
List<BakedQuad> quads = new ArrayList<>( 5 ); // At most 5
final List<BakedQuad> quads = new ArrayList<>( 5 ); // At most 5
List<Vec3d> corners = RenderHelper.getFaceCorners( side );
final List<Vec3d> corners = RenderHelper.getFaceCorners( side );
quads.add( this.createQuad( side, corners, glassTexture, u, v ) );
/*
@@ -143,8 +146,9 @@ class GlassBakedModel implements IBakedModel
* Converted to a number, this bitmask is 5. So the texture at index 5 is used.
* That texture had "0101" in its filename to indicate this.
*/
int edgeBitmask = makeBitmask( glassState, side );
TextureAtlasSprite sideSprite = this.frameTextures[edgeBitmask];
final int edgeBitmask = makeBitmask( glassState, side );
final TextureAtlasSprite sideSprite = this.frameTextures[edgeBitmask];
if( sideSprite != null )
{
quads.add( this.createQuad( side, corners, sideSprite, 0, 0 ) );
@@ -462,7 +462,6 @@ public abstract class AEBaseContainer extends Container
else if( destination.isEmpty() )
{
cs.putStack( tis.copy() );
cs.onSlotChanged();
this.updateSlot( cs );
break;
}
@@ -87,7 +87,7 @@ public class AppEngSlot extends Slot
{
if( this.isSlotEnabled() )
{
return ItemHandlerUtil.isItemValidForSlot( this.itemHandler, this.index, par1ItemStack );
return this.itemHandler.isItemValid( this.index, par1ItemStack );
}
return false;
}
@@ -121,7 +121,6 @@ public class AppEngSlot extends Slot
if( this.isSlotEnabled() )
{
ItemHandlerUtil.setStackInSlot( this.itemHandler, this.index, stack );
this.onSlotChanged();
if( this.getContainer() != null )
{
@@ -138,7 +137,6 @@ public class AppEngSlot extends Slot
@Override
public void onSlotChanged()
{
ItemHandlerUtil.markDirty( this.itemHandler, this.index );
this.setIsValid( hasCalculatedValidness.NotAvailable );
}
@@ -19,14 +19,17 @@
package appeng.core.api.definitions;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.common.registry.EntityEntryBuilder;
import net.minecraftforge.oredict.OreDictionary;
import appeng.api.definitions.IItemDefinition;
import appeng.api.definitions.IItems;
import appeng.api.util.AEColoredItemDefinition;
import appeng.bootstrap.FeatureFactory;
import appeng.bootstrap.components.IEntityRegistrationComponent;
import appeng.bootstrap.components.IOreDictComponent;
import appeng.client.render.crafting.ItemEncodedPatternRendering;
import appeng.core.CreativeTabFacade;
import appeng.core.features.AEFeature;
@@ -158,9 +161,13 @@ public final class ApiItems implements IItems
this.certusQuartzSword = certusTools.item( "certus_quartz_sword", () -> new ToolQuartzSword( AEFeature.CERTUS_QUARTZ_TOOLS ) )
.addFeatures( AEFeature.QUARTZ_SWORD )
.build();
this.certusQuartzWrench = certusTools.item( "certus_quartz_wrench", ToolQuartzWrench::new ).addFeatures( AEFeature.QUARTZ_WRENCH ).build();
this.certusQuartzWrench = certusTools.item( "certus_quartz_wrench", ToolQuartzWrench::new )
.addFeatures( AEFeature.QUARTZ_WRENCH )
.bootstrap( item -> (IOreDictComponent) side -> OreDictionary.registerOre( "itemQuartzWrench", new ItemStack( item ) ) )
.build();
this.certusQuartzKnife = certusTools.item( "certus_quartz_cutting_knife", () -> new ToolQuartzCuttingKnife( AEFeature.CERTUS_QUARTZ_TOOLS ) )
.addFeatures( AEFeature.QUARTZ_KNIFE )
.bootstrap( item -> (IOreDictComponent) side -> OreDictionary.registerOre( "itemQuartzKnife", new ItemStack( item ) ) )
.build();
FeatureFactory netherTools = registry.features( AEFeature.NETHER_QUARTZ_TOOLS );
@@ -179,9 +186,13 @@ public final class ApiItems implements IItems
this.netherQuartzSword = netherTools.item( "nether_quartz_sword", () -> new ToolQuartzSword( AEFeature.NETHER_QUARTZ_TOOLS ) )
.addFeatures( AEFeature.QUARTZ_SWORD )
.build();
this.netherQuartzWrench = netherTools.item( "nether_quartz_wrench", ToolQuartzWrench::new ).addFeatures( AEFeature.QUARTZ_WRENCH ).build();
this.netherQuartzWrench = netherTools.item( "nether_quartz_wrench", ToolQuartzWrench::new )
.addFeatures( AEFeature.QUARTZ_WRENCH )
.bootstrap( item -> (IOreDictComponent) side -> OreDictionary.registerOre( "itemQuartzWrench", new ItemStack( item ) ) )
.build();
this.netherQuartzKnife = netherTools.item( "nether_quartz_cutting_knife", () -> new ToolQuartzCuttingKnife( AEFeature.NETHER_QUARTZ_TOOLS ) )
.addFeatures( AEFeature.QUARTZ_KNIFE )
.bootstrap( item -> (IOreDictComponent) side -> OreDictionary.registerOre( "itemQuartzKnife", new ItemStack( item ) ) )
.build();
FeatureFactory powerTools = registry.features( AEFeature.POWERED_TOOLS );
@@ -29,6 +29,7 @@ public enum PlayerMessages
InvalidMachine,
LoadedSettings,
SavedSettings,
ResetSettings,
MachineNotPowered,
isNowLocked,
@@ -85,11 +85,11 @@ public class FluidCellConfig extends CellConfig
}
@Override
public boolean isItemValidForSlot( int slot, ItemStack stack )
public boolean isItemValid( int slot, ItemStack stack )
{
if( stack.isEmpty() || stack.getItem() instanceof FluidDummyItem )
{
super.isItemValidForSlot( slot, stack );
super.isItemValid( slot, stack );
}
FluidStack fluid = FluidUtil.getFluidContained( stack );
if( fluid == null || !Api.INSTANCE.definitions().items().dummyFluidItem().maybeStack( 1 ).isPresent() )
@@ -100,7 +100,7 @@ public class FluidCellConfig extends CellConfig
ItemStack is = Api.INSTANCE.definitions().items().dummyFluidItem().maybeStack( 1 ).get();
FluidDummyItem item = (FluidDummyItem) is.getItem();
item.setFluidStack( is, fluid );
return super.isItemValidForSlot( slot, is );
return super.isItemValid( slot, is );
}
}
@@ -17,10 +17,10 @@ public class AEFluidInventory implements IAEFluidTank
{
private final IAEFluidStack[] fluids;
private final IAEFluidInventory handler;
private final long capacity;
private final int capacity;
private IFluidTankProperties[] props = null;
public AEFluidInventory( final IAEFluidInventory handler, final int slots, final long capcity )
public AEFluidInventory( final IAEFluidInventory handler, final int slots, final int capcity )
{
this.fluids = new IAEFluidStack[slots];
this.handler = handler;
@@ -29,7 +29,7 @@ public class AEFluidInventory implements IAEFluidTank
public AEFluidInventory( final IAEFluidInventory handler, final int slots )
{
this( handler, slots, Long.MAX_VALUE );
this( handler, slots, Integer.MAX_VALUE );
}
@Override
@@ -110,45 +110,34 @@ public class AEFluidInventory implements IAEFluidTank
final IAEFluidStack fluid = this.fluids[slot];
if( !doFill )
{
if( fluid == null )
{
return resource.amount;
}
if( !fluid.equals( resource ) )
{
return 0;
}
return (int) Math.min( Math.min( this.capacity - fluid.getStackSize(), resource.amount ), Integer.MAX_VALUE );
}
if( fluid == null )
{
this.setFluidInSlot( slot, AEFluidStack.fromFluidStack( resource ) );
return resource.amount;
}
if( !fluid.equals( resource ) )
if( fluid != null && !fluid.equals( resource ) )
{
return 0;
}
long filled = this.capacity - fluid.getStackSize();
if( resource.amount < filled )
int amountToStore = this.capacity;
if( fluid != null )
{
fluid.setStackSize( fluid.getStackSize() + resource.amount );
filled = resource.amount;
}
else
{
fluid.setStackSize( this.capacity );
amountToStore -= fluid.getStackSize();
}
this.onContentChanged( slot );
return (int) filled;
amountToStore = Math.min( amountToStore, resource.amount );
if( doFill )
{
if( fluid == null )
{
this.setFluidInSlot( slot, AEFluidStack.fromFluidStack( resource ) );
}
else
{
fluid.setStackSize( fluid.getStackSize() + amountToStore );
this.onContentChanged( slot );
}
}
return amountToStore;
}
public FluidStack drain( final int slot, final FluidStack resource, final boolean doDrain )
@@ -363,7 +352,7 @@ public class AEFluidInventory implements IAEFluidTank
@Override
public int getCapacity()
{
return (int) Math.min( AEFluidInventory.this.capacity, Integer.MAX_VALUE );
return Math.min( AEFluidInventory.this.capacity, Integer.MAX_VALUE );
}
@Override
@@ -49,37 +49,41 @@ import appeng.util.item.AEStack;
public final class AEFluidStack extends AEStack<IAEFluidStack> implements IAEFluidStack, Comparable<AEFluidStack>
{
private final int myHash;
private final Fluid fluid;
private NBTTagCompound tagCompound;
private AEFluidStack( final AEFluidStack is )
private AEFluidStack( final AEFluidStack fluidStack )
{
this.fluid = is.fluid;
this.setStackSize( is.getStackSize() );
this.fluid = fluidStack.fluid;
this.setStackSize( fluidStack.getStackSize() );
// priority = is.priority;
this.setCraftable( is.isCraftable() );
this.setCountRequestable( is.getCountRequestable() );
this.setCraftable( fluidStack.isCraftable() );
this.setCountRequestable( fluidStack.getCountRequestable() );
this.myHash = is.myHash;
if( fluidStack.hasTagCompound() )
{
this.tagCompound = fluidStack.tagCompound.copy();
}
}
private AEFluidStack( @Nonnull final FluidStack is )
private AEFluidStack( @Nonnull final FluidStack fluidStack )
{
this.fluid = is.getFluid();
this.fluid = fluidStack.getFluid();
if( this.fluid == null )
{
throw new IllegalArgumentException( "Fluid is null." );
}
this.setStackSize( is.amount );
this.setStackSize( fluidStack.amount );
this.setCraftable( false );
this.setCountRequestable( 0 );
this.myHash = this.fluid.hashCode() ^ ( this.tagCompound == null ? 0 : System.identityHashCode( this.tagCompound ) );
if( fluidStack.tag != null )
{
this.tagCompound = fluidStack.tag.copy();
}
}
public static AEFluidStack fromFluidStack( final FluidStack input )
@@ -92,9 +96,9 @@ public final class AEFluidStack extends AEStack<IAEFluidStack> implements IAEFlu
return new AEFluidStack( input );
}
public static IAEFluidStack fromNBT( final NBTTagCompound i )
public static IAEFluidStack fromNBT( final NBTTagCompound data )
{
final FluidStack fluidStack = FluidStack.loadFluidStackFromNBT( i );
final FluidStack fluidStack = FluidStack.loadFluidStackFromNBT( data );
if( fluidStack == null )
{
@@ -102,15 +106,21 @@ public final class AEFluidStack extends AEStack<IAEFluidStack> implements IAEFlu
}
final AEFluidStack fluid = AEFluidStack.fromFluidStack( fluidStack );
fluid.setStackSize( i.getLong( "Cnt" ) );
fluid.setCountRequestable( i.getLong( "Req" ) );
fluid.setCraftable( i.getBoolean( "Craft" ) );
fluid.setStackSize( data.getLong( "Cnt" ) );
fluid.setCountRequestable( data.getLong( "Req" ) );
fluid.setCraftable( data.getBoolean( "Craft" ) );
if( fluid.hasTagCompound() )
{
fluid.tagCompound = fluid.tagCompound.copy();
}
return fluid;
}
public static IAEFluidStack fromPacket( final ByteBuf data ) throws IOException
public static IAEFluidStack fromPacket( final ByteBuf buffer ) throws IOException
{
final byte mask = data.readByte();
final byte mask = buffer.readByte();
final byte stackType = (byte) ( ( mask & 0x0C ) >> 2 );
final byte countReqType = (byte) ( ( mask & 0x30 ) >> 4 );
final boolean isCraftable = ( mask & 0x40 ) > 0;
@@ -119,26 +129,26 @@ public final class AEFluidStack extends AEStack<IAEFluidStack> implements IAEFlu
// don't send this...
final NBTTagCompound d = new NBTTagCompound();
final byte len2 = data.readByte();
final byte len2 = buffer.readByte();
final byte[] name = new byte[len2];
data.readBytes( name, 0, len2 );
buffer.readBytes( name, 0, len2 );
d.setString( "FluidName", new String( name, "UTF-8" ) );
d.setByte( "Count", (byte) 0 );
if( hasTagCompound )
{
final int len = data.readInt();
final int len = buffer.readInt();
final byte[] bd = new byte[len];
data.readBytes( bd );
buffer.readBytes( bd );
final DataInputStream di = new DataInputStream( new ByteArrayInputStream( bd ) );
d.setTag( "tag", CompressedStreamTools.read( di ) );
d.setTag( "Tag", CompressedStreamTools.read( di ) );
}
final long stackSize = getPacketValue( stackType, data );
final long countRequestable = getPacketValue( countReqType, data );
final long stackSize = getPacketValue( stackType, buffer );
final long countRequestable = getPacketValue( countReqType, buffer );
final FluidStack fluidStack = FluidStack.loadFluidStackFromNBT( d );
@@ -168,51 +178,21 @@ public final class AEFluidStack extends AEStack<IAEFluidStack> implements IAEFlu
}
@Override
public void writeToNBT( final NBTTagCompound i )
public void writeToNBT( final NBTTagCompound data )
{
/*
* Mojang Fucked this over ; GC Optimization - Ugly Yes, but it saves a lot in the memory department.
*/
data.setString( "FluidName", this.fluid.getName() );
data.setByte( "Count", (byte) 0 );
data.setLong( "Cnt", this.getStackSize() );
data.setLong( "Req", this.getCountRequestable() );
data.setBoolean( "Craft", this.isCraftable() );
/*
* NBTBase FluidName = i.getTag( "FluidName" ); NBTBase Count = i.getTag( "Count" ); NBTBase Cnt = i.getTag(
* "Cnt" ); NBTBase Req = i.getTag( "Req" ); NBTBase Craft = i.getTag( "Craft" );
*/
/*
* if ( FluidName != null && FluidName instanceof NBTTagString ) ((NBTTagString) FluidName).data = (String)
* this.fluid.getName(); else
*/
i.setString( "FluidName", this.fluid.getName() );
/*
* if ( Count != null && Count instanceof NBTTagByte ) ((NBTTagByte) Count).data = (byte) 0; else
*/
i.setByte( "Count", (byte) 0 );
/*
* if ( Cnt != null && Cnt instanceof NBTTagLong ) ((NBTTagLong) Cnt).data = this.stackSize; else
*/
i.setLong( "Cnt", this.getStackSize() );
/*
* if ( Req != null && Req instanceof NBTTagLong ) ((NBTTagLong) Req).data = this.stackSize; else
*/
i.setLong( "Req", this.getCountRequestable() );
/*
* if ( Craft != null && Craft instanceof NBTTagByte ) ((NBTTagByte) Craft).data = (byte) (this.isCraftable() ?
* 1 : 0); else
*/
i.setBoolean( "Craft", this.isCraftable() );
if( this.tagCompound != null )
if( this.hasTagCompound() )
{
i.setTag( "tag", this.tagCompound );
data.setTag( "Tag", this.tagCompound );
}
else
{
i.removeTag( "tag" );
data.removeTag( "Tag" );
}
}
@@ -255,29 +235,43 @@ public final class AEFluidStack extends AEStack<IAEFluidStack> implements IAEFlu
}
@Override
public int compareTo( final AEFluidStack b )
public int compareTo( final AEFluidStack other )
{
final int diff = this.hashCode() - b.hashCode();
return diff > 0 ? 1 : ( diff < 0 ? -1 : 0 );
if( this.fluid != other.fluid )
{
return this.fluid.getName().compareTo( other.fluid.getName() );
}
if( Platform.itemComparisons().isNbtTagEqual( this.tagCompound, other.tagCompound ) )
{
return 0;
}
return this.tagCompound.hashCode() - other.tagCompound.hashCode();
}
@Override
public int hashCode()
{
return this.myHash;
final int prime = 31;
int result = 1;
result = prime * result + ( ( this.fluid == null ) ? 0 : this.fluid.hashCode() );
result = prime * result + ( ( this.tagCompound == null ) ? 0 : this.tagCompound.hashCode() );
return result;
}
@Override
public boolean equals( final Object ia )
public boolean equals( final Object other )
{
if( ia instanceof AEFluidStack )
if( other instanceof AEFluidStack )
{
final AEFluidStack is = (AEFluidStack) ia;
final AEFluidStack is = (AEFluidStack) other;
return is.fluid == this.fluid && Platform.itemComparisons().isNbtTagEqual( this.tagCompound, is.tagCompound );
}
else if( ia instanceof FluidStack )
else if( other instanceof FluidStack )
{
final FluidStack is = (FluidStack) ia;
final FluidStack is = (FluidStack) other;
return is.getFluid() == this.fluid && Platform.itemComparisons().isNbtTagEqual( this.tagCompound, is.tag );
}
return false;
@@ -286,7 +280,7 @@ public final class AEFluidStack extends AEStack<IAEFluidStack> implements IAEFlu
@Override
public String toString()
{
return this.getFluidStack().toString();
return this.getStackSize() + "x" + this.getFluidStack().getFluid().getName() + " " + this.tagCompound;
}
@Override
@@ -298,11 +292,8 @@ public final class AEFluidStack extends AEStack<IAEFluidStack> implements IAEFlu
@Override
public FluidStack getFluidStack()
{
final FluidStack is = new FluidStack( this.fluid, (int) Math.min( Integer.MAX_VALUE, this.getStackSize() ) );
if( this.tagCompound != null )
{
is.tag = this.tagCompound.copy();
}
final int amount = (int) Math.min( Integer.MAX_VALUE, this.getStackSize() );
final FluidStack is = new FluidStack( this.fluid, amount, this.tagCompound );
return is;
}
@@ -327,24 +318,24 @@ public final class AEFluidStack extends AEStack<IAEFluidStack> implements IAEFlu
}
@Override
public void writeToPacket( final ByteBuf i ) throws IOException
public void writeToPacket( final ByteBuf buffer ) throws IOException
{
final byte mask = (byte) ( ( this.getType( this.getStackSize() ) << 2 ) | ( this
.getType( this.getCountRequestable() ) << 4 ) | ( (byte) ( this.isCraftable() ? 1 : 0 ) << 6 ) | ( this.hasTagCompound() ? 1 : 0 ) << 7 );
i.writeByte( mask );
buffer.writeByte( mask );
this.writeToStream( i );
this.writeToStream( buffer );
this.putPacketValue( i, this.getStackSize() );
this.putPacketValue( i, this.getCountRequestable() );
this.putPacketValue( buffer, this.getStackSize() );
this.putPacketValue( buffer, this.getCountRequestable() );
}
private void writeToStream( final ByteBuf i ) throws IOException
private void writeToStream( final ByteBuf buffer ) throws IOException
{
final byte[] name = this.fluid.getName().getBytes( "UTF-8" );
i.writeByte( (byte) name.length );
i.writeBytes( name );
buffer.writeByte( (byte) name.length );
buffer.writeBytes( name );
if( this.hasTagCompound() )
{
final ByteArrayOutputStream bytes = new ByteArrayOutputStream();
@@ -355,8 +346,8 @@ public final class AEFluidStack extends AEStack<IAEFluidStack> implements IAEFlu
final byte[] tagBytes = bytes.toByteArray();
final int size = tagBytes.length;
i.writeInt( size );
i.writeBytes( tagBytes );
buffer.writeInt( size );
buffer.writeBytes( tagBytes );
}
}
}
@@ -32,6 +32,7 @@ import net.minecraft.item.ItemStack;
import mezz.jei.api.IJeiRuntime;
import mezz.jei.api.IModPlugin;
import mezz.jei.api.IModRegistry;
import mezz.jei.api.ISubtypeRegistry;
import mezz.jei.api.recipe.IRecipeCategoryRegistration;
import mezz.jei.api.recipe.VanillaRecipeCategoryUid;
@@ -54,6 +55,12 @@ import appeng.items.parts.ItemFacade;
@mezz.jei.api.JEIPlugin
public class JEIPlugin implements IModPlugin
{
@Override
public void registerItemSubtypes( ISubtypeRegistry subtypeRegistry )
{
final Optional<Item> maybeFacade = AEApi.instance().definitions().items().facade().maybeItem();
maybeFacade.ifPresent( subtypeRegistry::useNbtForSubtypes );
}
@Override
public void registerCategories( IRecipeCategoryRegistration registry )
@@ -25,6 +25,7 @@ import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.ActionResult;
import net.minecraft.util.EnumActionResult;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand;
@@ -174,6 +175,9 @@ public class ToolMemoryCard extends AEBaseItem implements IMemoryCard
case SETTINGS_SAVED:
player.sendMessage( PlayerMessages.SavedSettings.get() );
break;
case SETTINGS_RESET:
player.sendMessage( PlayerMessages.ResetSettings.get() );
break;
default:
}
}
@@ -185,9 +189,7 @@ public class ToolMemoryCard extends AEBaseItem implements IMemoryCard
{
if( !w.isRemote )
{
final IMemoryCard mem = (IMemoryCard) player.getHeldItem( hand ).getItem();
mem.notifyUser( player, MemoryCardMessages.SETTINGS_CLEARED );
player.getHeldItem( hand ).setTagCompound( null );
this.clearCard( player, w, hand );
}
return EnumActionResult.SUCCESS;
}
@@ -197,9 +199,31 @@ public class ToolMemoryCard extends AEBaseItem implements IMemoryCard
}
}
@Override
public ActionResult<ItemStack> onItemRightClick( World w, EntityPlayer player, EnumHand hand )
{
if( player.isSneaking() )
{
if( !w.isRemote )
{
this.clearCard( player, w, hand );
}
}
return super.onItemRightClick( w, player, hand );
}
@Override
public boolean doesSneakBypassUse( final ItemStack itemstack, final IBlockAccess world, final BlockPos pos, final EntityPlayer player )
{
return true;
}
private void clearCard( final EntityPlayer player, final World w, final EnumHand hand )
{
final IMemoryCard mem = (IMemoryCard) player.getHeldItem( hand ).getItem();
mem.notifyUser( player, MemoryCardMessages.SETTINGS_CLEARED );
player.getHeldItem( hand ).setTagCompound( null );
}
}
@@ -64,52 +64,44 @@ public class BasicCellInventory<T extends IAEStack<T>> extends AbstractCellInven
}
}
public static <T extends AEStack<T>> boolean isCellOfType( final ItemStack input, IStorageChannel channel )
public static <T extends AEStack<T>> boolean isCellOfType( final ItemStack input, IStorageChannel<?> channel )
{
if( input == null )
{
return false;
}
final IStorageCell<?> type = getStorageCell( input );
final Item type = input.getItem();
if( type instanceof IStorageCell )
{
return ( (IStorageCell) type ).getChannel() == channel;
}
return false;
return type != null && type.getChannel() == channel;
}
public static boolean isCell( final ItemStack input )
{
if( input == null )
{
return false;
}
return getStorageCell( input ) != null;
}
try
private boolean isStorageCell( final T input )
{
if( input instanceof IAEItemStack )
{
final Item type = input.getItem();
if( type instanceof IStorageCell )
{
return !( (IStorageCell) type ).storableInStorageCell();
}
}
catch( final Throwable err )
{
return true;
final IAEItemStack stack = (IAEItemStack) input;
final IStorageCell<?> type = getStorageCell( stack.getDefinition() );
return type != null && !type.storableInStorageCell();
}
return false;
}
private boolean isStorageCell( final T input )
private static IStorageCell<?> getStorageCell( final ItemStack input )
{
if( !input.isItem() )
if( input != null )
{
return false;
final Item type = input.getItem();
if( type instanceof IStorageCell )
{
return (IStorageCell<?>) type;
}
}
return isCell( ( (IAEItemStack) input ).getDefinition() );
return null;
}
@SuppressWarnings( { "rawtypes", "unchecked" } )
@@ -288,7 +288,18 @@ public class PartStorageBus extends PartUpgradeable implements IGridTickable, IC
{
if( pos.offset( this.getSide().getFacing() ).equals( neighbor ) )
{
this.resetCache( false );
final TileEntity te = w.getTileEntity( neighbor );
// In case the TE was destroyed, we have to do a full reset immediately.
if( te == null )
{
this.resetCache( true );
this.resetCache();
}
else
{
this.resetCache( false );
}
}
}
@@ -336,15 +336,18 @@ public abstract class PartP2PTunnel<T extends PartP2PTunnel> extends PartBasicSt
}
final IMemoryCard mc = (IMemoryCard) is.getItem();
final NBTTagCompound data = new NBTTagCompound();
final NBTTagCompound data = mc.getData( is );
final short storedFrequency = data.getShort( "freq" );
short newFreq = this.getFrequency();
final boolean wasOutput = this.isOutput();
this.setOutput( false );
final boolean needsNewFrequency = wasOutput || this.getFrequency() == 0 || storedFrequency == newFreq;
try
{
if( wasOutput || this.getFrequency() == 0 )
if( needsNewFrequency )
{
newFreq = this.getProxy().getP2P().newFrequency();
}
@@ -373,7 +376,14 @@ public abstract class PartP2PTunnel<T extends PartP2PTunnel> extends PartBasicSt
data.setIntArray( "colorCode", colorCode );
mc.setMemoryCardContents( is, type + ".name", data );
mc.notifyUser( player, MemoryCardMessages.SETTINGS_SAVED );
if( needsNewFrequency )
{
mc.notifyUser( player, MemoryCardMessages.SETTINGS_RESET );
}
else
{
mc.notifyUser( player, MemoryCardMessages.SETTINGS_SAVED );
}
return true;
}
return false;
@@ -3,15 +3,15 @@ package appeng.tile.inventory;
import net.minecraft.item.ItemStack;
import net.minecraftforge.items.IItemHandlerModifiable;
import appeng.api.storage.ICellInventory;
import appeng.api.storage.ICellInventoryHandler;
import appeng.util.inv.IAEAppEngInventory;
import appeng.util.inv.IInternalItemHandler;
import appeng.util.inv.filter.IAEItemFilter;
public class AppEngCellInventory implements IInternalItemHandler
public class AppEngCellInventory implements IItemHandlerModifiable
{
private final AppEngInternalInventory inv;
private final ICellInventoryHandler handlerForSlot[];
@@ -78,17 +78,9 @@ public class AppEngCellInventory implements IInternalItemHandler
}
@Override
public boolean isItemValidForSlot( int slot, ItemStack stack )
public boolean isItemValid( int slot, ItemStack stack )
{
return this.inv.isItemValidForSlot( slot, stack );
}
@Override
public void markDirty( int slot )
{
this.persist( slot );
this.inv.markDirty( slot );
this.cleanup( slot );
return this.inv.isItemValid( slot, stack );
}
public void persist()
@@ -25,6 +25,7 @@ import javax.annotation.Nonnull;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraftforge.items.IItemHandlerModifiable;
import net.minecraftforge.items.ItemHandlerHelper;
import appeng.api.AEApi;
@@ -33,14 +34,13 @@ import appeng.api.storage.data.IAEItemStack;
import appeng.core.AELog;
import appeng.util.Platform;
import appeng.util.inv.IAEAppEngInventory;
import appeng.util.inv.IInternalItemHandler;
import appeng.util.inv.InvOperation;
import appeng.util.item.AEItemStack;
import appeng.util.iterators.AEInvIterator;
import appeng.util.iterators.InvIterator;
public class AppEngInternalAEInventory implements IInternalItemHandler, Iterable<ItemStack>
public class AppEngInternalAEInventory implements IItemHandlerModifiable, Iterable<ItemStack>
{
private final IAEAppEngInventory te;
private final IAEItemStack[] inv;
@@ -254,7 +254,7 @@ public class AppEngInternalAEInventory implements IInternalItemHandler, Iterable
private void fireOnChangeInventory( int slot, InvOperation op, ItemStack removed, ItemStack inserted )
{
if( this.te != null && Platform.isServer() )
if( this.te != null && Platform.isServer() && !this.dirtyFlag )
{
this.dirtyFlag = true;
this.te.onChangeInventory( this, slot, op, removed, inserted );
@@ -281,17 +281,8 @@ public class AppEngInternalAEInventory implements IInternalItemHandler, Iterable
}
@Override
public boolean isItemValidForSlot( int slot, ItemStack stack )
public boolean isItemValid( int slot, ItemStack stack )
{
return true;
}
@Override
public void markDirty( int slot )
{
if( !this.dirtyFlag )
{
this.fireOnChangeInventory( slot, InvOperation.DIRTY, ItemStack.EMPTY, ItemStack.EMPTY );
}
}
}
@@ -31,12 +31,11 @@ import net.minecraftforge.items.ItemStackHandler;
import appeng.util.Platform;
import appeng.util.inv.IAEAppEngInventory;
import appeng.util.inv.IInternalItemHandler;
import appeng.util.inv.InvOperation;
import appeng.util.inv.filter.IAEItemFilter;
public class AppEngInternalInventory extends ItemStackHandler implements IInternalItemHandler, Iterable<ItemStack>
public class AppEngInternalInventory extends ItemStackHandler implements Iterable<ItemStack>
{
private boolean enableClientEvents = false;
private IAEAppEngInventory te;
@@ -117,7 +116,7 @@ public class AppEngInternalInventory extends ItemStackHandler implements IIntern
@Override
protected void onContentsChanged( int slot )
{
if( this.getTileEntity() != null && this.eventsEnabled() )
if( this.getTileEntity() != null && this.eventsEnabled() && !this.dirtyFlag )
{
this.dirtyFlag = true;
ItemStack newStack = this.getStackInSlot( slot ).copy();
@@ -159,19 +158,7 @@ public class AppEngInternalInventory extends ItemStackHandler implements IIntern
}
@Override
public void markDirty( final int slot )
{
if( this.getTileEntity() != null && this.eventsEnabled() && !this.dirtyFlag )
{
this.dirtyFlag = true;
this.getTileEntity().onChangeInventory( this, slot, InvOperation.DIRTY, ItemStack.EMPTY, ItemStack.EMPTY );
this.getTileEntity().saveChanges();
this.dirtyFlag = false;
}
}
@Override
public boolean isItemValidForSlot( int slot, ItemStack stack )
public boolean isItemValid( int slot, ItemStack stack )
{
if( this.maxStack[slot] == 0 )
{
@@ -24,8 +24,6 @@ import net.minecraft.item.ItemStack;
import net.minecraftforge.items.IItemHandler;
import net.minecraftforge.items.IItemHandlerModifiable;
import appeng.util.inv.IInternalItemHandler;
public class ItemHandlerUtil
{
@@ -66,37 +64,6 @@ public class ItemHandlerUtil
return true;
}
public static void markDirty( final IItemHandler inv, final int slot )
{
if( inv instanceof IInternalItemHandler )
{
( (IInternalItemHandler) inv ).markDirty( slot );
}
}
public static boolean isItemValidForSlot( final IItemHandler inv, int slot, ItemStack stack )
{
if( stack.isEmpty() )
{
return false;
}
if( inv instanceof IInternalItemHandler )
{
return ( (IInternalItemHandler) inv ).isItemValidForSlot( slot, stack );
}
// empty slot
ItemStack currentStack = inv.getStackInSlot( slot );
setStackInSlot( inv, slot, ItemStack.EMPTY );
// test insert
ItemStack remainder = inv.insertItem( slot, stack, true );
// restore slot
setStackInSlot( inv, slot, currentStack );
return remainder.isEmpty() || remainder.getCount() < stack.getCount();
}
public static void copy( final IItemHandler from, final IItemHandler to, boolean deepCopy )
{
for( int i = 0; i < Math.min( from.getSlots(), to.getSlots() ); ++i )
@@ -1,31 +0,0 @@
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2017, AlgorithmX2, All rights reserved.
*
* Applied Energistics 2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Applied Energistics 2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
*/
package appeng.util.inv;
import net.minecraft.item.ItemStack;
import net.minecraftforge.items.IItemHandlerModifiable;
public interface IInternalItemHandler extends IItemHandlerModifiable
{
boolean isItemValidForSlot( int slot, ItemStack stack );
void markDirty( int slot );
}
@@ -21,5 +21,5 @@ package appeng.util.inv;
public enum InvOperation
{
EXTRACT, INSERT, SET, DIRTY
EXTRACT, INSERT, SET
}
@@ -25,12 +25,13 @@ import javax.annotation.Nonnull;
import net.minecraft.item.ItemStack;
import net.minecraftforge.items.IItemHandler;
import net.minecraftforge.items.IItemHandlerModifiable;
import net.minecraftforge.items.wrapper.EmptyHandler;
import appeng.util.helpers.ItemHandlerUtil;
public class WrapperChainedItemHandler implements IInternalItemHandler
public class WrapperChainedItemHandler implements IItemHandlerModifiable
{
private IItemHandler[] itemHandler; // the handlers
private int[] baseIndex; // index-offsets of the different handlers
@@ -159,20 +160,11 @@ public class WrapperChainedItemHandler implements IInternalItemHandler
}
@Override
public boolean isItemValidForSlot( int slot, ItemStack stack )
public boolean isItemValid( int slot, ItemStack stack )
{
int index = this.getIndexForSlot( slot );
IItemHandler handler = this.getHandlerFromIndex( index );
int targetSlot = this.getSlotFromIndex( slot, index );
return ItemHandlerUtil.isItemValidForSlot( handler, targetSlot, stack );
}
@Override
public void markDirty( int slot )
{
int index = this.getIndexForSlot( slot );
IItemHandler handler = this.getHandlerFromIndex( index );
int targetSlot = this.getSlotFromIndex( slot, index );
ItemHandlerUtil.markDirty( handler, targetSlot );
return handler.isItemValid( targetSlot, stack );
}
}
@@ -23,12 +23,13 @@ import javax.annotation.Nonnull;
import net.minecraft.item.ItemStack;
import net.minecraftforge.items.IItemHandler;
import net.minecraftforge.items.IItemHandlerModifiable;
import appeng.util.helpers.ItemHandlerUtil;
import appeng.util.inv.filter.IAEItemFilter;
public class WrapperFilteredItemHandler implements IInternalItemHandler
public class WrapperFilteredItemHandler implements IItemHandlerModifiable
{
private final IItemHandler handler;
private final IAEItemFilter filter;
@@ -86,18 +87,12 @@ public class WrapperFilteredItemHandler implements IInternalItemHandler
}
@Override
public boolean isItemValidForSlot( int slot, ItemStack stack )
public boolean isItemValid( int slot, ItemStack stack )
{
if( !this.filter.allowInsert( this.handler, slot, stack ) )
{
return false;
}
return ItemHandlerUtil.isItemValidForSlot( this.handler, slot, stack );
}
@Override
public void markDirty( int slot )
{
ItemHandlerUtil.markDirty( this.handler, slot );
return this.handler.isItemValid( slot, stack );
}
}
@@ -105,7 +105,7 @@ public class WrapperInvItemHandler implements IInventory
@Override
public void markDirty()
{
ItemHandlerUtil.markDirty( this.inv, -1 );
// NOP
}
@Override
@@ -129,7 +129,7 @@ public class WrapperInvItemHandler implements IInventory
@Override
public boolean isItemValidForSlot( int index, ItemStack stack )
{
return ItemHandlerUtil.isItemValidForSlot( this.inv, index, stack );
return this.inv.isItemValid( index, stack );
}
@Override
@@ -23,12 +23,13 @@ import java.util.function.Supplier;
import net.minecraft.item.ItemStack;
import net.minecraftforge.items.IItemHandler;
import net.minecraftforge.items.IItemHandlerModifiable;
import appeng.util.Lazy;
import appeng.util.helpers.ItemHandlerUtil;
public class WrapperLazyItemHandler implements IInternalItemHandler
public class WrapperLazyItemHandler implements IItemHandlerModifiable
{
private final Lazy<IItemHandler> sourceHandler;
@@ -74,14 +75,8 @@ public class WrapperLazyItemHandler implements IInternalItemHandler
}
@Override
public boolean isItemValidForSlot( int slot, ItemStack stack )
public boolean isItemValid( int slot, ItemStack stack )
{
return ItemHandlerUtil.isItemValidForSlot( this.sourceHandler.get(), slot, stack );
}
@Override
public void markDirty( int slot )
{
ItemHandlerUtil.markDirty( this.sourceHandler.get(), slot );
return this.sourceHandler.get().isItemValid( slot, stack );
}
}
@@ -23,11 +23,12 @@ import javax.annotation.Nonnull;
import net.minecraft.item.ItemStack;
import net.minecraftforge.items.IItemHandler;
import net.minecraftforge.items.IItemHandlerModifiable;
import appeng.util.helpers.ItemHandlerUtil;
public class WrapperRangeItemHandler implements IInternalItemHandler
public class WrapperRangeItemHandler implements IItemHandlerModifiable
{
private final IItemHandler compose;
private final int minSlot;
@@ -108,22 +109,12 @@ public class WrapperRangeItemHandler implements IInternalItemHandler
}
@Override
public boolean isItemValidForSlot( int slot, ItemStack stack )
public boolean isItemValid( int slot, ItemStack stack )
{
if( this.checkSlot( slot ) )
{
return ItemHandlerUtil.isItemValidForSlot( this.compose, slot + this.minSlot, stack );
return this.compose.isItemValid( slot + this.minSlot, stack );
}
return false;
}
@Override
public void markDirty( int slot )
{
if( this.checkSlot( slot ) )
{
ItemHandlerUtil.markDirty( this.compose, slot + this.minSlot );
}
}
}
@@ -84,7 +84,8 @@ chat.appliedenergistics2.DeviceNotLinked=Device is not linked.
chat.appliedenergistics2.StationCanNotBeLocated=Station can not be located.
chat.appliedenergistics2.MachineNotPowered=Machine is not powered.
chat.appliedenergistics2.CommunicationError=Error Communicating with Network.
chat.appliedenergistics2.SavedSettings=Copied device configuration to memory card.
chat.appliedenergistics2.SavedSettings=Copied current device configuration to memory card.
chat.appliedenergistics2.ResetSettings=New device configuration created and copied to memory card.
chat.appliedenergistics2.AmmoDepleted=Ammo Depleted.
chat.appliedenergistics2.isNowLocked=Monitor is now Locked.
chat.appliedenergistics2.isNowUnlocked=Monitor is now Unlocked.
@@ -19,6 +19,26 @@
}
]
},
{
"name": "appliedenergistics2:fluid_interface",
"conditions": [
{
"type": "appliedenergistics2:features",
"features": [
"fluid_interface"
]
}
],
"ingredient": [
{
"item": "appliedenergistics2:fluid_interface"
},
{
"type": "appliedenergistics2:part",
"part": "part.fluid_interface"
}
]
},
{
"name": "appliedenergistics2:knife",
"conditions": [
@@ -38,25 +58,6 @@
}
]
},
{
"name": "appliedenergistics2:wrench",
"conditions": [
{
"type": "appliedenergistics2:features",
"features": [
"quartz_wrench"
]
}
],
"ingredient": [
{
"item": "appliedenergistics2:certus_quartz_wrench"
},
{
"item": "appliedenergistics2:nether_quartz_wrench"
}
]
},
{
"name": "appliedenergistics2:cable",
"ingredient": [
@@ -12,7 +12,7 @@
"key": {
"b": {
"type": "appliedenergistics2:part",
"part": "material.engineering_processor"
"part": "material.calculation_processor"
},
"d": {
"item": "appliedenergistics2:quartz_glass"
@@ -12,7 +12,7 @@
"key": {
"b": {
"type": "appliedenergistics2:part",
"part": "material.engineering_processor"
"part": "material.calculation_processor"
},
"c": {
"type": "appliedenergistics2:part",
@@ -9,7 +9,7 @@
"item": "minecraft:sticky_piston"
},
{
"item": "#appliedenergistics2:interface"
"item": "#appliedenergistics2:fluid_interface"
},
{
"item": "minecraft:piston"
@@ -13,7 +13,8 @@
"ore": "chestWood"
},
{
"item": "#appliedenergistics2:wrench"
"type": "forge:ore_dict",
"ore": "itemQuartzWrench"
},
{
"type": "appliedenergistics2:part",