Jump to content

ss7

Forge Modder
  • Posts

    189
  • Joined

  • Last visited

Everything posted by ss7

  1. Hello, I have a problem. When i put a item in my gui and i do stackSize-- a ghost item remains in the gui. I solved that problem with packets, but i think there is a easier way to do this. This is how i do it: http://gw.minecraftforge.net/M2nX My second problem is that the power and the progress that's displayed on the gui wouldn't saved in the nbt data: http://gw.minecraftforge.net/XsgM ss7
  2. ss7

    Electricity Mod

    Hello, Really, that's my only problem now, and i think you know how to solve it! ss7
  3. ss7

    Electricity Mod

    Hello, Also, if i don't look at my cable, it doesn't render correctly with the connected textures. Only if i look at the cable ss7
  4. ss7

    Electricity Mod

    Hello, OK, i think i should send a packet when i run inventory[i].stackSize--; But where should i send the packet? To the client or to the server? And what should i do on the client or server side? ss7
  5. ss7

    Electricity Mod

    Hello, But the electricity shows also when i don't send a packet. And that's not the problem. I think the problem is at transferStackInSlot. Should i send a packet there? And where should i send that packet? ss7
  6. ss7

    Electricity Mod

    Hello, Yes, but i don't where i should send a packet in the code. At the TileEntity, the Container, or the GuiContainer? ss7
  7. ss7

    Electricity Mod

    Hello, Yeah, i know how to send packets, but i don't know where i should send packets :'( ss7
  8. ss7

    Electricity Mod

    Hello, I think it has something to do with de-sync of the client and the server, but i don't know a good packet tutorial, and i don't know where to put packets. ss7
  9. ss7

    Electricity Mod

    Hello, I made my first power-consumption block with a nice progress bar for power, and a progress bar for the progress. But i don't know how i can update my progress bar. I should be if a block is in slot 0 and 1 then update progress. Do i need to use packets? And i've got another problem: If i shift-click a item into the slot and then shift-click it out, a ghost item remains in the slot, and when i take it out and try to right-click with it, it's gone! And i can't save the power of my machine, even if i write it to nbt :'(. I can't even read the power value of my power-consumer and do something when it's full. ss7
  10. Hello, Do i need to use packets? ss7
  11. Hello, I've tried your code but that doesn't worked. On the x axis the block is still being removed, on the z axis not. And it looks like the block is being removed, but on the client side, because i can't walk into it. Also the bridge doesn't remove. Even with the else if. I've tried printing the blockspushed and the redstonestrength into the chat, but at the end it's 15/0 so it should do it. And it prints it twice in the chat, the second is 0/0 at the x axis, and 1/0 at the z axis. That's also weird. ss7
  12. Hello, That with the cobblestone is for testing purposes only, cause i don't no how to a ItemBlock or a ItemStack to a Block. Reset, do you mean this: nextplaceblock = false; nextremoveblock = false; I tried everything for the blockspushed == redstonestrength, e.g. i checked if blockspushed != 2, but that doesn't worked. And after the one blocks removed, no other blocks get removed :'( ss7
  13. Hello, OK, here are the files: http://gw.minecraftforge.net/kfos http://gw.minecraftforge.net/KNuc Also the bridge pull-back doesn't work. ss7
  14. ss7

    Electricity Mod

    Hello, OK, now i've got my TESR, but i don't if i need 16 models? Then i would need 16 custom model classes, or is there a easier way to do this? ss7
  15. Hello, But even with repeaters only one bridge extends ): ss7
  16. Hello, YES!!! Redstone is my favorite part of Minecraft! Do you mean with repeaters? Sorry if i don't understand, that's cause i'm German. ss7
  17. ss7

    Electricity Mod

    Hello, Can't i use the getIcon() method? But i don't use a custom texture for my cable, i use the normal brick texture and set the block bounds. And when i make my texture smaller it's not smaller in-game. ss7
  18. ss7

    Electricity Mod

    Hello, Ok, i think i found a pretty good solution: When a block needs power, it searches for cables nearby, and when it founds the first cable, it executes the method DrawPower(int howmanypower, int theid, thepowerconsumertileentity) (the id is a random number generated in each cable, because if there was no id, it would be an endless loop, when the right cable found the left cable, the left cable found the right cable, and vice versa...) the next cable searches for the next cable and executes DrawPower and so on... And when the cable founds no cable, but a battery, it draws the power from that battery and adds it to the consumer. That works perfectly for me! Thank you for your tips! Can't i just check every second or so if a block is nearby and change the texture? Or can i just change the block bounds? ss7
  19. Hello, And how do i take the delay into account? ss7
  20. Hello, But i have that code snippet in the on neighborblockchange event, so it should be on all blocks at the same time, or what do you mean? ss7
  21. ss7

    Electricity Mod

    Hello, But how is the logic? How do mods like ic2 or bc do this? Yes, i mean that the cables are connecting. I've searched the wiki for ISBRH and TESR, but found no tutorial. I think i need 16 textures, 1 for the left, right, front, back + 1 for left-right, front-back, front-right, front-left, back-right, back-left + 1 for front-right-back, right-back-left, back-left-front, left-front-right + 1 for all + 1 for no connection. Is that right, because my cable is like redstone i don't need up and down? Can i just check each 5 ticks or so if the nearby blocks have changed and change the texture, or can i just change the block bounds? I use a normal brick texture and only set the block bounds, so that it looks like a cable. ss7
  22. ss7

    Electricity Mod

    Hello, But when i have a setup like this: b1 b2 cccccc b1-power=500 b2-power=500 c=cable b=battery Shaped like a crossroads. Then the cable would also have a power of 500, but it should have a power of 1000. Do you know how to make connected textures? ss7
  23. Hello, I've tried it with if (world.isRemote == false) { tileentity.redstonestrength = world.getBlockPowerInput(par2, par3, par4); } but that doesn't seem to work. When i place 2 bridgeblocks i can't power them at once ):. ss7
  24. Hello, You are AWESOME, yes my variable was public ans static and now the wireless crazy redstone problem is solved! But when i try to place 2 bridges and power them at once, no bridge extends. And what do you mean with server side? With packets? ss7
  25. Hello, Thank you for your answer! To #2: I copied the code from the ContainerFurnace, but that also removes the stack. And when i don't override that method i get an error, because the javadoc says: Called when a player shift-clicks on a slot. You must override this or you will crash when someone does that. ss7
×
×
  • Create New...

Important Information

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