From 3967b8155fad9767517415fcac5082b2a520ce7a Mon Sep 17 00:00:00 2001 From: Draknyte1 Date: Mon, 18 Jul 2016 02:14:48 +1000 Subject: + Added a custom Particle. % More methods added to Utils.java --- src/Java/miscutil/core/proxy/ClientProxy.java | 43 +++++++++++++++++++++++++-- 1 file changed, 40 insertions(+), 3 deletions(-) (limited to 'src/Java/miscutil/core/proxy') diff --git a/src/Java/miscutil/core/proxy/ClientProxy.java b/src/Java/miscutil/core/proxy/ClientProxy.java index 2e754b9bf0..aa1ab99ced 100644 --- a/src/Java/miscutil/core/proxy/ClientProxy.java +++ b/src/Java/miscutil/core/proxy/ClientProxy.java @@ -1,6 +1,10 @@ package miscutil.core.proxy; import miscutil.core.common.CommonProxy; +import miscutil.core.util.particles.EntityParticleFXMysterious; +import net.minecraft.client.Minecraft; +import net.minecraft.client.particle.EntityFX; +import net.minecraft.entity.Entity; import cpw.mods.fml.client.registry.RenderingRegistry; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent; @@ -25,18 +29,51 @@ public class ClientProxy extends CommonProxy{ // TODO Auto-generated method stub super.postInit(e); } - + + @Override public void registerRenderThings(){ //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 int addArmor(String armor){ return RenderingRegistry.addNewArmourRendererPrefix(armor); } + + + @Override + public void generateMysteriousParticles(Entity theEntity) + { + double motionX = theEntity.worldObj.rand.nextGaussian() * 0.02D; + double motionY = theEntity.worldObj.rand.nextGaussian() * 0.02D; + double motionZ = theEntity.worldObj.rand.nextGaussian() * 0.02D; + 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); + } + + + } -- cgit