1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2024-10-02 17:00:47 +00:00

Fix CraftTweaker actions being applied twice

By default CT applies them on the client and server. In a single player
world, this means we try to create two upgrades, which obviously fails!

Fixes #721
This commit is contained in:
Jonathan Coates 2021-06-22 19:38:30 +01:00
parent df7a40354e
commit 9bd662d8dc
No known key found for this signature in database
GPG Key ID: B9E431FF07C98D06

View File

@ -106,7 +106,10 @@ public class AddTurtleTool implements IUndoableAction
if( craftItem.isEmpty() ) trackLog.error( "Crafting item stack is empty." );
if( craftItem.hasTag() && !craftItem.getTag().isEmpty() ) trackLog.warning( "Crafting item has NBT." );
if( craftItem.isDamaged() || craftItem.isEnchanted() || craftItem.hasCustomHoverName() )
{
trackLog.warning( "Crafting item has NBT." );
}
if( toolItem.isEmpty() ) trackLog.error( "Tool item stack is empty." );
if( !kinds.containsKey( kind ) ) trackLog.error( String.format( "Unknown kind '%s'.", kind ) );
@ -122,6 +125,6 @@ public class AddTurtleTool implements IUndoableAction
@Override
public boolean shouldApplyOn( LogicalSide side )
{
return true;
return shouldApplySingletons();
}
}