mirror of
https://github.com/GTNewHorizons/Chisel.git
synced 2026-11-26 15:13:09 +00:00
Fancy Render system, leaves, lang changes, leaf description added
This commit is contained in:
1 parent
7b8e3bf10d
commit
7badc6f8b1
16 files changed
+3074
-2912
No files matched your search
@@ -20,16 +20,17 @@ import java.util.List;
|
||||
public class BlockCarvable extends Block implements ICarvable
|
||||
{
|
||||
public CarvableHelper carverHelper;
|
||||
private boolean isAlpha;
|
||||
private boolean isAlpha, isOpaque;
|
||||
|
||||
public BlockCarvable()
|
||||
{
|
||||
this(Material.rock);
|
||||
this(Material.rock, true);
|
||||
}
|
||||
|
||||
public BlockCarvable(Material m)
|
||||
public BlockCarvable(Material m, boolean isOpaque)
|
||||
{
|
||||
super(m);
|
||||
this.isOpaque = isOpaque;
|
||||
carverHelper = new CarvableHelper();
|
||||
setCreativeTab(ModTabs.tabChiselBlocks);
|
||||
}
|
||||
@@ -71,6 +72,11 @@ public class BlockCarvable extends Block implements ICarvable
|
||||
carverHelper.registerBlockIcons("Chisel", this, register);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube(){
|
||||
return this.isOpaque;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSubBlocks(Item item, CreativeTabs tabs, List list)
|
||||
{
|
||||
|
||||
@@ -7,7 +7,7 @@ public class BlockCarvablePowered extends BlockCarvable
|
||||
{
|
||||
public BlockCarvablePowered(Material m)
|
||||
{
|
||||
super(m);
|
||||
super(m, false);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -16,7 +16,7 @@ public class BlockCloud extends BlockCarvable
|
||||
|
||||
public BlockCloud()
|
||||
{
|
||||
super(Material.ice);
|
||||
super(Material.ice, false);
|
||||
useNeighborBrightness = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ public class BlockHolystone extends BlockCarvable
|
||||
|
||||
public BlockHolystone(Material m)
|
||||
{
|
||||
super(m);
|
||||
super(m, false);
|
||||
|
||||
this.setLightLevel(0.25F);
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ public class BlockLightstoneCarvable extends BlockCarvable
|
||||
{
|
||||
public BlockLightstoneCarvable()
|
||||
{
|
||||
super(Material.glass);
|
||||
super(Material.glass, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -17,7 +17,7 @@ public class BlockMarbleLamp extends BlockCarvable
|
||||
|
||||
public BlockMarbleLamp()
|
||||
{
|
||||
super(Material.redstoneLight);
|
||||
super(Material.redstoneLight, false);
|
||||
|
||||
powered = false;
|
||||
blockUnpowered = this;
|
||||
@@ -28,7 +28,7 @@ public class BlockMarbleLamp extends BlockCarvable
|
||||
|
||||
public BlockMarbleLamp(BlockMarbleLamp unpoweredVersion)
|
||||
{
|
||||
super(Material.redstoneLight);
|
||||
super(Material.redstoneLight, false);
|
||||
|
||||
carverHelper = unpoweredVersion.carverHelper;
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ public class BlockMarblePillar extends BlockCarvable
|
||||
|
||||
public BlockMarblePillar(Material m)
|
||||
{
|
||||
super(m);
|
||||
super(m, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
package info.jbcs.minecraft.chisel.block.tileentity;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import info.jbcs.minecraft.chisel.carving.CarvableHelper;
|
||||
import info.jbcs.minecraft.chisel.carving.CarvableVariation;
|
||||
import info.jbcs.minecraft.chisel.carving.Carving;
|
||||
import info.jbcs.minecraft.chisel.carving.CarvingVariation;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
@@ -20,6 +23,7 @@ public class TileEntityAutoChisel extends TileEntity implements ISidedInventory{
|
||||
|
||||
private ItemStack[] inventory = new ItemStack[3];
|
||||
private String name = "autoChisel";
|
||||
private static EntityItem ghostItem;
|
||||
boolean equal = false;
|
||||
|
||||
@Override
|
||||
@@ -223,6 +227,21 @@ public class TileEntityAutoChisel extends TileEntity implements ISidedInventory{
|
||||
NBTTagList tags = new NBTTagList();
|
||||
System.out.print(tags);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public EntityItem getItemForRendering(int slot){
|
||||
if(ghostItem == null){
|
||||
ghostItem = new EntityItem(worldObj);
|
||||
ghostItem.hoverStart = 0.0F;
|
||||
}
|
||||
|
||||
if(inventory[slot] == null){
|
||||
return null;
|
||||
} else {
|
||||
ghostItem.setEntityItemStack(new ItemStack(inventory[slot].getItem(), 1, inventory[slot].getItemDamage()));
|
||||
return ghostItem;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Packet getDescriptionPacket() {
|
||||
|
||||
Reference in new issue
Block a user