recipe for ancient sapling

This commit is contained in:
Ellpeck 2018-10-19 15:05:12 +02:00
parent 663bff02f4
commit fae8a72892
2 changed files with 11 additions and 1 deletions

View file

@ -4,8 +4,10 @@ import de.ellpeck.naturesaura.Helper;
import de.ellpeck.naturesaura.blocks.tiles.TileEntityWoodStand;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockRenderLayer;
public class RenderWoodStand extends TileEntitySpecialRenderer<TileEntityWoodStand> {
@Override
@ -13,7 +15,8 @@ public class RenderWoodStand extends TileEntitySpecialRenderer<TileEntityWoodSta
ItemStack stack = tile.items.getStackInSlot(0);
if (!stack.isEmpty()) {
GlStateManager.pushMatrix();
if (stack.getItem() instanceof ItemBlock) {
Item item = stack.getItem();
if (item instanceof ItemBlock && ((ItemBlock) item).getBlock().getRenderLayer() == BlockRenderLayer.SOLID) {
GlStateManager.translate(x + 0.5F, y + 0.9735F, z + 0.5F);
float scale = 0.65F;
GlStateManager.scale(scale, scale, scale);

View file

@ -20,6 +20,13 @@ public final class ModRecipes {
new ItemStack(Blocks.STONE),
new ItemStack(ModItems.GOLD_LEAF),
new ItemStack(Items.DIAMOND)).add();
new TreeRitualRecipe(new ItemStack(Blocks.SAPLING), new ItemStack(ModBlocks.ANCIENT_SAPLING), 200,
new ItemStack(Blocks.SAPLING),
new ItemStack(Blocks.YELLOW_FLOWER),
new ItemStack(Blocks.RED_FLOWER),
new ItemStack(Items.WHEAT_SEEDS),
new ItemStack(Items.REEDS),
new ItemStack(ModItems.GOLD_LEAF)).add();
new AltarRecipe(new ItemStack(Items.IRON_INGOT), new ItemStack(ModItems.INFUSED_IRON), 200, 30).add();
}