mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-20 20:22:33 +00:00
This should actually fix the lenses crashing MP.
This commit is contained in:
1 parent
7b14072628
commit
183ef6e353
3 files changed
+9
-9
No files matched your search
@@ -98,8 +98,8 @@ public class ClientProxy extends CommonProxy {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isClientPlayingMultiplayer() {
|
||||
return !Minecraft.getMinecraft().isIntegratedServerRunning();
|
||||
public long getWorldElapsedTicks() {
|
||||
return Minecraft.getMinecraft().theWorld == null ? 0 : Minecraft.getMinecraft().theWorld.getTotalWorldTime();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
*/
|
||||
package vazkii.botania.common.core.proxy;
|
||||
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import vazkii.botania.api.BotaniaAPI;
|
||||
@@ -72,9 +73,9 @@ public class CommonProxy {
|
||||
public void twigWandClientUpdate() {
|
||||
// NO-OP
|
||||
}
|
||||
|
||||
public boolean isClientPlayingMultiplayer() {
|
||||
return false;
|
||||
|
||||
public long getWorldElapsedTicks() {
|
||||
return MinecraftServer.getServer().worldServers[0].getTotalWorldTime();
|
||||
}
|
||||
|
||||
public void sparkleFX(World world, double x, double y, double z, float r, float g, float b, float size, int m) {
|
||||
|
||||
@@ -36,6 +36,7 @@ import vazkii.botania.api.internal.IManaBurst;
|
||||
import vazkii.botania.api.mana.BurstProperties;
|
||||
import vazkii.botania.api.mana.ILens;
|
||||
import vazkii.botania.client.core.helper.IconHelper;
|
||||
import vazkii.botania.common.Botania;
|
||||
import vazkii.botania.common.core.helper.ItemNBTHelper;
|
||||
import vazkii.botania.common.core.helper.Vector3;
|
||||
import vazkii.botania.common.lib.LibItemIDs;
|
||||
@@ -236,10 +237,8 @@ public class ItemLens extends ItemMod implements ILens {
|
||||
if(storedColor == -1)
|
||||
return 0xFFFFFF;
|
||||
|
||||
if(storedColor == 16) {
|
||||
World world = Minecraft.getMinecraft().theWorld;
|
||||
return world == null ? 0xFFFFFF : Color.HSBtoRGB(world.getTotalWorldTime() * 2 % 360 / 360F, 1F, 1F);
|
||||
}
|
||||
if(storedColor == 16)
|
||||
return Color.HSBtoRGB(Botania.proxy.getWorldElapsedTicks() * 2 % 360 / 360F, 1F, 1F);
|
||||
|
||||
float[] color = EntitySheep.fleeceColorTable[storedColor];
|
||||
return new Color(color[0], color[1], color[2]).getRGB();
|
||||
|
||||
Reference in new issue
Block a user