Skip to content

Commit

Permalink
Merge branch 'rv5-1.11' into rv5-1.12
Browse files Browse the repository at this point in the history
# Conflicts:
#	forge_update.json
  • Loading branch information
thiakil committed Jul 19, 2017
2 parents cdef709 + e8e0fc1 commit 9a8585b
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 42 deletions.
7 changes: 4 additions & 3 deletions forge_update.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"rv5-alpha-1": "72fb550 update display name and filenames to better communicate this is a fork\nc1a1dd7 fix missing IC2 layer to make eu tunnel work again\na67ae19 temp fix for interface names. Member name clash between AE's interface and IWorldNameable on hasCustomName\n6e41ab2 disabled AE's iron nugget as it is now redundant\n4434fc4 disable old recipe file integrations for mods that never made it out of 1.7\ne63725d Refactor ICustomNameObject to prevent clash with MCP name\nbca4239 MCP!\nf302860 MCP\n065c7f8 allow storage cells to be disassembled in the offhand\n4cd0f01 remove AE item hiding (e.g. gold and iron dust) when another mod has the same items. Could cause problems down the 1.12 track. Also stops recipe warnings because it can't find the item\n7986e4d make gui items work in the off hand\n4dc6cbe add basic forge update file and a generator task. Update mod name to include my name to make it clear what version people are using\ne336f91 bump version in prep for next release\nebe9779 add updateJSON param to @mod too\n27cb02e refresh COFH api to use extracted version from 1.11 cofhcore jar. adds full API\n4402326 lowercases cofhapi ids for integration so we only use the official ones\n585f3df add buildcraft and cofh hammer support as integration modules. Includes PartPlacement changes which will need testing\n28369e3 fix NPE from hitVec trying to create a copy",
"rv5-alpha-2": "72384e2 Forge Energy Tunnel. Based on the RF tunnel. Does not cache the Energy handler as caps aren't meant to be cached.\n27f5752 missed registering sky chest tile\nf8221ef fix a couple more MCP mapping update errors\n1a8d1d3 reimplement villager trading\n7ace55a add new AEFeature for adding presses to villager trades, as level 2 trades. Allows for people who hate the meteors with a passion. Probably needs rebalance regarding emerald cost.\n267e3b3 fix some cases where AEItemStack was using ItemStack representation to compare or query things by using getDisplayStack instead\n8f3f1aa Separate out the IFMLLoadingPlugin implementation, for Sponge compat\ndc4eb81 Major IModel/IBakedModel refactor.\n0ff074d fix coremod test\n6845172 fix buildcraft calling onBlockAdded with a fake world before the server has started\n955502f add version check test\n5913f7d actually fix the BC error\nefbfe33 ItemHandlerAdapter - add ability to selectively send differences in this onTick call, so that any extra changes (e.g. compacting drawers) get picked up the next tick and not ignored by the network monitor.\n56b016f Fix Pattern Terminal pattern output item disappearing when using it to craft\nbee0e84 fix broken JEI packet handling which eats items in the pattern terminal if an exact match isn't found with the found recipe pattern item. Closes #7\n71c9559 Fix Condenser fluid inventory to actually report 10 buckets like the comment says instead of 10 mb\n0137e32 allow item handlers to extract from the Condenser (output slot only)\nb1c2a3c implement IInventory.isEmpty on the base IInventory tile class instead of on every subclass\nd97b94c Fix entities disappearing when transported with Spatial IO\n3b63d43 avoid teleporting log messages by forcibly removing the entity before teleporting it.\nfc9e2f6 allow FacingToRotation to load client side by using standard java vector maths to generate the matrix & add sideonly annotation to only remaining method with client only code\n8fb04ad Insert cells automatically when right clicking on drive front with in hand, and auto remove when shift clicking with empty hand.\nf5fd59f Use log4j2 class directly in the coremod, make the coremod and the main mod class a tad less chatty in default logger configs\n9e6dfee Attempt to limit entities like the code used to do\ndf29e34 Attempt to prevet a null pointer crash in ContainerCraftConfirm\n35e68c9 Add ic2 power accepting support to BasePoweredTiles & move IC2 & RF funcs to AEBasePoweredTile with stripping.\n7a7c81b Bail in network tool if Forge rightclick event says no\n90a9a92 Quartz Wrench - call neighbourChanged correctly\ncc5762a Replace a bunch of FAIL returns to not eat item interctions\n811f193 Fix P2P light tunnel failing on load.\n6b8b58d add some stack overflow protection to the energy grid cache\nc80bf64 Change Item P2P tunnel to use caps.\n16006a7 Force P2P tunnels to sync their DisplayName, should always display when set now.",
"rv5-alpha-3": "0650a03 update jei plugin to use not deprecated interfaces\nd2e439d properly check for block in facade recipe\n25fc5c8 allow any grid proxyable tile to give TOP its power/channel info as it's server side\nf8c37b1 register primed tiny tnt entity\n3433013 Let ItemHandlerAdapter refresh its provided cap on tick. IItemHandlers are not guaranteed to stay the same.\nc5df2f8 add untested hashing of item cap to Platform.generateTileHash\n8528883 I18n deprecation change\nbd42fc3 refactor ME Gui tooltip code to re-use an unused func and handle colours. Closes #10\n86ab433 let FE tunnel pull from input, and only give out cap if has input/output as relevant. Closes #9\n72a2bf4 fix resource location for tiny tnt\n487dfea name update & set basenames to use MC version\nbd342c4 build a better tile hash",
"rv5-alpha-5": "e54ac73 copy itemstack before shrinking it. Found by tyra314\nc4607e6 readme update\n9796ba4 readme update\n478cc6b sync all custom tile/part names to the client\nce0cb83 show tile/part custom names in Waila. Also returns IS.EMPTY instead of null in waila handlers\n526de10 make TOP display custom names separate from the item name like waila\nf1704c2 nerf the egg a little"
"rv5-alpha-5": "e54ac73 copy itemstack before shrinking it. Found by tyra314\nc4607e6 readme update\n9796ba4 readme update\n478cc6b sync all custom tile/part names to the client\nce0cb83 show tile/part custom names in Waila. Also returns IS.EMPTY instead of null in waila handlers\n526de10 make TOP display custom names separate from the item name like waila\nf1704c2 nerf the egg a little",
"rv5-beta-1": "5be1c53 Made Interface Terminals Tall\nf4c7b9b Added Search Box Mode Setting to Interface Terminal\n87e4711 1.11 fixes for paperpilot's PR\naa66d69 add safety for unconnected FE tunnel caps\n77d369a fix some attunement ids, add native ability for caps to set attunement for item/fluid/fe tunnels\n8f53444 actually run the preinit for integrations in preinit. Needed so recipe integrations load.\nf17914f readd mekanism integration\n520d92d remove explicit mekanism attunement, it adds it itself\n6a033f2 update mekanism recipes\n7dcbeb9 double the chest's internal buffer so it can accept stacks of items\nb109282 prevent npe in onItemUse in formation planes\n20af69c add option to remember the terminal search\n1c6744f Use ByteBufInputStream instead of ArrayIS on netowrk packets as they may not always be array backed. Fixes #24\n056e4aa add some extra error handling/stupid proofing\na5411ac log when itemhandler throws exception\nef79c25 try to inform the user when the crafting job throws an unhandled exception"
},
"1.12": {
"rv5-alpha-3": "9bcc120 missing sideonly fixes for ITooltipFlag\n14f1973 properly migrate storage biome to new registration system",
Expand All @@ -13,8 +14,8 @@
},
"homepage": "https://github.com/thiakil/Applied-Energistics-2/releases",
"promos": {
"1.11.2-latest": "rv5-alpha-5",
"1.11.2-recommended": "rv5-alpha-5",
"1.11.2-latest": "rv5-beta-1",
"1.11.2-recommended": "rv5-beta-1",
"1.12-latest": "rv5-alpha-5",
"1.12-recommended": "rv5-alpha-5"
}
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
aeversion=rv5
aechannel=alpha
aebuild=5
aechannel=beta
aebuild=1
aegroup=appeng
aebasename=applied-llamagistics

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@ public void onPacketData( final INetworkInfo manager, final INetHandler handler,
@Override
public void call( final AppEngPacket appEngPacket )
{
appEngPacket.clientPacketData( manager, appEngPacket, Minecraft.getMinecraft().player );
try{
appEngPacket.clientPacketData( manager, appEngPacket, Minecraft.getMinecraft().player );
} catch( Throwable t ){
AELog.error( "Packethandler threw an exception, please report!", t );
}
}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,12 @@ public void onPacketData( final INetworkInfo manager, final INetHandler handler,
@Override
public void call( final AppEngPacket appEngPacket )
{
appEngPacket.serverPacketData( manager, appEngPacket, player );
try
{
appEngPacket.serverPacketData( manager, appEngPacket, player );
} catch( Throwable t ){
AELog.error( "Packethandler threw an exception, please report!", t );
}
}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.text.TextComponentString;

import appeng.api.networking.IGrid;
import appeng.api.networking.IGridHost;
Expand Down Expand Up @@ -117,6 +118,7 @@ public void serverPacketData( final INetworkInfo manager, final AppEngPacket pac
}
catch( final Throwable e )
{
player.sendMessage( new TextComponentString( "Server side error occurred while trying to start craft." ) );
if( futureJob != null )
{
futureJob.cancel( true );
Expand Down
79 changes: 44 additions & 35 deletions src/main/java/appeng/parts/misc/ItemHandlerAdapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -121,51 +121,60 @@ public IAEItemStack extractItems( IAEItemStack request, Actionable mode, BaseAct

final boolean simulate = ( mode == Actionable.SIMULATE );

for( int i = 0; i < itemHandler.getSlots(); i++ )
try
{
ItemStack stackInInventorySlot = itemHandler.getStackInSlot( i );

if( !Platform.itemComparisons().isSameItem( stackInInventorySlot, requestedItemStack ) )
for( int i = 0; i < itemHandler.getSlots(); i++ )
{
continue;
}
ItemStack stackInInventorySlot = itemHandler.getStackInSlot( i );

ItemStack extracted;
int stackSizeCurrentSlot = stackInInventorySlot.getCount();
int remainingCurrentSlot = Math.min( remainingSize, stackSizeCurrentSlot );
if( !Platform.itemComparisons().isSameItem( stackInInventorySlot, requestedItemStack ) )
{
continue;
}

// We have to loop here because according to the docs, the handler shouldn't return a stack with size >
// maxSize, even if we request more. So even if it returns a valid stack, it might have more stuff.
do
{
extracted = itemHandler.extractItem( i, remainingCurrentSlot, simulate );
if (!extracted.isEmpty()) {
if (extracted.getCount() > remainingCurrentSlot) {
// Something broke. It should never return more than we requested...
// We're going to silently eat the remainder
AELog.warn("Mod that provided item handler %1 is broken. Returned %2 items, even though we requested %3.",
itemHandler.getClass().getSimpleName(), extracted.getCount(), remainingCurrentSlot);
extracted.setCount(remainingCurrentSlot);
}
ItemStack extracted;
int stackSizeCurrentSlot = stackInInventorySlot.getCount();
int remainingCurrentSlot = Math.min( remainingSize, stackSizeCurrentSlot );

// We're just gonna use the first stack we get our hands on as the template for the rest
if (gathered.isEmpty()) {
gathered = extracted;
} else {
gathered.grow(extracted.getCount());
// We have to loop here because according to the docs, the handler shouldn't return a stack with size >
// maxSize, even if we request more. So even if it returns a valid stack, it might have more stuff.
do
{
extracted = itemHandler.extractItem( i, remainingCurrentSlot, simulate );
if( !extracted.isEmpty() )
{
if( extracted.getCount() > remainingCurrentSlot )
{
// Something broke. It should never return more than we requested...
// We're going to silently eat the remainder
AELog.warn( "Mod that provided item handler %1 is broken. Returned %2 items, even though we requested %3.", itemHandler.getClass().getSimpleName(), extracted.getCount(), remainingCurrentSlot );
extracted.setCount( remainingCurrentSlot );
}

// We're just gonna use the first stack we get our hands on as the template for the rest
if( gathered.isEmpty() )
{
gathered = extracted;
}
else
{
gathered.grow( extracted.getCount() );
}
remainingCurrentSlot -= extracted.getCount();
}
remainingCurrentSlot -= extracted.getCount();
}
}
while(!extracted.isEmpty() && remainingCurrentSlot > 0 );
while( !extracted.isEmpty() && remainingCurrentSlot > 0 );

remainingSize -= stackSizeCurrentSlot - remainingCurrentSlot;
remainingSize -= stackSizeCurrentSlot - remainingCurrentSlot;

// Done?
if( remainingSize <= 0 )
{
break;
// Done?
if( remainingSize <= 0 )
{
break;
}
}
} catch (Throwable t) {
AELog.error("ItemHandler provided by "+itemHandler.getClass().getName()+" threw an exception, please report to them!", t);
}

if (!gathered.isEmpty()) {
Expand Down

0 comments on commit 9a8585b

Please sign in to comment.