mirror of
https://github.com/GTNewHorizons/Gadomancy.git
synced 2026-11-26 23:03:18 +00:00
- More fixxes..
- Version updated to 1.0.7.2
This commit is contained in:
1 parent
e5a54b24ca
commit
607bd414f5
7 files changed
+54
-20
No files matched your search
@@ -1,19 +1,14 @@
|
||||
package makeo.gadomancy.client.events;
|
||||
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.eventhandler.EventPriority;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.common.gameevent.TickEvent;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import io.netty.buffer.ByteBufInputStream;
|
||||
import io.netty.buffer.ByteBufOutputStream;
|
||||
import io.netty.buffer.Unpooled;
|
||||
import makeo.gadomancy.api.GadomancyApi;
|
||||
import makeo.gadomancy.api.golems.cores.AdditionalGolemCore;
|
||||
import makeo.gadomancy.client.gui.GuiResearchRecipeAuraEffects;
|
||||
import makeo.gadomancy.client.util.ExtendedTypeDisplayManager;
|
||||
import makeo.gadomancy.client.util.FamiliarHandlerClient;
|
||||
import makeo.gadomancy.client.util.MultiTickEffectDispatcher;
|
||||
import makeo.gadomancy.common.CommonProxy;
|
||||
import makeo.gadomancy.common.Gadomancy;
|
||||
import makeo.gadomancy.common.blocks.tiles.TileExtendedNode;
|
||||
import makeo.gadomancy.common.blocks.tiles.TileExtendedNodeJar;
|
||||
@@ -27,20 +22,15 @@ import makeo.gadomancy.common.utils.Vector3;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GLAllocation;
|
||||
import net.minecraft.client.renderer.texture.SimpleTexture;
|
||||
import net.minecraft.client.resources.SimpleResource;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTBase;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.server.integrated.IntegratedServer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraftforge.client.event.*;
|
||||
import net.minecraftforge.client.model.AdvancedModelLoader;
|
||||
import net.minecraftforge.client.model.IModelCustom;
|
||||
import net.minecraftforge.client.model.obj.WavefrontObject;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
@@ -56,12 +46,6 @@ import thaumcraft.common.entities.golems.EntityGolemBase;
|
||||
import thaumcraft.common.items.relics.ItemThaumometer;
|
||||
import thaumcraft.common.items.wands.ItemWandCasting;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.OutputStreamWriter;
|
||||
import java.nio.charset.Charset;
|
||||
import java.util.ArrayList;
|
||||
import java.util.zip.GZIPInputStream;
|
||||
@@ -251,8 +235,8 @@ public class RenderEventHandler {
|
||||
@SubscribeEvent
|
||||
public void onRender(RenderPlayerEvent.Specials.Post event) {
|
||||
if(event.entityPlayer == null) return;
|
||||
if(!FMLCommonHandler.instance().getMinecraftServerInstance().isServerInOnlineMode()) return;
|
||||
if(obj == null) return;
|
||||
if(!CommonProxy.serverOnlineState) return;
|
||||
if(!MiscUtils.isMisunderstood(event.entityPlayer)) return;
|
||||
|
||||
GL11.glColor4f(1f, 1f, 1f, 1f);
|
||||
|
||||
@@ -43,6 +43,9 @@ import java.util.List;
|
||||
* Created by makeo @ 29.11.2014 14:18
|
||||
*/
|
||||
public class CommonProxy implements IGuiHandler {
|
||||
|
||||
public static boolean serverOnlineState = false;
|
||||
|
||||
public static final EventHandlerGolem EVENT_HANDLER_GOLEM = new EventHandlerGolem();
|
||||
|
||||
public void onConstruct() { }
|
||||
|
||||
@@ -28,7 +28,7 @@ public class Gadomancy {
|
||||
public static final String MODID = "gadomancy";
|
||||
public static final String NAME = "Gadomancy";
|
||||
|
||||
public static final String VERSION = "1.0.7.1";
|
||||
public static final String VERSION = "1.0.7.2";
|
||||
|
||||
private static final String PROXY_CLIENT = "makeo.gadomancy.client.ClientProxy";
|
||||
private static final String PROXY_SERVER = "makeo.gadomancy.common.CommonProxy";
|
||||
|
||||
@@ -8,10 +8,12 @@ import makeo.gadomancy.common.data.SyncDataHolder;
|
||||
import makeo.gadomancy.common.network.PacketHandler;
|
||||
import makeo.gadomancy.common.network.packets.PacketSyncConfigs;
|
||||
import makeo.gadomancy.common.network.packets.PacketUpdateGolemTypeOrder;
|
||||
import makeo.gadomancy.common.network.packets.PacketUpdateOnlineState;
|
||||
import makeo.gadomancy.common.utils.GolemEnumHelper;
|
||||
import makeo.gadomancy.common.utils.world.TCMazeHandler;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
|
||||
/**
|
||||
* This class is part of the Gadomancy Mod
|
||||
@@ -29,6 +31,7 @@ public class EventHandlerNetwork {
|
||||
EntityPlayerMP p = (EntityPlayerMP) e.player;
|
||||
PacketHandler.INSTANCE.sendTo(new PacketUpdateGolemTypeOrder(GolemEnumHelper.getCurrentMapping()), p);
|
||||
PacketHandler.INSTANCE.sendTo(new PacketSyncConfigs(), p);
|
||||
PacketHandler.INSTANCE.sendTo(new PacketUpdateOnlineState(MinecraftServer.getServer().isServerInOnlineMode()), p);
|
||||
((DataFamiliar) SyncDataHolder.getDataServer("FamiliarData")).checkPlayerEquipment(p);
|
||||
((DataAchromatic) SyncDataHolder.getDataServer("AchromaticData")).checkPotionEffect(p);
|
||||
SyncDataHolder.syncAllDataTo(p);
|
||||
|
||||
@@ -36,5 +36,6 @@ public class PacketHandler {
|
||||
//Sync data
|
||||
INSTANCE.registerMessage(PacketSyncConfigs.class, PacketSyncConfigs.class, id++, Side.CLIENT);
|
||||
INSTANCE.registerMessage(PacketSyncData.class, PacketSyncData.class, id++, Side.CLIENT);
|
||||
INSTANCE.registerMessage(PacketUpdateOnlineState.class, PacketUpdateOnlineState.class, id++, Side.CLIENT);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package makeo.gadomancy.common.network.packets;
|
||||
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessage;
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
|
||||
import cpw.mods.fml.common.network.simpleimpl.MessageContext;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import makeo.gadomancy.common.CommonProxy;
|
||||
|
||||
/**
|
||||
* This class is part of the Gadomancy Mod
|
||||
* Gadomancy is Open Source and distributed under the
|
||||
* GNU LESSER GENERAL PUBLIC LICENSE
|
||||
* for more read the LICENSE file
|
||||
* <p/>
|
||||
* Created by HellFirePvP @ 07.07.2016 / 21:46
|
||||
*/
|
||||
public class PacketUpdateOnlineState implements IMessage, IMessageHandler<PacketUpdateOnlineState, IMessage> {
|
||||
|
||||
private boolean state;
|
||||
|
||||
public PacketUpdateOnlineState() {}
|
||||
|
||||
public PacketUpdateOnlineState(boolean state) {
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fromBytes(ByteBuf buf) {
|
||||
state = buf.readBoolean();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void toBytes(ByteBuf buf) {
|
||||
buf.writeBoolean(state);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMessage onMessage(PacketUpdateOnlineState message, MessageContext ctx) {
|
||||
CommonProxy.serverOnlineState = message.state;
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user