-
Posts
1511 -
Joined
-
Last visited
Everything posted by hydroflame
-
How to create an instance to hook into a variable from another class
hydroflame replied to Conraad's topic in Modder Support
your entity truck extends vehicule right ? then you should be able to add a new field inside truck and just use that variable to get the wheel orientation. did you try printing inside your render method to check that the wheel rotation value was correct ? -
collisions are weird with custom block model
hydroflame replied to endershadow's topic in Modder Support
not really, but were you able to make your hologram block the same size as the carpet ? -
GameRegistry.TileEntity(crest, "crest"); yeah, thsi method doesnt exists, what are you trying to do ?
-
not sure which part you are talking about, Icon c = block.getIcon(side, meta); thsi whole line is inside your renderer the meta you can get by using world.getMetaAtWtvSomething(x, y, z); the side you just chose which side you want, when you render your cue you obviously render all 6 sides manualy the getIcon method itself goes inside your Block class, you can use another method if you want like create your own method getAllIcon will return an array of all texture you registered insode your Block class
-
Icon[] myIcons = new Icon[5]; myIcons[0] = iconRegister.registerIcon(ModMain.modid+":"+"myItem"); myIcons[1] = iconRegister.registerIcon(ModMain.modid+":"+"myItem2"); myIcons[2] = iconRegister.registerIcon(ModMain.modid+":"+"myItem3"); etc
-
ok .. then whats the problem?
-
thats an array ...
-
*suspicious look* why 16 model.. just use as much as you need ............
-
[solved]How do you Rotate custom modeled block
hydroflame replied to Kakarotvg's topic in Modder Support
this hurts so much and now clean version: -
minecraft makes 1 glDisplayList per chunk, but i dont think theres any event that is called when a display list is updated, so you might have to make one
-
TileEntity unbinds from block so NBTTag is worthless
hydroflame replied to jh62's topic in Modder Support
well for 1 you are not overriding the right method in your block you are suppose to override: public boolean hasTileEntity(int metadata) not public boolean hasTileEntity() 2, dont blame the TE if you have a problem, the TE obviously work because chest, furnace, beacon, sign load correctly and TE are VANILLA class, not forge 3 your block class name... its ressemble insanelly a song by macklemore "waddup i got a BigClock(Block)" *irrelevant* -
GUI Buttons and Packets || Adding a config to read other mods
hydroflame replied to Flenix's topic in Modder Support
@gotolink, if a mod ad a ore or a new kind of rare log, youd still need to find a way to price every "base" items @op, well forge has "forge essentials" but idk how good it is -
search for "hydroflame guide to textures" on the wiki, the gui tutorial apparently uses 1.5.2 so there are some outdated stuff
-
you didnt reobfuscate your mod run the reobfuscate.bat/.sh program
-
Item that uses durability of another item 1.6.2
hydroflame replied to Fruitsalid's topic in Modder Support
im only gonna print pseudocode get the player inventory for each item in the player inventory check that this item is of type ammo if it is them damage specificly this item if you can damage it (it wasnt out of ammo) then cast the spell or wtv -
not if you dont have a physical block, you can just link the container to the gui and that will be fine
-
Item that uses durability of another item 1.6.2
hydroflame replied to Fruitsalid's topic in Modder Support
yeah ... well just make sure that the item is an instanceof the amo you want -
you mean the E menu ? the main inventory ?
-
but feel free to come ask question if theres something you dont understand, its just that someone took time to actually write that tutorial
-
Item that uses durability of another item 1.6.2
hydroflame replied to Fruitsalid's topic in Modder Support
i would use like "getItemInSlot" til i find the item i need, then decrease this particular itemStack damage -
how you even looked at the wiki ?
-
Item that uses durability of another item 1.6.2
hydroflame replied to Fruitsalid's topic in Modder Support
exact signature: public void addInformation(ItemStack itemStack, EntityPlayer player, List list, boolean par4) -
GUI Buttons and Packets || Adding a config to read other mods
hydroflame replied to Flenix's topic in Modder Support
well for the gui part its pretty straightfoward but here an example of my party gui (theres also a packet send in there) import java.util.List; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiScreen; import net.minecraft.client.gui.GuiTextField; import org.lwjgl.input.Keyboard; import com.hydroflame.GuiApi.GuiNewList; import com.hydroflame.mod.TheMod; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; /** * The gui for party managing * @author hydroflame * */ @SideOnly(Side.CLIENT) public class PartyGUI extends GuiScreen { public static int GUI_ID = 0; private boolean absorb = false; private GuiNewList<String> newList; private GuiButton[] guiButton; private GuiButton acceptButton; private GuiButton declineButton; private GuiButton leavePartyButton; private GuiButton inviteButton; private GuiTextField userTextField; public PartyGUI() { } // button is (id, x, y, width, height, text) public void initGui() { newList = new GuiNewList<String>(125, this.width/2-200, this.height/2-50, 200, 100); List<String> alist = TheMod.proxy.getList(); for (int i = 0; i < alist.size(); i++) { newList.add(alist.get(i)); } acceptButton = new GuiButton(0, this.width / 2 + 30, this.height / 2 - 50, 60, 20, "accept"); userTextField = new GuiTextField(fontRenderer, this.width / 2 - 130, this.height / 2 - 100, 103, 20); userTextField.setTextColor(-1); userTextField.setEnableBackgroundDrawing(true); userTextField.setMaxStringLength(30); userTextField.setFocused(true); inviteButton = new GuiButton(1, this.width / 2 - 20, this.height / 2 - 100, 50, 20, "invite"); declineButton = new GuiButton(2, this.width / 2 + 30, this.height / 2 - 30, 60, 20, "decline"); leavePartyButton = new GuiButton(3, this.width/2+30, this.height/2 -10, 60, 20, "leave party"); buttonList.add(leavePartyButton); buttonList.add(declineButton); buttonList.add(acceptButton); buttonList.add(inviteButton); buttonList.add(newList); setAvailability(); } protected void mouseClicked(int par1, int par2, int par3) { super.mouseClicked(par1, par2, par3); } protected void keyTyped(char par1, int par2) { if (absorb) { if (this.userTextField.textboxKeyTyped(par1, par2)) { } else if (userTextField.isFocused() && par2 == Keyboard.KEY_RETURN) { sendInvite(); } else { super.keyTyped(par1, par2); } setAvailability(); }else{ absorb = true; } } protected void actionPerformed(GuiButton button) { if (button.id == acceptButton.id) { TheMod.proxy.acceptInvite(newList.getSelectedItem()); TheMod.proxy.decline(newList.getSelected()); newList.remove(newList.getSelected()); } else if (button.id == declineButton.id) { TheMod.proxy.decline(newList.getSelected()); newList.remove(newList.getSelected()); }else if (button.id == inviteButton.id) { sendInvite(); }else if (button.id == leavePartyButton.id) { leaveParty(); } setAvailability(); } private void leaveParty() { TheMod.proxy.leaveParty(); } public void drawScreen(int x, int y, float idk) { this.drawDefaultBackground(); super.drawScreen(x, y, idk); userTextField.drawTextBox(); this.fontRenderer.drawStringWithShadow("invites:", this.width / 2 - 200, this.height / 2 - 60, 0xffffff); } private void sendInvite() { TheMod.proxy.sendInviteToServer(userTextField.getText()); userTextField.setText(""); } private void setAvailability(){ if(TheMod.proxy.isInParty()){ leavePartyButton.enabled = true; }else{ leavePartyButton.enabled = false; } if(!userTextField.getText().equals("")){ inviteButton.enabled = true; }else{ inviteButton.enabled = false; } if(newList.getSelected() == -1){ acceptButton.enabled = false; declineButton.enabled = false; }else{ acceptButton.enabled = true; declineButton.enabled = true; } } } for the nbt/item part, just open a container with that and you should have no problem figuring out how to manipulate PlayerInventory for you concern ========================== about the 2nd question, i dont like to encourage anything related to bukkit but... what i would do is make the mods register their config files to your mod, then reading would be easy if you setup a convention aka something like "place all item under the category "ItemFlenix" and place an array of 2 value containing {itemId, price} then the same for block but under category "BlockFlenix"" but liek i said ... we probably shouldnt be encouraging bukkit -
yeah i did the complete research on the subject after and made a tutorial on the wiki, just search for "ISimpleBlockRenderingHandler" and you'll find it i cover texturing in there too
-
Item that uses durability of another item 1.6.2
hydroflame replied to Fruitsalid's topic in Modder Support
description is a method of Item that you need to override called "addInfo" or something (just goto Item.java and search ) for the item durability, onItemUse check if the player has amunition or wtv and if he does just remove a certain quantity to make it decrease, also dont allow shooting if you dont have enough amo