Jump to content

Cerandior

Members
  • Posts

    385
  • Joined

  • Last visited

Everything posted by Cerandior

  1. In the second version of your code, the one where you are using vectors. You are creating these vx and vz variables but then when you create the explosion you pass in the x and z value. What is the purpose of vx and vz then?
  2. The RF Api does not have any tutorials because is straightforward. It actually has got descreptions explaining what each class and method does. Of course seeing an example would help you out more. Check out EnderIO or ThermalExpansion.
  3. Change blockbounds of your pipe to make it have a hitbox. And i don't know why people think making your own energy system is hard. You will need some base tile entities classes to hold and save data about the energy which most likely is going to be an integer. Also build up some methods to transport your energy value from one tile entity to another. Yet this whole think would be useless if you dont have something to use this "energy" for. Having some "machines" to do work with energy is easy as well. It is just a custom furnace/crafting table which requires a certain amount of energy to be stored into the tile entity before it does anything.
  4. I see that, when you are drawing the connections you are rotating it so it faces the other pipe. From the screenshots it seems that the connector is rotating wrongly. This is when you are rotating the connector: if(d.equals(ForgeDirection.UP)){ }else if(d.equals(ForgeDirection.DOWN)){ GL11.glRotatef(180, 1, 0, 0); }else if(d.equals(ForgeDirection.NORTH)){ GL11.glRotatef(90, 1, 0, 0); }else if(d.equals(ForgeDirection.SOUTH)){ GL11.glRotatef(270, 1, 0, 0); }else if(d.equals(ForgeDirection.WEST)){ GL11.glRotatef(90, 0, 0, 1); }else if(d.equals(ForgeDirection.EAST)){ GL11.glRotatef(270, 0, 0, 1); } This is where you are rotating back to original position right?: if(d.equals(ForgeDirection.UP)){ }else if(d.equals(ForgeDirection.DOWN)){ GL11.glRotatef(-180, 1, 0, 0); }else if(d.equals(ForgeDirection.NORTH)){ GL11.glRotatef(-90, 1, 0, 0); }else if(d.equals(ForgeDirection.SOUTH)){ GL11.glRotatef(-270, 1, 0, 0); }else if(d.equals(ForgeDirection.WEST)){ GL11.glRotatef(-90, 0, 0, 1); }else if(d.equals(ForgeDirection.EAST)){ GL11.glRotatef(-270, 1, 0, 0); } First of all, I think you switched North and South around, South should be 90,1,0,0 and North 270,1,0,0 Secondly when you are rotating back, At East instead of GL11.glRotatef(-270, 1, 0, 0); try GL11.glRotatef(-270, 0, 0, 1); Post back if anything changed.
  5. Well, i did the same thing as you quite a while ago. Using tessellators for simple pipes is a pain in the ass. It took me a bit of my time and help from community to get it working. That may be because i dont know shit about rendering. Anyway, you can make simple pipes just by using blockbounds i think, but since you have done so much work already i will try to help. Can you please post a screenshot of what's happening? EDIT: Show your Tile-Entity class aswell.
  6. In the title you say that you cant reduce the energy stored on the pipe, while on the topic you wrote that you can add power to a pipe but it is not substracting that energy from the provider. I don't know how you set up your base tile entities classes and it would be good to actually answer this. Are your pipes considered energy providers?
  7. So, without transformation, your bow got the right position bit it is not rotated, and when you apply the transformation your bow is rotated correctly but it is rendered in the wrong position? Maybe the transformation method doesn't work properly. Anyway i am probably not the right person to give you suggestions on this as i am a "rendering noob"
  8. Builders Wand from Extra Utilities (i think) achieves something similiar. Download the mod and decompile it to check it's code. Note that Extra Utilities is not open source so you cannot distribute the code without the author's permission
  9. Yes. As i said in initial comment, the minecraft world has a small radius to make proper simulations, however i would like to try.
  10. I haven't looked into this yet because of busy school projects and exams. However it seems to me that mindcraft has a terminal velocity and entities stop accelerating after a while, something that they wouldn't do in real life.
  11. I think you didnt get my point. I am doing this for fun. Testing different accelerations. It is true that entities have downward motion but i want to simulate the gravity on earth at minecraft. Shortly i want to see how will the minecraft world change if i change the motion value.
  12. Well i need this more for an "experimental" fun type of thing. I want each player on the world to be affected by the earth gravitational pull. G force gives the objects that are very close to the earth's surface an acceleration of approx 9.8 m/s^2. Of course that this acceleration is not the same for objects that have a distance from earth's surface but it would be pointless for me to calculate the acceleration on minecraft for objects that are high up on the ground considering that the minecraft world has a radius of 256 blocks/meters. Anyway, i need an event that is fired each tick. I will get a list of players on the world and add 0.49 at their motion Y. Which means that each player will accelerate in the negative Y axis on a value of 9.8 blocks/ second. To be able to do this correctly i also want to know what is the default acceleration value that minecraft uses to simulate gravity. Thank you for your time
  13. There is no line of code in the renderer that could possibly change the entity's value. Iam confused. I will try removing the renderer from entity when i get home and will post result
  14. I will step out of the rendering thing for awhile cause it's driving me nuts. Anyway, after messing up with random things in the renderer, for some reason, my "black-hole" is not giving motion to any nearby entities (It is not pulling anything). This is very weird and i can't think of a cause for this. Does the renderer affects entity methods? That is confusing. My entity code:
  15. https://github.com/coolAlias/Forge_Tutorials/blob/master/InventoryItemTutorial.java This tutorial is by CoolAlias. In that tutorial he explains how to make an item that has an inventory or as you call it item with slots.
  16. Elix that didn't work, i already did that before. I have no idea why sometimes is visible and sometimes it is not. I think that it has to do with GL11.glTranslate or something. I don't understand anything. Also, now for some reason, the entity stopped "pulling in items". It is probably not calling the "onUpdate" method. But why ? EDIT: While on the "Pause" menu screen i can actually see the black hole sphere on the background. So when the game it's paused the sphere is rendered correctly. @EventHandler public void Init(FMLInitializationEvent event) { EntityRegistry.registerModEntity(EntityBlackHole.class, "entityBlackHole", 1, this.instance, 100, 5, false); proxy.registerRenderInfo(); }
  17. @gummby8 It is different as i am not trying to render a flat texture that will always face the player. I am rendering a model, in my case a sphere.
  18. @elix the super.doRender had no effect at all. Either removing it from the method, putting it inside or out Push/Pop matrix, it does nothing. About the far thing. I am not sure if that is a thing. Can't find anything similar to "rendering far" And yet it doesn't seem to me that render distance has to do anything with it, since i can see the sphere from up. No matter how much up i go i can see the sphere if i am directly above the entity. However if i am at the ground level (Calling ground level, the level in which entity is placed), i cannot see the sphere, unless the Black Hole starts pulling me in.
  19. I am not sure if event.world and EntityPlayer.worldObj are the same but in your initial class you were using the players worldObj to check if it was remote or no. Then you declared an entity item that belonged to the event world and then you tried to spawn that entity item using the player worldObj. I don't know if this was your problem because while i was reading through your code it seems that you already had found the solution.
  20. Well, apparently i was much more of an idiot than i thought. I had forgotten to register my entity and everything that i did on my render class had no effect on game. It started to frustrate me though because checking everywhere for different things, trying them all out and getting nothing every time is very frustrating. After i registered my entity, i tried to render a square using a tessellator. Success on that. I didn't go through more testing and went back to jabelar's tutorial on rendering a sphere. The sphere does render however but only if you are close to it. Actually it only renders if you are in the radius that the entity has to suck on things. So as soon as you are affected by motion you can see the black hole, but not at any other place. I also figured that you can always see the sphere if you are above. No matter how high. As long as the fog doesn't block the view of course. Also if i point towards the entityBlackHole, every other entity turns black. also, sometimes the item that i currently am holding. I did some screenshots for each case. You can always see the black hole from above, also every other entity is black: http://prntscr.com/9mu8ve When from the side you can only see the black hole if you are within its "sucking" range: http://prntscr.com/9mu94u When from the side you can't see the black hole if you are to far: http://prntscr.com/9mu9h5 Renderer Code: EntityBlackHole Code: clientProxy code:
  21. I don't know if i come up like an idiot if i say this, but i seriously have no idea Really, i don't even know where to start. Trigonometry is fine for me. Just a pen and paper is enough to find out the perfect numbers. I just have no idea how to start the rendering process of something, anything. The only thing that i know about OpenGL is that it uses some primitives ( Lines, Points, Quads, Polygons ... ) to draw complex (in case of minecraft, very simple) objects. I don't know, however, how OpenGL does this.
  22. Won't be able to generate a code for a circle on my own aswell. I am pretty sure of that. It is not about the shape. If i knew the "basics" or have an overall knowledge over the rendering i would be able to do this on my own. It's like knowing how a loop works so you can use that loop again in different situations.
  23. Just jumped into the rendering bits, and troubles already. First of things, i couldn't render a sphere with the knowledge that i currently have so i looked up jabelar's tutorial on how to render a sphere on minecraft. So props to him for the code. However i can't seem to find passSpecialRender method on my custom Render Class. I am working on 1.8 and i don't know which version of forge jabelar used on his tutorial at his blogspot so maybe there is no such method in 1.8 Any method that is equivalent to passSpecialRender ? I have mentioned before, i am not good at rendering, hence i am not aware of a lot of methods of rendering.
  24. There is no EntityFallingSand on my IDE. The only thing that my IDE can find about "Falling" is EntityFallingBlock. Is that the same? I am working on forge-1.8-11.14.3.1450.
  25. That's very smart thinking. I am guessing you can do the same with gravel. Thank you for the idea
×
×
  • Create New...

Important Information

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