mirror of
https://github.com/GTNewHorizons/Chisel.git
synced 2026-11-21 04:42:25 +00:00
Remove all special pillar blocks, they were unneeded
This commit is contained in:
1 parent
09065b25d6
commit
a452279a38
7 files changed
+55
-358
No files matched your search
@@ -1,118 +0,0 @@
|
||||
package com.cricketcraft.chisel.block;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.enchantment.EnchantmentHelper;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.stats.StatList;
|
||||
import net.minecraft.world.EnumSkyBlock;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.event.ForgeEventFactory;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockCarvableIcePillar extends BlockCarvablePillar {
|
||||
|
||||
public BlockCarvableIcePillar(Material m) {
|
||||
super(m);
|
||||
this.slipperiness = 0.98F;
|
||||
this.setTickRandomly(true);
|
||||
setStained(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube() {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the given side of this block type should be rendered, if the adjacent block is at the given coordinates. Args: blockAccess, x, y, z, side
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean shouldSideBeRendered(IBlockAccess p_149646_1_, int p_149646_2_, int p_149646_3_, int p_149646_4_, int p_149646_5_)
|
||||
{
|
||||
Block block = p_149646_1_.getBlock(p_149646_2_, p_149646_3_, p_149646_4_);
|
||||
return block == this ? false : super.shouldSideBeRendered(p_149646_1_, p_149646_2_, p_149646_3_, p_149646_4_, p_149646_5_);
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when the player destroys a block with an item that can harvest it. (i, j, k) are the coordinates of the block and l is the block's subtype/damage.
|
||||
*/
|
||||
public void harvestBlock(World p_149636_1_, EntityPlayer p_149636_2_, int p_149636_3_, int p_149636_4_, int p_149636_5_, int p_149636_6_)
|
||||
{
|
||||
p_149636_2_.addStat(StatList.mineBlockStatArray[Block.getIdFromBlock(this)], 1);
|
||||
p_149636_2_.addExhaustion(0.025F);
|
||||
|
||||
if (this.canSilkHarvest(p_149636_1_, p_149636_2_, p_149636_3_, p_149636_4_, p_149636_5_, p_149636_6_) && EnchantmentHelper.getSilkTouchModifier(p_149636_2_))
|
||||
{
|
||||
ArrayList<ItemStack> items = new ArrayList<ItemStack>();
|
||||
ItemStack itemstack = this.createStackedBlock(p_149636_6_);
|
||||
|
||||
if (itemstack != null)
|
||||
items.add(itemstack);
|
||||
|
||||
ForgeEventFactory.fireBlockHarvesting(items, p_149636_1_, this, p_149636_3_, p_149636_4_, p_149636_5_, p_149636_6_, 0, 1.0f, true, p_149636_2_);
|
||||
for (ItemStack is : items)
|
||||
this.dropBlockAsItem(p_149636_1_, p_149636_3_, p_149636_4_, p_149636_5_, is);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (p_149636_1_.provider.isHellWorld)
|
||||
{
|
||||
p_149636_1_.setBlockToAir(p_149636_3_, p_149636_4_, p_149636_5_);
|
||||
return;
|
||||
}
|
||||
|
||||
int i1 = EnchantmentHelper.getFortuneModifier(p_149636_2_);
|
||||
harvesters.set(p_149636_2_);
|
||||
this.dropBlockAsItem(p_149636_1_, p_149636_3_, p_149636_4_, p_149636_5_, p_149636_6_, i1);
|
||||
harvesters.set(null);
|
||||
Material material = p_149636_1_.getBlock(p_149636_3_, p_149636_4_ - 1, p_149636_5_).getMaterial();
|
||||
|
||||
if (material.blocksMovement() || material.isLiquid())
|
||||
{
|
||||
p_149636_1_.setBlock(p_149636_3_, p_149636_4_, p_149636_5_, Blocks.flowing_water);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the quantity of items to drop on block destruction.
|
||||
*/
|
||||
public int quantityDropped(Random p_149745_1_)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Ticks the block if it's been scheduled
|
||||
*/
|
||||
public void updateTick(World p_149674_1_, int p_149674_2_, int p_149674_3_, int p_149674_4_, Random p_149674_5_)
|
||||
{
|
||||
if (p_149674_1_.getSavedLightValue(EnumSkyBlock.Block, p_149674_2_, p_149674_3_, p_149674_4_) > 11 - this.getLightOpacity())
|
||||
{
|
||||
if (p_149674_1_.provider.isHellWorld)
|
||||
{
|
||||
p_149674_1_.setBlockToAir(p_149674_2_, p_149674_3_, p_149674_4_);
|
||||
return;
|
||||
}
|
||||
|
||||
this.dropBlockAsItem(p_149674_1_, p_149674_2_, p_149674_3_, p_149674_4_, p_149674_1_.getBlockMetadata(p_149674_2_, p_149674_3_, p_149674_4_), 0);
|
||||
p_149674_1_.setBlock(p_149674_2_, p_149674_3_, p_149674_4_, Blocks.water);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the mobility information of the block, 0 = free, 1 = can't push but can move over, 2 = total immobility and stop pistons
|
||||
*/
|
||||
public int getMobilityFlag()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
package com.cricketcraft.chisel.block;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
|
||||
public class BlockCarvablePackedIcePillar extends BlockCarvablePillar {
|
||||
|
||||
public BlockCarvablePackedIcePillar(Material m) {
|
||||
super(m);
|
||||
this.slipperiness = 0.98F;
|
||||
}
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
package com.cricketcraft.chisel.block;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import com.cricketcraft.chisel.api.carving.IVariationInfo;
|
||||
import com.cricketcraft.chisel.client.render.RendererPillar;
|
||||
|
||||
public class BlockCarvablePillar extends BlockCarvable {
|
||||
|
||||
public IIcon sides[] = new IIcon[6];
|
||||
|
||||
public BlockCarvablePillar(Material m) {
|
||||
super(m);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType() {
|
||||
return RendererPillar.id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
return sides[side];
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side) {
|
||||
return sides[side];
|
||||
}
|
||||
|
||||
public IIcon getCtmIcon(int index, int metadata) {
|
||||
// Workaround to prevent crash with invalid meta
|
||||
IVariationInfo var = null;
|
||||
if (metadata <= carverHelper.infoList.size())
|
||||
var = carverHelper.infoList.get(metadata);
|
||||
else
|
||||
var = carverHelper.infoList.get(0);
|
||||
return var.getSubmapManager().getIcon(0, metadata);
|
||||
|
||||
// TODO fix pillars
|
||||
// if (index >= 4)
|
||||
// return var.iconTop;
|
||||
// if (var.seamsCtmVert == null)
|
||||
// return var.icon;
|
||||
// return var.seamsCtmVert.getSubIcon(index % 2, index / 2);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user