Everything posted by drok0920
-
[1.8] Render Item In Block
Hello, I have recently gotten back into modding and started making a mod that adds a new way to craft. But I have run into the issue that, with the current method, the player cannot actual view the items in the container. So my question is how can I display the items in the block like the item frame does? I have looked at RenderItemFrame.doRender but im not sure how to implement it to work with a block. I hope that made sense. Thanks in advanced!
-
[1.8] Generating a sphere of air?
Yes i'm aware that minecraft is generated in chunks my concern was that what ever is getting "cut off" will never be generated at all meaning that a sphere larger han 16/16 will no longer be a sphere. But im still confused... can i have an example?
-
[1.8] Generating a sphere of air?
I'm a little confused. How does that help me? Im using it as an IWorldGenerator and i don't believe i can use chunk coords there. Can you explain? Also wouldnt this cut off anything going into another chunk completly?
-
[1.8] Generating a sphere of air?
Please??? The majority of my mod is the spheres of air.
-
[1.8] Generating a sphere of air?
Any ideas on how to fix it?
-
[1.8] Generating a sphere of air?
I meant could i have an example, i'm not great with worldgen.
-
[1.8] Generating a sphere of air?
Is there a way to fix that?
-
[1.8] Generating a sphere of air?
And it still doesnt work: http://pastebin.com/MJbkXeNk
-
[1.8] Generating a sphere of air?
Thank you i didnt relize that.
-
[1.8] Generating a sphere of air?
I did it here: @EventHandler public void preInit(FMLPreInitializationEvent event) { yourworldtype = new AntLionType("AntLion Farm"); GameRegistry.registerWorldGenerator(caveSphere, 1); }
-
[1.8] Generating a sphere of air?
So im using this for my ore generation code: http://pastebin.com/g1xc4Tj6 And i get this error: http://pastebin.com/xDPB6gSH
-
[1.8] Generating a sphere of air?
So how you generate ores? Ok that will also work for structures right?
-
[1.8] Generating a sphere of air?
http://pastebin.com/vb3uyfnV
-
[1.8] Generating a sphere of air?
http://pastebin.com/capT9HJd
-
[1.8] Generating a sphere of air?
I am making a custom world type with a custom generater and it works but i cant seem to get a sphere of air to generate. I ttied using the solution here: http://www.minecraftforge.net/forum/index.php?topic=24403.0 but with no success. It throws and Index of of bounds eception. So my question is how can i get it to generate it. Thanks in advanced.
- One quick question.
-
One quick question.
Ok well then i still dont even know how to spawn an entity!
-
One quick question.
I meant what should i use to do it? Also do i have to set the nbt manually or do i just specify what item i want it to be?
-
One quick question.
How do i spawn items into the game through a block? I currently have a block that when certain items/liquids are in it will create something so i need that item to "pop" out of it.
-
Crafting Display
Ok thanks also how would i draw text there aswell?
-
Crafting Display
So any idea on what i did wrong?
- Crafting Display
-
Crafting Display
Ok took a pic of the wrong screen here the right link: http://s1308.photobucket.com/user/Taco_Does_MC/media/Capture_zpsa25015b2.jpg.html
-
Crafting Display
Sorry that was only a snip it of code heres all of it: package com.drok0920.alchemy.gui; import java.util.LinkedList; import java.util.List; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiLabel; import net.minecraft.client.gui.GuiScreen; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.CraftingManager; import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; import com.drok0920.alchemy.Alchemy; import com.drok0920.alchemy.block.BlockManager; import com.drok0920.alchemy.item.ItemManager; public class GUIAlchemistsGuide extends GuiScreen { public static final int GUI_ID = 20; private static int PAGE_ID = 0; private static final int CLOSE_BUTTON_ID = 0; private static final int NEXT_BUTTON_ID = 1; private static final int PREVIOUS_BUTTON_ID = 2; private ResourceLocation backgroundTexture; private List<ItemStack> list = new LinkedList(); public GUIAlchemistsGuide() { backgroundTexture = new ResourceLocation(Alchemy.MODID,"textures/gui/alchemistsGuide_Crafting.png"); } @Override public void initGui() { super.initGui(); PAGE_ID = 0; GuiButton closeButton = new GuiButton(CLOSE_BUTTON_ID, (width / 2) - 25, 256 - 27, 50, 20, "Close"); buttonList.add(closeButton); GuiButton nextButton = new GuiButton(NEXT_BUTTON_ID, (width / 2) + 50, 256 - 27, 50, 20, "Next"); buttonList.add(nextButton); GuiButton previousButton = new GuiButton(PREVIOUS_BUTTON_ID, (width / 2) - 100, 256 - 27, 50, 20, "Previous"); buttonList.add(previousButton); } @Override public boolean doesGuiPauseGame() { return false; } @Override protected void actionPerformed(GuiButton button) { if(button.id == CLOSE_BUTTON_ID) { this.mc.displayGuiScreen((GuiScreen)null); return; } else if(button.id == NEXT_BUTTON_ID) { if (PAGE_ID != 10) { this.PAGE_ID++; System.out.println(PAGE_ID); } return; } else if(button.id == PREVIOUS_BUTTON_ID) { if (PAGE_ID != 0) { this.PAGE_ID--; } return; } } /** * Draws the screen and all the components in it. */ public void drawScreen(int p_73863_1_, int p_73863_2_, float p_73863_3_) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); this.mc.getTextureManager().bindTexture(backgroundTexture); this.drawTexturedModalRect( (this.width - 256) / 2, 0, 0, 0, 256, 256); if(PAGE_ID == 0) { } if(PAGE_ID == 1) { list.add(new ItemStack(Blocks.stone, 1)); list.add(new ItemStack(Blocks.stone, 1)); list.add(new ItemStack(Blocks.stone, 1)); list.add(new ItemStack(Blocks.stone, 1)); list.add(new ItemStack(Blocks.stone, 1)); list.add(new ItemStack(Blocks.stone, 1)); list.add(new ItemStack(Blocks.stone, 1)); list.add(new ItemStack(Blocks.stone_slab, 1)); list.add(new ItemStack(Blocks.stone, 1)); } for (int k = 0; k < this.buttonList.size(); ++k) { ((GuiButton)this.buttonList.get(k)).drawButton(this.mc, p_73863_1_, p_73863_2_); } for (int k = 0; k < this.labelList.size(); ++k) { ((GuiLabel)this.labelList.get(k)).func_146159_a(this.mc, p_73863_1_, p_73863_2_); } drawShapelessCrafting((this.width - 69) / 2, 174 - 26, list); list.clear(); } protected void drawShapelessCrafting(int x, int y, List<ItemStack> stacks) { int offsetx = 0; int offsety = 0; int count = 0; for (ItemStack stack : list) { if(count <= 9) { itemRender.renderItemIntoGUI(fontRendererObj, this.mc.getTextureManager(), stack, x + offsetx, y + offsety); offsetx = offsetx + 26; count++; System.out.println(count); if(count == 3) { offsetx = 0; offsety = offsety + 26; } if(count == 6) { offsetx = 0; offsety = offsety + 26; } } } } } And in the end looks like this: http://s1308.photobucket.com/user/Taco_Does_MC/media/Capture_zpsf13fef6b.jpg.html
-
Crafting Display
I am currently using this: list.add(new ItemStack(Blocks.stone, 1)); list.add(new ItemStack(Blocks.stone, 1)); list.add(new ItemStack(Blocks.stone, 1)); list.add(new ItemStack(Blocks.stone, 1)); list.add(new ItemStack(Blocks.stone, 1)); list.add(new ItemStack(Blocks.stone, 1)); list.add(new ItemStack(Blocks.stone, 1)); list.add(new ItemStack(Blocks.stone_slab, 1)); list.add(new ItemStack(Blocks.stone, 1)); And int offsetx = 0; int offsety = 0; int count = 0; for (ItemStack stack : list) { if(count <= 9) { itemRender.renderItemIntoGUI(fontRendererObj, this.mc.getTextureManager(), stack, x + offsetx, y + offsety); offsetx = offsetx + 26; count++; System.out.println(count); if(count == 3) { offsetx = 0; offsety = offsety + 26; } if(count == 6) { offsetx = 0; offsety = offsety + 26; } } } But setting any of the Blocks.stone to blocks.air crashes it.
IPS spam blocked by CleanTalk.