Fixed a server crash caused by the fix for a server crash.

This commit is contained in:
Vasco Lavos committed 2014-01-10 22:55:18 +00:00
1 parent 14293ab3f0
commit 669de63e50
4 files changed
+16 -5

No files matched your search

@@ -14,6 +14,7 @@
*/
package vazkii.tinkerer.client.core.proxy;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumRarity;
import net.minecraft.world.World;
import net.minecraftforge.client.EnumHelperClient;
@@ -131,5 +132,10 @@ public class TTClientProxy extends TTCommonProxy {
public boolean isClient() {
return true;
}
@Override
public EntityPlayer getClientPlayer() {
return ClientHelper.clientPlayer();
}
}
@@ -14,6 +14,7 @@
*/
package vazkii.tinkerer.common.core.proxy;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
import net.minecraftforge.common.MinecraftForge;
import thaumcraft.common.tiles.TileAlembic;
@@ -107,6 +108,10 @@ public class TTCommonProxy {
public boolean isClient() {
return false;
}
public EntityPlayer getClientPlayer() {
return null;
}
public void shadowSparkle(World world, float x, float y, float z, int size) {
// NO-OP
@@ -15,6 +15,7 @@ import thaumcraft.common.config.Config;
import thaumcraft.common.items.wands.ItemWandCasting;
import vazkii.tinkerer.client.core.helper.ClientHelper;
import vazkii.tinkerer.client.core.proxy.TTClientProxy;
import vazkii.tinkerer.common.ThaumicTinkerer;
import vazkii.tinkerer.common.core.helper.ExperienceHelper;
import vazkii.tinkerer.common.item.foci.ItemModFocus;
import cpw.mods.fml.relauncher.Side;
@@ -71,10 +72,9 @@ public class ItemFocusXPDrain extends ItemModFocus {
}
@Override
@SideOnly(Side.CLIENT)
public int getFocusColor() {
EntityPlayer player = ClientHelper.clientPlayer();
return Color.HSBtoRGB(player.ticksExisted * 2 % 360 / 360F, 1F, 1F);
EntityPlayer player = ThaumicTinkerer.proxy.getClientPlayer();
return player == null ? 0xFFFFFF : Color.HSBtoRGB(player.ticksExisted * 2 % 360 / 360F, 1F, 1F);
}
int getXpUse(ItemStack stack) {
+2 -2
View File
@@ -1,6 +1,6 @@
#Fri, 10 Jan 2014 22:03:14 +0000
#Fri, 10 Jan 2014 22:54:56 +0000
version=2.1
build_number=62
build_number=63
mc_version=1.6.4
mod_name=ThaumicTinkerer
dir.repo=./