more attempts at thaum render fixes
This commit is contained in:
parent
5dcb80da18
commit
010cca1c66
4 changed files with 90 additions and 92 deletions
|
@ -1,5 +1,10 @@
|
|||
package net.machinemuse.powersuits.client;
|
||||
|
||||
import cpw.mods.fml.client.registry.ClientRegistry;
|
||||
import cpw.mods.fml.client.registry.KeyBindingRegistry;
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import cpw.mods.fml.common.registry.TickRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import net.machinemuse.general.sound.SoundLoader;
|
||||
import net.machinemuse.powersuits.block.TileEntityLuxCapacitor;
|
||||
import net.machinemuse.powersuits.block.TileEntityTinkerTable;
|
||||
|
@ -20,18 +25,12 @@ import net.machinemuse.powersuits.tick.PlayerTickHandler;
|
|||
import net.machinemuse.powersuits.tick.RenderTickHandler;
|
||||
import net.minecraftforge.client.MinecraftForgeClient;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import cpw.mods.fml.client.registry.ClientRegistry;
|
||||
import cpw.mods.fml.client.registry.KeyBindingRegistry;
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import cpw.mods.fml.common.registry.TickRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
|
||||
/**
|
||||
* The Client Proxy does all the things that should only be done client-side,
|
||||
* like registering client-side handlers and renderers.
|
||||
*
|
||||
* @author MachineMuse
|
||||
*
|
||||
*/
|
||||
public class ClientProxy extends CommonProxy {
|
||||
private static ToolRenderer toolRenderer;
|
||||
|
@ -41,8 +40,11 @@ public class ClientProxy extends CommonProxy {
|
|||
public static KeybindKeyHandler keybindHandler;
|
||||
|
||||
@Override
|
||||
public void registerSounds() {
|
||||
public void registerEvents() {
|
||||
MinecraftForge.EVENT_BUS.register(new SoundLoader());
|
||||
if (ModCompatability.isThaumCraftLoaded() && ModCompatability.enableThaumGogglesModule()) {
|
||||
MinecraftForge.EVENT_BUS.register(new ThaumRenderEventHandler());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -94,11 +96,6 @@ public class ClientProxy extends CommonProxy {
|
|||
clientTickHandler = new ClientTickHandler();
|
||||
TickRegistry.registerTickHandler(clientTickHandler, Side.CLIENT);
|
||||
|
||||
MinecraftForge.EVENT_BUS.register(new SoundLoader());
|
||||
|
||||
if (ModCompatability.isThaumCraftLoaded() && ModCompatability.enableThaumGogglesModule()) {
|
||||
MinecraftForge.EVENT_BUS.register(new ThaumRenderEventHandler());
|
||||
}
|
||||
|
||||
packetHandler = new MusePacketHandler().register();
|
||||
}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package net.machinemuse.powersuits.common;
|
||||
|
||||
import net.machinemuse.powersuits.network.MusePacketHandler;
|
||||
import net.machinemuse.powersuits.tick.PlayerTickHandler;
|
||||
import cpw.mods.fml.common.registry.TickRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import net.machinemuse.powersuits.network.MusePacketHandler;
|
||||
import net.machinemuse.powersuits.tick.PlayerTickHandler;
|
||||
|
||||
/**
|
||||
* Server side of the CommonProxy/ClientProxy paradigm. Provides functions which
|
||||
|
@ -11,7 +11,6 @@ import cpw.mods.fml.relauncher.Side;
|
|||
* server.
|
||||
*
|
||||
* @author MachineMuse
|
||||
*
|
||||
*/
|
||||
public class CommonProxy {
|
||||
public static String ITEMS_PNG = "/tutorial/generic/items.png";
|
||||
|
@ -20,7 +19,7 @@ public class CommonProxy {
|
|||
public static MusePacketHandler packetHandler;
|
||||
public static PlayerTickHandler playerTickHandler;
|
||||
|
||||
public void registerSounds() {
|
||||
public void registerEvents() {
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -92,7 +92,7 @@ public class ModularPowersuits {
|
|||
Config.init(new Configuration(event.getSuggestedConfigurationFile()));
|
||||
MinecraftForge.EVENT_BUS.register(new EventHandler());
|
||||
MinecraftForge.EVENT_BUS.register(new MovementManager());
|
||||
proxy.registerSounds();
|
||||
proxy.registerEvents();
|
||||
}
|
||||
|
||||
public static Config config;
|
||||
|
|
|
@ -35,6 +35,8 @@ public class ThaumRenderEventHandler {
|
|||
@SideOnly(Side.CLIENT)
|
||||
@ForgeSubscribe
|
||||
public void renderLast(RenderWorldLastEvent event) {
|
||||
float tagscale = getTagScale();
|
||||
if (tagscale > 0.0F) setTagScale(tagscale - 0.005F);
|
||||
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
|
||||
if (player != null && player.inventory.armorItemInSlot(3) != null && player.inventory.armorItemInSlot(3).getItem() instanceof IModularItem) {
|
||||
ItemStack stack = player.inventory.armorItemInSlot(3);
|
||||
|
|
Loading…
Reference in a new issue