Created
July 29, 2015 16:08
-
-
Save Prospector/64ae68d20da74981e5db to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.thedoctorsoda.mechconstruct.tileentity; | |
| import net.minecraft.entity.item.EntityItem; | |
| import net.minecraft.init.Blocks; | |
| import net.minecraft.item.ItemStack; | |
| import com.thedoctorsoda.mechconstruct.init.ModItems; | |
| public class TileEntitySturdyTableTDS extends TileEntityTDS { | |
| @Override | |
| public void updateEntity() { | |
| if (worldObj.getBlock(xCoord, yCoord + 2, zCoord) == Blocks.anvil) { | |
| if (worldObj.getBlock(xCoord, yCoord + 1, zCoord) == Blocks.diamond_block) { | |
| if (!worldObj.isRemote) { | |
| worldObj.setBlockToAir(xCoord, yCoord + 1, zCoord); | |
| EntityItem itemCarbonDust = new EntityItem(worldObj, xCoord, yCoord + 1, zCoord, new ItemStack(ModItems.carbon_dust, 32)); | |
| worldObj.spawnEntityInWorld(itemCarbonDust); | |
| } | |
| } | |
| if (worldObj.getBlock(xCoord, yCoord + 1, zCoord) == Blocks.coal_block) { | |
| if (!worldObj.isRemote) { | |
| worldObj.setBlockToAir(xCoord, yCoord + 1, zCoord); | |
| EntityItem itemCarbonDust = new EntityItem(worldObj, xCoord, yCoord + 1, zCoord, new ItemStack(ModItems.carbon_dust, 4)); | |
| worldObj.spawnEntityInWorld(itemCarbonDust); | |
| } | |
| } | |
| } else { | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment