Jump to content

TheEpicTekkit

Members
  • Posts

    361
  • Joined

  • Last visited

Everything posted by TheEpicTekkit

  1. I think I am registering my textures wrong... I put my crude oil fluid into a fluid transposer from te, and the fluid in the tank was invisible. I probably also registered the name wrong because it was fluid.fluidCrudeOil when I mouse over it. What is the proper way of registering fluid textures and names? this might have been the problem, the tank worked all along, but I didn't know because the fluid was invisible.... and there was no tooltip, because I dont know how to do that.
  2. I really like typing long replies that take me 15 minutes to type, don't I.
  3. Okay, so I have now added some code in the onBlockActivated method that takes the fluid from a bucket in the players hand, and puts it into the gui, and visa versa This is that code: And now when I open the gui there is a crash: Now I am fairly sure that my code to fill the tank works, because the crash report points to the gui, not the block class. These are the lines of code in the gui that it points to: So this means that there isnt anything wrong with my block class or tileentity (yet... as far as I can tell), instead, it is a problem with the way I am drawing the fluid in the gui I am not so great at debugging (I can figure out basic problems) this is really complicated, and I dont know where to start. Please tell me if you can see the problem, or if you have a better / correct way of drawing fluids in the gui. untill then, I am going to attempt to figure this out also. Thanks for your help.
  4. Okay, so I just right click on the master block with a fluid cell from ic2, and it seems to use up the fluid cell, and turn it into an empty cell, I am not putting anything in any slots in the gui to fill it. I am not entirely sure if it is actually filling though... If I click on the master with a bucket of my fluid, but that doesnt seem to do anything, rather just dump the bucket of fluid in the world. I suspect that it is deleting the fluid in the tank because I have done something wrong somewhere, but I cant be sure of that because I have no way of telling. I have tried System.out.println(tankInput.getFluid().toString()); but that seems to throe a nullPointerException I have also tried instead of .toString(), .fluidId() and some other integer values of the fluid. Here is my code if you can see what I have done wrong: Now im not sure where the problem is, I dont know if it is an issue with the gui, or the tileentity. Please help me locate the issue. Anyone know any mods on github that can give a clear example of drawing fluids in a gui (without some fance guiFluidHandler, or something like that that I saw in buildcrafts github) I would also like to know how to add a tooltip displaying the fluid name, and the amound, when the player mouses over the tank in the gui. (But to be honest, I would really like to solve actually getting the fluid in the inventory first, so this can come after that is working) Thanks.
  5. It'd be great if you could do a tutorial on inventories that can store liquids... I have bee trying to figure this out
  6. So I have been trying to draw A fluid in a GUI, and I cant figure out how... I want it to be able to draw the fluid from any mod with the correct texture. Any of my attempts so far have ended with a nullPointerException, or id doesn't work at all, and nothing ad drawn in the gui Any help?
  7. So for some reason, suddenly, buildcraft is crashing my game, This is weird, because I havnt changed anything, and the game ran fine 10 minutes ago. Crash report: So this is saying that... TileEntityWindTurbine tileEntity = (TileEntityWindTurbine)world.getTileEntity(x, y, z); So this is saying that this is trying to cast tilegenericpipe to tileentitywindturbine... why on earth would it even be doing that? one: it wasnt doing that 10 minutes ago... two: I havnt changed anything to do with my wind turbine for the last few days because I finished it... three: the x, y, z coords should return the tileentity of the wind tirbine, not tilegeneric pipe... I have buildcraft api installed, but this is because I PLAN on being able to convert my energy to mj, I havnt added any buildcraft code into my mod yet. AT ALL... This is strange... Thanks in advance. UPDATE: Now I have just created a new world, and this crash has gone, but it still crashes if I try to load my other world... I would like to figure this out still because one: I would like my world back (without uninstalling bc, reloading, reinstalling bc, bacause then I would loose everything in my world related to bc.. and two: I dont want this problem to happen to people once I release my mod.
  8. I mean that they dont show up for me unless I am in the post reply screen... if i am not, the last reply I can see is:
  9. Also, how can I get the distance from the master block the valve is? would it be possible to make the valve access one tank if it is 2 blocks above the master, access the second tank if it is 4 blocks above, access the third tank if it is 6 blocks above etc. The reason I would like to do this is because my multiblock will output 4 fluids, 2 gases and 2 liquids, now logic says the gases are going to rise, and the liquids are going to sink (obviously this wont really happen in the game, but it is what would happen in real life), so the I want to be able to access a tank based on the height in the structure the valve is, the dense fluids output from the bottom valve and the low density fluids output from the top
  10. How do I get an instance of the masters tileentity from the valve tileentity?
  11. Also, it hasnt worked... (yet) but I think that is because my gui isnt accepting the fluid, it just deletes it, I am adding fluid to it by right clicking on it with a universal fluid cell from ic2. What do I need to do to make the gui not delete the fluid (im not sure if it is, but that seems like what it is doing, if you cen see that it isnt, or why it is, please point it out to me) My code in the tileentity (only the tank code): @Override public int fill(ForgeDirection from, FluidStack resource, boolean doFill) { return tankInput.fill(resource, doFill); } @Override public FluidStack drain(ForgeDirection from, FluidStack resource, boolean doDrain) { if (resource == null || !resource.isFluidEqual(tankInput.getFluid())) { return null; } return tankInput.drain(resource.amount, doDrain); } @Override public FluidStack drain(ForgeDirection from, int maxDrain, boolean doDrain) { return tankInput.drain(maxDrain, doDrain); } @Override public boolean canFill(ForgeDirection from, Fluid fluid) { return true; } @Override public boolean canDrain(ForgeDirection from, Fluid fluid) { return true; } @Override public FluidTankInfo[] getTankInfo(ForgeDirection from) { return new FluidTankInfo[] { tankInput.getInfo() }; } What do I need to change?
  12. By the way, I don't quite understand how this works, can you please explain it in a bit more detail? what numbers do I have to customize to for example suite the hight of the tank in my inventory? You have just given me a bunch of code that does stuff I want, but without an explanation of how it does what it does, I would like to learn how this work's and what I need to change.
  13. So... how would I fill out something like these two methods to work with a certain block in the structure? @Override public int fill(ForgeDirection from, FluidStack resource, boolean doFill) { return tankInput.fill(resource, doFill); } @Override public FluidStack drain(ForgeDirection from, FluidStack resource, boolean doDrain) { if (resource == null || !resource.isFluidEqual(tankInput.getFluid())) { return null; } return tankInput.drain(resource.amount, doDrain); } And this block can be anywhere on the structure, would that cause problems?
  14. Please post here and not on the old thread, I cant see what you post on the old thread....
  15. If you can see this, I am moving the thread to: [lnk] http://www.minecraftforge.net/forum/index.php/topic,22961.0.html [/lnk]
  16. Sorry, but in my other thread, for some reason I cant see any replys after reply 24, I dont know why this happened, but it has also happened to one of my other threads So I have decided to re create the thread (old thread: http://www.minecraftforge.net/forum/index.php/topic,22938.0.html What if I wanted a specific block in the structure that I pump into and out of? I want to pump into the master block (on any side) This is the only input for liquid. I then want to have 5 different blocks that can be pumped out of from any side (not 5 of the same block, but 5 different blocks, one for each liquid)
  17. I cant see any replys after number 24, and I have already posted a reply....?!?!?
  18. What if I wanted a specific block in the structure that I pump into and out of? I want to pump into the master block (on any side) This is the only input for liquid. I then want to have 5 different blocks that can be pumped out of from any side (not 5 of the same block, but 5 different blocks, one for each liquid)
×
×
  • Create New...

Important Information

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