Jump to content

ss7

Forge Modder
  • Posts

    189
  • Joined

  • Last visited

Everything posted by ss7

  1. Hello, I've got 3 problems. 1. I've got my GUI working, but when i try to decrease the stack size of a slot in a method, it decreases it, but leaves a phantom item when i open the GUI and when i take out the item and right click with it it's gone. It tried running onInventoryChanged(), but that doesn't worked. 2. I returned in the method getInventoryStackLimit the value 15, and i can only put 15 items in the slot and get the rest back, but when i shift-click the itemstack in it just deletes the rest. 3. I would like to know how to get the strength of the redstone signal on the sides of a block with a TileEntity. I tried onNeighbourBlockChange() at my Block class, and setting the variable redstonestrenght at the TileEntity to par1World.getBlockPowerInput(par2, par3, par4). But when i have 2 blocks and power 1 block the other gets also powered I know that's a LOT of questions, but i'm new to Forge Modding, and have done some Bukkit Plugin Modding before. ss7
  2. Hello, I'm trying to implements electricity for my bridgemod. I made a cable block with setBlockBounds(etc...); and a CableTileEntity where i can store the power in. And each second i'm looking for cables nearby and adding the power of them to my cable. But when i have a setup like this: BCC --B=Battery--C=Cable and the battery has a power of 500 then the cable beneath it has a power of 500 and the cable beneath that has also a power of 500, but the next 1 second tick the cable in the middle has 1000 power, because it gets the power of the battery and of the cable right of it. Maybe Calclavia can help me with this, because he has also cables in his UE Mod. And i also don't understand how i can make connected texture with my cables. ss7
  3. Hello, Thank you for your answer, GotoLink, i've now moved the Tick() code to updateEntity() and now the timing works, but that with the redstone is still the case. ss7
  4. Hello, Yes the Block has an inventory. @diesieben07 Do you mean this: @SideOnly(Side.CLIENT) public Icon getIcon(int side, int metadata) { return Block.thatBlock.getIcon(side, metadata); } EDIT: Ok, tested that with the texture and it works perfectly, thanks! diesieben07 do you come from germany? ss7
  5. Hello, Thank you for your answer! But i still don't know how to get the texture of another block for my block. Like the Drawbridge from Tinkers Construct. ss7
  6. Hello, I moved all my code to the TileEntity and it's the same problem . When i have 2 bridges and place a lever at the first and pull it the second extends. Two blocks each second are pushed, but i don't know why. Here is my code: In the main Mod class is just a ArrayList with all the locations of the bridges for the TickHandler. Sorry for the name of one of the pastes, it's not BridgeTileEntity, it's the BridgeBlock: http://gw.minecraftforge.net/kfos http://gw.minecraftforge.net/EHBQ http://gw.minecraftforge.net/gttp ss7
  7. Hello, I'm trying to make a Block where you can put in another Block and the Block has the texture of that block. But i have 2 questions. How can i convert a ItemStack to a Block? How can i check if it's a block or a item? ss7
  8. Hello, I like to know how you can make these buttons on guis of forestry and thermal expansion machines. At thermal expansion machines you can select the sides for the ISidedInventory and you can see the power input. I'd like to have something similar at my gui, but i haven't found any sourcecode for Thermal Expansion or Forestry. Heres a picture of what i mean: ss7
  9. Hello, Thank you very much, GotoLink. I just looked at the code of ContainerFurnace and copied it into my Container class. And now it works perfectly!!! ss7
  10. Hello, I'm trying to make a GUI for my block. And all works, but the GUI-Texture is not at the right position on the screen, and all slots are not at the right position. I tried to just add something to x and y but then is one row of the slots in the right position, and the other rows are not . I think i only have to post the GUI-Texture and the GUI-Container class because the TileEntity has nothing to do with the texture: http://gw.minecraftforge.net/vsCx http://s14.directupload.net/images/130810/gvwr8n57.png ss7
  11. Hello, So what should i do? GotoLink says i need a unpowered and a powered block and a TE, and Chibill say i don't. And why would this code not work: [embed=425,349]NBTTagList taglist = par1nbtTagCompound.getTagList("Inventory"); for (int i = 0; i < taglist.tagCount(); i++) { NBTTagCompound tag = (NBTTagCompound)taglist.tagAt(i); byte slot = tag.getByte("Slot"); if (slot >= 0 && slot < inventory.length) { inventory[slot] = ItemStack.loadItemStackFromNBT(tag); } }[/embed] For now, i'm trying with a TileEntity and no unpowered and powered block. And sorry for my bad english, i'm from Germany. EDIT: Now i have my TileEntity, but i don't know what things i should move into that, because i don't want to store the bridges array in a TileEntity of one of the bridges. It must be on a block that is not a bridge. And i don't know how to implements a update() method in my TileEntity. I've tried it with updateEntity() but that doesn't worked. I have no idea what i have to do next. ss7
  12. Hello, I looked at the code of your mod, but i don't understand it. I knowed that with 16 types, but with a normal block you can also write and read NBT-Data, so why should i use a TileEntity? And that with the crazy redstone signal is still not solved. I mean, it works quite well yet, so why do i have to rewrite all and use a TileEntity? ss7
  13. Thank you for your fast reply! There is no difference between a powered and a unpowered block in my code. I't just finds the entry in the arraylist, deletes it and creates a new entry with the same x, y, z, side, blockspushed but a new redstone strength. And yeah, i planned to use a TileEntity, beacause I'm gonna make a GUI for it, but i still don't understand the benefit, when you use a TileEntity. I know that you can get and set data, but you can also do that with a normal block. Have you got a little example with a TileEntity, because I have no clue how it works. ss7
  14. Hello, I've got a problem, i'm trying to make a block that when you activate redstone it pushes out gold blocks in front of it, so you can walk over it and on the other side, you can deactivate the redstone and the block pulls the gold blocks back. (named bridgeblock) xA1xA2x --A=lever xR1xR2x --R=redstone xS1xS2x --S=bridgeblock But when I've got 2 bridgeblocks and place redstone and a lever behind them and I pull A1, S2 starts, and when i first pull A2, S1 starts. And I've got another problem, the code, that I use to pull the blocks back pulls the blocks back from the bridgeblocks to the last block, but when I try to invert that, it doesn't work. I'm storing all the information about the bridgeblocks in a ArrayList with a "/" behind each information and in the TickHandler i use String.split("/") to get them back. Here is the bridgeblock code: http://gw.minecraftforge.net/2XYM And here the TickHandler: http://gw.minecraftforge.net/oc7t It's like Wireless Redstone, but that was not intended I hope some Pro's can help me ss7
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.