mirror of
https://github.com/GTNewHorizons/Chisel.git
synced 2026-11-11 15:57:31 +00:00
Remove the BlockSpikes related stuff, it's unused (?)
This commit is contained in:
1 parent
f04aeb3d89
commit
e48e362a0a
3 files changed
+4
-201
No files matched your search
@@ -1,80 +0,0 @@
|
||||
package com.cricketcraft.chisel.block;
|
||||
|
||||
import com.cricketcraft.chisel.Configurations;
|
||||
import com.cricketcraft.chisel.client.GeneralChiselClient;
|
||||
import com.cricketcraft.chisel.client.render.BlockSpikesRenderer;
|
||||
import com.cricketcraft.chisel.utils.General;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
|
||||
public class BlockSpikes extends Block
|
||||
{
|
||||
public IIcon iconBase;
|
||||
public IIcon iconSpike;
|
||||
|
||||
public BlockSpikes(Material mat)
|
||||
{
|
||||
super(Material.circuits);
|
||||
|
||||
this.setCreativeTab(CreativeTabs.tabDecorations);
|
||||
this.setBlockBounds(0.0f, 0.0f, 0.0f, 1.0f, 1.0f / 16, 1.0f);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEntityCollidedWithBlock(World world, int x, int y, int z, Entity entity)
|
||||
{
|
||||
if(FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT)
|
||||
return;
|
||||
|
||||
double dy = entity.posY - entity.prevPosY;
|
||||
|
||||
GeneralChiselClient.speedupPlayer(world, entity, Configurations.concreteVelocity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean renderAsNormalBlock()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType()
|
||||
{
|
||||
return BlockSpikesRenderer.id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int damageDropped(int meta)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerBlockIcons(IIconRegister register)
|
||||
{
|
||||
blockIcon = iconBase = register.registerIcon(General.getName(this) + "base");
|
||||
iconSpike = register.registerIcon(General.getName(this) + "spike");
|
||||
}
|
||||
}
|
||||
@@ -1,116 +0,0 @@
|
||||
package com.cricketcraft.chisel.client.render;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import com.cricketcraft.chisel.init.ModBlocks;
|
||||
import com.cricketcraft.chisel.utils.Drawing;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
|
||||
public class BlockSpikesRenderer implements ISimpleBlockRenderingHandler
|
||||
{
|
||||
public static int id;
|
||||
|
||||
public BlockSpikesRenderer()
|
||||
{
|
||||
id = RenderingRegistry.getNextAvailableRenderId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderInventoryBlock(Block block, int meta, int modelID, RenderBlocks renderer)
|
||||
{
|
||||
Drawing.drawBlock(block, meta, renderer);
|
||||
}
|
||||
|
||||
void drawSpike(IIcon icon, double r, double h, double x, double y, double z, double dx, double dz)
|
||||
{
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
|
||||
double u0 = icon.getMinU();
|
||||
double u1 = icon.getMaxU();
|
||||
double v0 = icon.getMaxV();
|
||||
double v1 = icon.getMinV();
|
||||
|
||||
double tx = x + dx;
|
||||
double ty = y + h;
|
||||
double tz = z + dz;
|
||||
|
||||
tessellator.addVertexWithUV(x + r, y + 0, z + r, u0, v0);
|
||||
tessellator.addVertexWithUV(x + r, y + 0, z - r, u1, v0);
|
||||
tessellator.addVertexWithUV(tx, ty, tz, u1, v1);
|
||||
tessellator.addVertexWithUV(tx, ty, tz, u0, v1);
|
||||
|
||||
tessellator.addVertexWithUV(x - r, y + 0, z + r, u1, v0);
|
||||
tessellator.addVertexWithUV(x + r, y + 0, z + r, u0, v0);
|
||||
tessellator.addVertexWithUV(tx, ty, tz, u1, v1);
|
||||
tessellator.addVertexWithUV(tx, ty, tz, u0, v1);
|
||||
|
||||
|
||||
tessellator.addVertexWithUV(x + r, y + 0, z - r, u1, v0);
|
||||
tessellator.addVertexWithUV(x - r, y + 0, z - r, u0, v0);
|
||||
tessellator.addVertexWithUV(tx, ty, tz, u1, v1);
|
||||
tessellator.addVertexWithUV(tx, ty, tz, u0, v1);
|
||||
|
||||
tessellator.addVertexWithUV(x - r, y + 0, z - r, u1, v0);
|
||||
tessellator.addVertexWithUV(x - r, y + 0, z + r, u0, v0);
|
||||
tessellator.addVertexWithUV(tx, ty, tz, u1, v1);
|
||||
tessellator.addVertexWithUV(tx, ty, tz, u0, v1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer)
|
||||
{
|
||||
renderer.renderStandardBlock(block, x, y, z);
|
||||
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
//IIcon icon = ModBlocks.spikeTrap.iconSpike;
|
||||
|
||||
double d = 1.5 / 16;
|
||||
double r = d / 2;
|
||||
|
||||
double skew = 0.5;
|
||||
|
||||
// tessellator.setBrightness(block.getMixedBrightnessForBlock(world, x, y, z));
|
||||
tessellator.addTranslation(0, 1.0f / 16, 0);
|
||||
|
||||
Random rand = new Random();
|
||||
for(int xx = 0; xx < 4; xx++)
|
||||
{
|
||||
for(int yy = 0; yy < 4; yy++)
|
||||
{
|
||||
// float sx=1.0f/16+rand.nextFloat()*13.0f/16;
|
||||
// float sz=1.0f/16+rand.nextFloat()*13.0f/16;
|
||||
float sx = (2.0f + (12.0f - (float) d) * xx / 3) / 16;
|
||||
float sz = (2.0f + (12.0f - (float) d) * yy / 3) / 16;
|
||||
|
||||
|
||||
tessellator.addTranslation(sx, 0, sz);
|
||||
//drawSpike(icon, r, 0.5 + rand.nextDouble() * 0.35, x, y, z, rand.nextDouble() * skew - skew / 2, rand.nextDouble() * skew - skew / 2);
|
||||
tessellator.addTranslation(-sx, 0, -sz);
|
||||
}
|
||||
}
|
||||
|
||||
tessellator.addTranslation(0, -1.0f / 16, 0);
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldRender3DInInventory(int renderId)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,9 @@
|
||||
package com.cricketcraft.chisel.proxy;
|
||||
|
||||
import net.minecraft.client.renderer.entity.RenderSnowball;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraftforge.client.MinecraftForgeClient;
|
||||
|
||||
import com.cricketcraft.chisel.block.tileentity.TileEntityAutoChisel;
|
||||
import com.cricketcraft.chisel.block.tileentity.TileEntityPresent;
|
||||
import com.cricketcraft.chisel.client.render.BlockAdvancedMarbleRenderer;
|
||||
@@ -11,7 +15,6 @@ import com.cricketcraft.chisel.client.render.BlockMarbleStairsRenderer;
|
||||
import com.cricketcraft.chisel.client.render.BlockNoCTMRenderer;
|
||||
import com.cricketcraft.chisel.client.render.BlockRoadLineRenderer;
|
||||
import com.cricketcraft.chisel.client.render.BlockSnakeStoneRenderer;
|
||||
import com.cricketcraft.chisel.client.render.BlockSpikesRenderer;
|
||||
import com.cricketcraft.chisel.client.render.BlockTexturedOreRenderer;
|
||||
import com.cricketcraft.chisel.client.render.item.ItemAutoChiselRenderer;
|
||||
import com.cricketcraft.chisel.client.render.item.ItemChiselRenderer;
|
||||
@@ -24,9 +27,6 @@ import com.cricketcraft.chisel.entity.EntitySmashingRock;
|
||||
import com.cricketcraft.chisel.init.ModBlocks;
|
||||
import com.cricketcraft.chisel.init.ModItems;
|
||||
|
||||
import net.minecraft.client.renderer.entity.RenderSnowball;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraftforge.client.MinecraftForgeClient;
|
||||
import cpw.mods.fml.client.registry.ClientRegistry;
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
|
||||
@@ -47,7 +47,6 @@ public class ClientProxy extends CommonProxy
|
||||
RenderingRegistry.registerBlockHandler(new BlockRoadLineRenderer());
|
||||
RenderingRegistry.registerBlockHandler(new BlockSnakeStoneRenderer());
|
||||
RenderingRegistry.registerBlockHandler(new BlockNoCTMRenderer());
|
||||
RenderingRegistry.registerBlockHandler(new BlockSpikesRenderer());
|
||||
RenderingRegistry.registerBlockHandler(new BlockMarblePillarRenderer());
|
||||
RenderingRegistry.registerBlockHandler(new BlockEldritchRenderer());
|
||||
RenderingRegistry.registerBlockHandler(new BlockAdvancedMarbleRenderer());
|
||||
|
||||
Reference in new issue
Block a user