Skip to content

Commit

Permalink
Whoops, I need to balance start end end.
Browse files Browse the repository at this point in the history
  • Loading branch information
AlgorithmX2 committed Oct 5, 2016
1 parent ea17b83 commit fc9e744
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/main/java/mod/chiselsandbits/client/UndoTracker.java
Expand Up @@ -17,6 +17,7 @@
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.text.TextComponentTranslation;
import net.minecraft.world.World;
import net.minecraftforge.fml.common.FMLCommonHandler;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;

Expand Down Expand Up @@ -206,10 +207,16 @@ private boolean replaySingleAction(
}
}

public boolean ignorePlayer(
final EntityPlayer player )
{
return player.worldObj == null || !player.worldObj.isRemote || FMLCommonHandler.instance().getEffectiveSide() == Side.SERVER;
}

public void beginGroup(
final EntityPlayer player )
{
if ( player.worldObj == null || !player.worldObj.isRemote )
if ( ignorePlayer( player ) )
{
// don't touch this stuff if your a server.
return;
Expand All @@ -231,7 +238,7 @@ public void beginGroup(
public void endGroup(
final EntityPlayer player )
{
if ( player.isServerWorld() )
if ( ignorePlayer( player ) )
{
// don't touch this stuff if your a server.
return;
Expand Down

0 comments on commit fc9e744

Please sign in to comment.