Jump to content
Search In
  • More options...
Find results that contain...
Find results in...


  • Content Count

  • Joined

Community Reputation

4 Neutral

About Minothor

  • Rank
    Stone Miner


  • Gender
  • URL
  1. Ah, righto, I was assuming that it would feed back into either an animation or other visual cooldown indicator of some kind. Yeah, without that, it's less work for both the coder and the server!
  2. Yeah, you're going to have to store the items in the Tileentity and read the nbtdata from the Tileentity being rendered. I use something similar with directions on my pipes: https://github.com/Minothor/diagonalCabling/blob/master/src/main/java/diaCable/renderers/blocks/TileEntityFluxCableRenderer.java
  3. The wiki provides an excellent primer tut on NBT here: http://www.minecraftforge.net/wiki/Creating_NBT_for_items The two methods that have been suggested to you so far both involve the onUpdate function (called every tick by the game) Cool's has a variable stored per Itemstack that could be named "coolDownTicksToGo" which is the number of ticks left until the item can be reused. The update function just decreases the number if it's >=0. Using the item sets the variable to the number of ticks needed to count down. Sieben's provides a bit more accuracy since tick rate can be v
  4. Hi all, I'm having a really bizarre issue with setting up one of my mods since reinstalling this PC. setupDecompWorkspace, clean and eclipse are all accepted by gradle and gradlew.bat however, the eclipse command is not adding any of the required folders. Any ideas on why this might be happening would be welcome at this point, it's getting frustrating as hell. Project in Question: https://github.com/Minothor/diagonalCabling Intended behaviour: Restored ability to just clone and run quickstart.bat in order to resume coding
  5. Grey has an excellent breakdown on rendering here: http://greyminecraftcoder.blogspot.be/2013/08/rendering-items.html Basically, you need to write your custom renderer and bind the relevant item rendering perspects in to it. For example, this renderer responds to the EQUIPPED_FIRST_PERSON mode and displays the cards in the player's hand instead of the item: https://github.com/Minothor/EmeraldCasino/blob/master/src/main/java/EmeraldCasino/renderers/items/ I hope this helps and good luck, custom rendering can be a right pain at times!
  6. Currently the server is keeping the correct connections data and it's the client that's out of sync, I'm shunting all the connection making/breaking/checking code out of the tile entities now and into static methods in the MFHelper api class. Partly to centralize control so that one fix works for all, partly so that I'm not duplicating whole methods for each TE. I'll keep you guys posted if I manage to solve it or not. Cheers again to everyone for the suggestions, help and support!
  7. ipsq, getUnlocalisedName() will return the name that the mod or minecraft game assigns it, the names of items that have been renamed in-game are stored in a displayName string on the itemStack container. The contained item's unlocalised name will be a constant still. (unless I'm misunderstanding your requirements) If you really need to though, you could probably test the path of the resource referenced by IIcon and compare that but it's probably unnecessary. Also, Lars, with Cauldron, that's no longer strictly true, although it can cause all kinds of issues, it is at least theoretica
  8. Cheers for pointing that out Lars, I've cleaned that up and I'm wondering if I can force the client side to resync in any other way... I'll do some more research over the weekend. Cheers again to everyone for all the help and suggestions so far though! (these forums actually help keep me motivated and ambitious)
  9. Cheers for pointing out some of the points that I'd missed in the datapacket methods, I've also added in debug code to check the side that's desyncing and it is indeed the client-side that isn't updating it's connections list, server side it cleaning up just fine it would seem. I've added in your changes in the datapacket methods, but the desync is still rearing it's ugly head I'm afraid. Here's the TileEntity class as it stands currently: package net.RPower.RPowermod.machines.power.cable; import java.util.LinkedList; import java.util.List; import java.util.Queue; import RPo
  10. I'm not really that good, to be honest, before this year I hadn't really touched Java since 2007.
  11. I haven't been able to test the single function yet, just the removal of a pipe with only one connection. As for the test, I overrode the equals function with a test that checks the results of each connection's toByte() method so I'm evaluating the direction rather than the object in memory. As far as I can tell, the server and client entities desync, but the server side maintains the correct number while meaning that the pipes client side can behave in unintended ways since packets are transient and don't sync. One solution will be to make packet handling server side only and sync the til
  12. I catch the break block in the block class and tell the tileEntity to run the breakAllConnections() method before calling the superclass break method. Code: https://github.com/BackSpace47/main/blob/PowerSystem_V2/java/net/RPower/RPowermod/machines/power/cable/BlockFluxCable.java
  13. Ah, yeah, that's because the x value is the relative value from -1 to 1, so xCoord + (-1) is the same as xCoord -1. I'm thinking of adding a cleanUp() function that can be marked to run on block update, see if that helps.
  14. Please could you elaborate on that? I'm looking through the break connection code and I'm inverting the relative coords in all the right places as far as I can see.
  15. hitting a new bug now I'm afraid, remotely calling the breakConnection() function on adjacent pipes sometimes leaves open ended connections towards the removed pipe. package net.RPower.RPowermod.machines.power.cable; import java.util.LinkedList; import java.util.List; import java.util.Queue; import RPower.api.power.E_MFPacketType; import RPower.api.power.I_MFSink; import RPower.api.power.MFHelper; import RPower.api.power.MFPacket; import RPower.api.power.cable.I_MFCable; import RPower.api.power.cable.I_PipeDirection; import net.RPower.RPowermod.core.RPCore; import net.minecraft.block.
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.