Everything posted by hydroflame
-
[HELP]Minecraft 1.6.2 Forge Basic GUI Editing
yeah .... actually im sure most of these can be fixed with asm but ... im too lazy to learn ... but i might have to for 1.6+
-
[HELP]Minecraft 1.6.2 Forge Basic GUI Editing
also, i forgot about this, but its possible to force a block break event without vanilla changes, but the solution is to copy EVERY block class, replace EVERY block in the game with your modded vanilla block and redirect the "onBlockBreak" method of the modded block class to an event (but it would be f****** long to code)
-
Set the ItemSTack that the player has "in hand"
yeah i guess you wouldnt have auto-sorting, but it makes things sooooo much easier
-
[HELP]Minecraft 1.6.2 Forge Basic GUI Editing
i actually made a lot of request to the devs and they didnt even want to hear me.....
-
How to add a renderer on top of an existing minecraft gui
oh its not the same problem, mine was because i was rendering on tickEnd, you should maybe leave that method empty as your computer will work twice as hard for the same resutl
-
Set the ItemSTack that the player has "in hand"
hum, do you want the player to be able to place other items in his inventory with the vanilla E menu, because if you want to limit an item placement ONLY in a certain modded gui you can extends Slot and theres a method to prevent such thing (its called isStackValid or something like that)
-
[HELP]Minecraft 1.6.2 Forge Basic GUI Editing
hmmm ok maybe today there are things to make what i do via base change but ive been on thsi mod for a while now and back then there wasnt anything (maybe thing have changed) made a living heal event made a block break and block place event (dont talk to me about playerInterrectEvent it doesnt work) made a event to be notified when right click (to be able to cast my spells) made some change to be able to set what item is viewed as "in hand" entity range interraction (not block, its 2 different things and theres nothing forge made to change this value) made some base change to be able to render over in game gui <- i abandoned thsi one with the arrival of the RenderGameOverlayEvent
-
How to add a renderer on top of an existing minecraft gui
same thing happened to me, print your code i dont remember the answer
-
Indirectly editing entity classes / Removing methods
just check that the entity is a creeper and cancel the event is so ?
-
Giving players extra data.
yes, no, hi, im also playing with money in my mod <optional> my mod requires that the player can receives money even while offline, so its store in a database isntead of the nbt</optional> you should use IExtendedEntityProperties instead
-
[HELP]Minecraft 1.6.2 Forge Basic GUI Editing
@yagoki, interresting, well im inserting my files directly inside the jar and it has always worked this way (maybe 1.6 will bring bad news, im still 1.5.2) and i know for sure that my features REQUIRE basemod change
-
Set the ItemSTack that the player has "in hand"
public class Containercustom extends Container { private IInventory inventorycustom; private IInventory playerInv; public Containercustom (IInventory inventorycustom, IInventory playerInventory) { this.equip = equip; playerInv = playerInventory; int j, k; for (j = 0; j < 3; ++j) { for (k = 0; k < 9; ++k) { this.addSlotToContainer(new Slot(playerInventory, k + j * 9 + 9, 8 + k * 18, 103 + j * 18-20)); } } for (j = 0; j < 9; ++j) { this.addSlotToContainer(new Slot(playerInventory, j, 8 + j * 18, 161-20)); } this.addSlotToContainer(new Slot(equip, 0, 98, 7)); } @Override public boolean canInteractWith(EntityPlayer entityplayer) { return true; } /** * Called when a player shift-clicks on a slot. You must override this or * you will crash when someone does that. */ public ItemStack transferStackInSlot(EntityPlayer par1EntityPlayer, int par2) { return null; } } public class GuiHandler implements IGuiHandler { /** * @return an instance of a Container class for the server to use */ @Override public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { return new ContainerEquipment(EquipmentManager.getEquipOf(player.username), player.inventory); } /** * @return an instance of a GuiScreen for the client to use and interact with. Depends on the id passed */ public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { return new GuiCustom(new ContainerCustom(new BattleEquipment(), player.inventory)); } } public class GuiCustom extends GuiContainer{ public static final int GUI_ID = -125167; private float mx, my; public EquipmentGui(Container par1Container) { super(par1Container); } /** * Adds the buttons (and other controls) to the screen in question. */ public void initGui() { super.initGui(); this.mc.thePlayer.openContainer = this.inventorySlots; this.guiLeft = (this.width - this.xSize) / 2; this.guiTop = (this.height - this.ySize) / 2; } /** * Draws the screen and all the components in it. */ public void drawScreen(int par1, int par2, float par3) { super.drawScreen(par1, par2, par3); this.mx = (float)par1; this.my = (float)par2; } /** * Draw the foreground layer for the GuiContainer (everything in front of the items) */ protected void drawGuiContainerForegroundLayer(int par1, int par2) { } @Override protected void drawGuiContainerBackgroundLayer(float f, int i, int j) { GuiInventory.drawPlayerOnGui(this.mc, guiLeft+34, guiTop+75, 30,guiLeft+51-mx, guiTop+25-my); Tessellator tess = Tessellator.instance; this.mc.renderEngine.bindTexture("path/to/texture"); tess.startDrawingQuads(); tess.addVertexWithUV(guiLeft, guiTop, zLevel, 0, 0); tess.addVertexWithUV(guiLeft, guiTop+ySize, zLevel, 0, 1); tess.addVertexWithUV(guiLeft+xSize, guiTop+ySize, zLevel, 1, 1); tess.addVertexWithUV(guiLeft+xSize, guiTop, zLevel, 1, 0); tess.draw(); } }
-
[HELP]Minecraft 1.6.2 Forge Basic GUI Editing
look at the wiki for even handling, handle a event of type RenderGameOverlayEvent
-
Set the ItemSTack that the player has "in hand"
make sure your GUI extends GuiContainer and make a new class extending Container and give the player.inventory to that container im cleaning up some code then post it for you also check the wiki for "tiny chest" its a very basic and very usefull example
-
[HELP]Minecraft 1.6.2 Forge Basic GUI Editing
@yagoki, do you know what it implies if you decide to ship modified source? I'm doing some base class for my mod.
-
[1.6] [HELP]Custom furnace not working outside of eclipse minecraft
well wtf do you think "houseGen_Img" is ?
-
[1.6] [HELP]Custom furnace not working outside of eclipse minecraft
no im serious, if you cant tell me exactly that "asd" and "i" are the variable names... you SERIOUSLY need to start learning java.....
-
How to add a renderer on top of an existing minecraft gui
then do it by hand <superhero voice> [shadow=red,left]TESSELLATOR TO THE RESCUE !!! TO SAVE THE DAY !!!![/shadow] </superhero voice> code example because youll end up asking for it anyway Tessellator tess = Tessellator.instance; Minecraft.getMinecraft().renderEngine.bindTexture("path/to/texture");// or bind ressource if in 1.6+ tess.startDrawingQuads(); tess.setColorOpaque_F(1, 1, 1); tess.addVertexWithUV(startX, startY, 0, 0, 0); tess.addVertexWithUV(startX, startY+height, 0, 0, 1); tess.addVertexWithUV(startX+width, startY+height, 0, 1, 1); tess.addVertexWithUV(startX+xSize, startY, 0, 1, 0); tess.draw();
-
[1.6] [HELP]Custom furnace not working outside of eclipse minecraft
ok if i say int i; whats "i" question 2: if i say Item asd; whats "asd"
-
[1.6] [HELP]Custom furnace not working outside of eclipse minecraft
public static ResourceLocation [color=red]houseGen_Img[/color] = new ResourceLocation("mschouses", "gui/BlockBase.png"); the red thing??? you're asking what "houseGen_Img" is ?
-
How to set up my logger?
dude ... its hard coded in the java library... you dont want to change that .....
-
[1.6] [HELP]Custom furnace not working outside of eclipse minecraft
@EarthGuardian, yknow theres a search engine for the forums right ?
-
Indirectly editing entity classes / Removing methods
1 look at the wiki for how to handle events http://www.minecraftforge.net/wiki/Event_Reference#Forge_Events 2 learn java not in this order...
-
How to add a renderer on top of an existing minecraft gui
you do the exact same thign, there no magic there back in the days, before RnederGameOverlayEvent was created, i was rendering my mana bar in a TickHandler when the RenderGameOverlayEvent arrived, i copy pasted my code in a @ForgeSubscribe event method
-
How to add a renderer on top of an existing minecraft gui
yeah technicly you could set to a different render target before drawing the gui and render your texture/image/wtv there too or if thats chinese / too complicated you can also (and its a better option) make a TickHandler client side and render there
IPS spam blocked by CleanTalk.