This commit is contained in:
Cricket committed 2015-01-27 09:56:28 -05:00
1 parent 512c6d092d
commit 46f8519829
6 files changed
+182 -55

No files matched your search

@@ -1,7 +1,14 @@
package com.cricketcraft.chisel.client;
import java.util.Random;
import com.cricketcraft.chisel.block.BlockGrimstone;
import com.cricketcraft.chisel.block.BlockHolystone;
import com.cricketcraft.chisel.block.BlockLavastone;
import com.cricketcraft.chisel.block.BlockSnakestoneObsidian;
import com.cricketcraft.chisel.block.tileentity.TileEntityAutoChisel;
import com.cricketcraft.chisel.carving.Carving;
import com.cricketcraft.chisel.config.Configurations;
import com.cricketcraft.chisel.entity.fx.*;
import com.cricketcraft.chisel.utils.GeneralClient;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.EntityPlayerSP;
@@ -12,18 +19,7 @@ import net.minecraft.entity.Entity;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import com.cricketcraft.chisel.block.BlockGrimstone;
import com.cricketcraft.chisel.block.BlockHolystone;
import com.cricketcraft.chisel.block.BlockLavastone;
import com.cricketcraft.chisel.block.BlockSnakestoneObsidian;
import com.cricketcraft.chisel.block.tileentity.TileEntityAutoChisel;
import com.cricketcraft.chisel.carving.Carving;
import com.cricketcraft.chisel.config.Configurations;
import com.cricketcraft.chisel.entity.fx.EntityBallOMossFX;
import com.cricketcraft.chisel.entity.fx.EntityGrimstoneFX;
import com.cricketcraft.chisel.entity.fx.EntityHolystoneFX;
import com.cricketcraft.chisel.entity.fx.EntitySnakestoneObsidianFX;
import com.cricketcraft.chisel.utils.GeneralClient;
import java.util.Random;
public class GeneralChiselClient {
@@ -171,6 +167,11 @@ public class GeneralChiselClient {
}
}
public static void spawnCricketFX(World world, double x, double y, double z) {
EntityCricketFX cricket = new EntityCricketFX(world, x, y, z);
Minecraft.getMinecraft().effectRenderer.addEffect(cricket);
}
public static void spawnBallOMossFX(World world, double x, double y, double z) {
if (Configurations.particlesTickrate == 0 || tick++ % Configurations.particlesTickrate == 0) {
EntityBallOMossFX res = new EntityBallOMossFX(world, x, y, z);
@@ -0,0 +1,38 @@
package com.cricketcraft.chisel.client.player;
import com.cricketcraft.chisel.client.GeneralChiselClient;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.eventhandler.EventPriority;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.model.ModelRenderer;
import net.minecraftforge.client.event.RenderPlayerEvent;
import org.lwjgl.opengl.GL11;
@SideOnly(Side.CLIENT)
public class PlayerSpecials {
public PlayerSpecials() {
FMLCommonHandler.instance().bus().register(this);
}
@SubscribeEvent(priority = EventPriority.HIGHEST)
public void renderCricket(RenderPlayerEvent event) {
if (!"TheCricket26".equals(event.entityPlayer.getDisplayName())) {
return;
}
if (event.entityPlayer.isInvisible()) {
return;
}
ModelRenderer body = null;
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
GL11.glPushMatrix();
GeneralChiselClient.spawnCricketFX(event.entityPlayer.getEntityWorld(), event.entityPlayer.posX, event.entityPlayer.posY, event.entityPlayer.posZ);
GL11.glPopMatrix();
}
}