Everything posted by KeeganDeathman
-
Making Custom Iron Bars help.
I did that, but it tells me that it can't cast my block to a BlockPane. I would chnage my super to BlockPane but I'm unsure of the first two and last variable i need to pass in. I know it's (String,string,material,boolean) I know the two strings are texture and blockname(from setBlockName), but which is which i'm not sure. The boolean, no clue.
-
Making Custom Iron Bars help.
Doh! I was thinking that method worked more as a set method than a get. Not sure why, it is called getRenderId() or Type() or whatever. I'm not at home right now so I have no clue.
-
Making Custom Iron Bars help.
Which id is that? I can't find a list that is updated to include at least iron bars/glass panes
-
Is there still a way to check if a block has visibility to the sky[1.7.2]
i would say take the blocks xyz pos, and see if there are any blocks on above the block on the y axis, from the blocks y pos to 256, i would also reccomend passing through glass and other transparent blocks. For example. while(int y = yPos; y <=256; y++) { if((world.getBlockatCoords(xPos,y,zPos) != null) || (world.getBlockatCoords(xPos,y,zPos) != Blocks.glass)) { skyVisible = false; } }
-
Making Custom Iron Bars help.
Hi, I'd like to know the best way to make custom iron bars. In my mod, I want to make bars you can file away. I just have problems making the block render like iron panes. Any help?
-
Custom Iron Bars help!
Hello, I am trying to make an iron bars block that can be filed away by a file item. But through using BlockPane as my super class, I get this error upon placing the block in the world or entering a world with the block already placed. http://pastebin.com/S1XS4e8r Heres my code: package io.github.keegandeathman.portalcube.blocks; import io.github.keegandeathman.portalcube.items.ItemFile; import io.github.keegandeathman.portalcube.tileentity.TileEntityIronBarFile; import net.minecraft.block.Block; import net.minecraft.block.BlockPane; import net.minecraft.block.ITileEntityProvider; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; public class BlockIronBarsFile extends BlockPane implements ITileEntityProvider { private static String tex = "portalcube:blockIronBars"; public BlockIronBarsFile(Material p_i45394_1_) { super("portalcube:blockIronBarsBroke", "portalcube:blockIronBarsBroke", p_i45394_1_, false); // TODO Auto-generated constructor stub } @Override public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par5, float par6, float par7, float par8) { ItemStack itemStack = player.getCurrentEquippedItem(); if(!world.isRemote) { if(itemStack.getItem() instanceof ItemFile) { TileEntityIronBarFile te = (TileEntityIronBarFile) world.getTileEntity(x, y, z); te.triesRemaining -=1; if(te.triesRemaining == 0) { world.setBlockToAir(x, y, z); } else { tex = "portalcube:blockIronBarsBroke" + te.triesRemaining; } System.out.println(te.triesRemaining); return true; } } return false; } @Override public void registerBlockIcons(IIconRegister par1IconRegister) { // blockIcon - blockIcon this.blockIcon = par1IconRegister.registerIcon(tex); } @Override public TileEntity createNewTileEntity(World var1, int var2) { // TODO Auto-generated method stub return new TileEntityIronBarFile(); } }
-
how to tell if a player clicked on the gui background texture? And where?
Yes. However the texture does change size depending on screen size, in order to fit. But since i update the xSize and ySize varaibles when scaling, it should be fine unless the player clicks in the first tick.
-
how to tell if a player clicked on the gui background texture? And where?
I am making a new kind of GUI in minecraft, it is the gui of a laptop and it is meant to simulate windows 7 as much as possible, but with out the clunky MC built in buttons, but instead, I have the background dynamically changing while the player clicks the screen(so if its between point x,y,z, and w, its on the icon for the web application, switch to that screen), but, the GUI texture is slightly dependent on the dmenisions of the game screen(so the HD texture can fit in smaller screens), is there a way to calculate the position of the mouse when clicked, on the texture? like taking the expression from the drawGuicontianerBackground() method((this.width - xSize)/2), and somehow use that to calclate position on the texture, like 0,0 being in the top left corner of the texture, not the screen. Like maybe for texture posistion 50,50, if(((this.width - xSize)/2 + 50) == mouseX && (this.height - ySize)/2 + 50) == mouseY) { this.party(); }
-
Can't set custom Item or Block IDs? (1.7.2)
As far as your concrened, ID's don't exsist.
-
[1.6.4] How do you set half values?
and so you know, most people on here will either tell you what to do, or point to a tutorial, which may include code, but copying and pasting gets you no where except wondering whats wrong, and not knowing whats happening in the first place.
-
[1.7.2] Gui HD textures?
Is it possible at all to have gui backgrounds that are bigger than 256x256, i read somewhere it has to be 256x256, or a multiple, that would be scaled down, but i would like to have like 300x300 textures that would be scaled to better fit the screen, like scale down if its too big, scale up to make it look better, easier to see, blah blah blah.
-
[1.7.2] Gui custom opening animation?
Thats gonna take a while. Good thing I was just checking for future reference. [glow=red,2,300][shadow=black,left]DEATH[/shadow][/glow]
-
[1.7.2] Gui custom opening animation?
Is there a way to have my gui open with a custom animation like the one of the welcome screen in this game: http://www.kongregate.com/games/lazarou/soul-core (The one when you start the game) The screen kinda spins and enlarges into view, like it's on a pole thats spinning, while also moving closer to you. Any way to do that?
-
JTextAreas in GUI?
Hmmm, I think I might stick with the one gui screen, so Ill make a new element, then maybe post it online for others to use.
-
JTextAreas in GUI?
So, make a widget, like my own little window or a new GUI element made by me. Im good with making either.
-
JTextAreas in GUI?
Would it be possible to create a GUI with a JTextArea, I've heard of them and would like to use them in my mod for writing files to the disk in my computer block.
-
[1.7.2] Write/Read NBT at a different time then when the game is saved/loaded
Is there a way to induce a save? Like trigger an autosave?
-
[1.7.2] Write/Read NBT at a different time then when the game is saved/loaded
Yes, im using the blocks coords, and its printing the right lines(the debug statements), and Im passing in the right tile entity of course.
-
[1.7.2] Write/Read NBT at a different time then when the game is saved/loaded
still not working
-
[1.7.2] Write/Read NBT at a different time then when the game is saved/loaded
When their both strings it gets confusing. Thanks thuogh Ill try that
-
[1.7.2] Write/Read NBT at a different time then when the game is saved/loaded
Gui: https://github.com/KeeganDeathman/LabStuff/blob/master/java/keegan/LabStuff/client/GuiComputer.java TileEntity: https://github.com/KeeganDeathman/LabStuff/blob/master/java/keegan/LabStuff/tileentity/TileEntityComputer.java Packet: https://github.com/KeeganDeathman/LabStuff/blob/master/java/keegan/LabStuff/PacketHandling/PacketComputer.java
-
[1.7.2] Write/Read NBT at a different time then when the game is saved/loaded
Yes, I do that. But the log is still wiped clean. Help?
-
[1.7.2] Write/Read NBT at a different time then when the game is saved/loaded
I am using NBT to save a dynamically changing set of strings in a computer block's gui in my mod. How it works is the player enters commands in the text field and the 'console log' updates accordingly. I would like to keep the console log across different sessions on the computer. I.E. Right now if you leave and come back, the console log is clean, fresh start. I would like to have it so that if the console says cheese, and you leave, when you come back it stills says cheese. I see no other way to do this other than with NBT. However, I would like it so the player doesn't have to save the world in order to save the log, which would require them to leave the computer(in game one) to enter the pause menu, which would 'wipe' the console log. Is there a way to initiate the NBT writing and reading processes say, when the GUI closes/opens respectivley?
-
[1.7.2]Gui controls redstone power state of block
Okay, ill look for those.
-
[1.7.2]Gui controls redstone power state of block
Hows that gonna help? I know how to activate things server side with packets from a GUI, but, about the redstone?
IPS spam blocked by CleanTalk.