mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-06-20 15:34:12 +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:
parent
df7a40354e
commit
9bd662d8dc
@ -106,7 +106,10 @@ public class AddTurtleTool implements IUndoableAction
|
|||||||
|
|
||||||
if( craftItem.isEmpty() ) trackLog.error( "Crafting item stack is empty." );
|
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( toolItem.isEmpty() ) trackLog.error( "Tool item stack is empty." );
|
||||||
|
|
||||||
if( !kinds.containsKey( kind ) ) trackLog.error( String.format( "Unknown kind '%s'.", kind ) );
|
if( !kinds.containsKey( kind ) ) trackLog.error( String.format( "Unknown kind '%s'.", kind ) );
|
||||||
@ -122,6 +125,6 @@ public class AddTurtleTool implements IUndoableAction
|
|||||||
@Override
|
@Override
|
||||||
public boolean shouldApplyOn( LogicalSide side )
|
public boolean shouldApplyOn( LogicalSide side )
|
||||||
{
|
{
|
||||||
return true;
|
return shouldApplySingletons();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user