Skip to content

Commit

Permalink
NOT FIXED.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tombenpotter committed Jan 12, 2015
1 parent 6c342f4 commit a6f3217
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public void performEffect(IMasterRitualStone ritualStone) {
RitualUtils.placeInInventory(block, world, int3.xCoord, int3.yCoord, int3.zCoord, tileEntity);
}
world.setBlockToAir(int3.xCoord, int3.yCoord, int3.zCoord);
addParticles(world, int3);
if (world.isRemote) addParticles(world, int3);
SoulNetworkHandler.syphonFromNetwork(owner, getCostPerRefresh());
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public boolean isSNKnot() {
@Override
@SideOnly(Side.CLIENT)
public void onNetworkUpdate(BlockPostition originalPosition) {
addLinkingEffects();
if (worldObj.isRemote) addLinkingEffects();
}

@Override
Expand Down
16 changes: 7 additions & 9 deletions src/main/java/tombenpotter/sanguimancy/util/EventHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.server.MinecraftServer;
Expand Down Expand Up @@ -89,10 +88,7 @@ public void onPlayerSacrificed(LivingDeathEvent event) {
@SubscribeEvent
public void onPlayerJoinWorld(EntityJoinWorldEvent event) {
if (!event.entity.worldObj.isRemote && event.entity != null && event.entity instanceof EntityPlayer) {
EntityPlayerMP player = (EntityPlayerMP) event.entity;
if (SoulCorruptionHelper.getCorruptionLevel(player.getDisplayName()) > 0) return;
else SoulCorruptionHelper.negateCorruption(player.getDisplayName());

EntityPlayer player = (EntityPlayer) event.entity;
NBTTagCompound tag = RandomUtils.getModTag(player, Sanguimancy.modid);
if (!tag.getBoolean("hasInitialChunkClaimer")) {
player.addChatComponentMessage(new ChatComponentText(StatCollector.translateToLocal("chat.Sanguimancy.intial.claimer")));
Expand All @@ -113,7 +109,10 @@ public void onPlayerJoinWorld(EntityJoinWorldEvent event) {

@SubscribeEvent
public void onPlayerTick(TickEvent.PlayerTickEvent event) {
String playerName = event.player.getDisplayName();
String playerName;
if (!event.player.worldObj.isRemote) playerName = event.player.getDisplayName();
else playerName = Sanguimancy.proxy.getClientPlayer().getDisplayName();

if (SoulCorruptionHelper.isCorruptionOver(playerName, 10)) {
SoulCorruptionHelper.spawnChickenFollower(event.player);
}
Expand All @@ -132,9 +131,8 @@ public void onPlayerTick(TickEvent.PlayerTickEvent event) {
if (SoulCorruptionHelper.isCorruptionOver(playerName, 200)) {
SoulCorruptionHelper.loseHeart(event.player);
}

if (event.player.worldObj.getWorldTime() % 200 == 0 && !event.player.worldObj.isRemote) {
PacketHandler.INSTANCE.sendTo(new PacketSyncCorruption(event.player), (EntityPlayerMP) event.player);
if (event.player.worldObj.getWorldTime() % 200 == 0) {
PacketHandler.INSTANCE.sendToAll(new PacketSyncCorruption(playerName));
}
}

Expand Down

0 comments on commit a6f3217

Please sign in to comment.