aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/core/proxy/ClientProxy.java
blob: cc165e2d78c86b08d5c16ec21601cf4f3b1ec16a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
package gtPlusPlus.core.proxy;

import cpw.mods.fml.client.registry.RenderingRegistry;
import cpw.mods.fml.common.event.*;
import gtPlusPlus.GTplusplus;
import gtPlusPlus.core.common.CommonProxy;
import gtPlusPlus.core.util.particles.EntityParticleFXMysterious;
import net.minecraft.client.Minecraft;
import net.minecraft.client.particle.EntityFX;
import net.minecraft.entity.Entity;

public class ClientProxy extends CommonProxy {

	@Override
	public int addArmor(final String armor) {
		return RenderingRegistry.addNewArmourRendererPrefix(armor);
	}

	@Override
	public void generateMysteriousParticles(final Entity theEntity) {
		final double motionX = theEntity.worldObj.rand.nextGaussian() * 0.02D;
		final double motionY = theEntity.worldObj.rand.nextGaussian() * 0.02D;
		final double motionZ = theEntity.worldObj.rand.nextGaussian() * 0.02D;
		final EntityFX particleMysterious = new EntityParticleFXMysterious(

				theEntity.worldObj, theEntity.posX + theEntity.worldObj.rand.nextFloat() * theEntity.width

						* 2.0F - theEntity.width,
				theEntity.posY + 0.5D + theEntity.worldObj.rand.nextFloat()

						* theEntity.height,
				theEntity.posZ + theEntity.worldObj.rand.nextFloat() * theEntity.width

						* 2.0F - theEntity.width,

				motionX,

				motionY,

				motionZ);
		Minecraft.getMinecraft().effectRenderer.addEffect(particleMysterious);
	}

	@Override
	public void init(final FMLInitializationEvent e) {
		// TODO Auto-generated method stub
		super.init(e);
	}

	@Override
	public void postInit(final FMLPostInitializationEvent e) {
		// TODO Auto-generated method stub
		super.postInit(e);
	}

	@Override
	public void preInit(final FMLPreInitializationEvent e) {
		// TODO Auto-generated method stub
		super.preInit(e);
		// Do this weird things for textures.
		GTplusplus.loadTextures();
	}

	@Override
	public void registerRenderThings() {
		// MinecraftForgeClient.registerItemRenderer(ModItems.FluidCell.getItem(),
		// new RenderLiquidCell());
		// RenderingRegistry.registerEntityRenderingHandler(EntityBloodSteelMob.class,
		// new RenderBloodSteelMob(new ModelBloodSteelMob(), 0));
		// RenderingRegistry.registerEntityRenderingHandler(EntityBloodSteelHostileMob.class,
		// new RenderBloodSteelMobHostile(new ModelBloodSteelMob(), 0));
		// RenderingRegistry.registerEntityRenderingHandler(EntityGrenade.class,
		// new RenderSnowball(ModItems.tutGrenade));

		// ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBloodSteelChest.class,
		// new BloodSteelChestRenderer());
		// MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ModBlocks.tutChest),
		// new ItemRenderBloodSteelChest());
	}

	@Override
	public void serverStarting(final FMLServerStartingEvent e) {

	}

}