Jump to content

Cerandior

Members
  • Posts

    385
  • Joined

  • Last visited

Everything posted by Cerandior

  1. Setting the texture for your item would be different depending on the forge version you are using. 1.8 uses json files to set up rendering for items/blocks On 1.7 you can directly set the item texture from the item's class. It's been a while since i last used 1.7 to do anything, i forgot the method's name. It should be something along the lines of " item.setTexture "
  2. Is this a custom class, or you are inheriting from another class?
  3. https://docs.oracle.com/javaee/6/tutorial/doc/gjbbp.html
  4. Are 3 gigs enough?
  5. I am trying to get Forge 1.8.9 working. It seems that there is no src anymore, so i downloaded the MDK, and ran gradlew setupDecompWorkspace. However the process is stuck at ":decompileMc" 56 % Any idea why this happens?
  6. Yeah i gave him a tile entity example, but an entity would be better in this case. He said that he wanted a block to suck items so...
  7. Yes i just followed that tutorial. I am not experienced with git so i just went and did step by step what he said. As for the main problem. That serms convincing, i will try it when i get home
  8. I have tried to create a blackhole myself some time ago. Even though the code i used to "suck" entities inside it worked i never got it's rendering to work properly. I can supply you with the code of my blackhole but you have to work through the rendering process yourself. Code: My blackhole is made so it adds an explosion after it takes up to much entities inside it. Remove the parts of code that do that.
  9. To make this thing easier for later, i created a repository in github. You can check that out here: https://github.com/Cerandior/AdvancedElectronics
  10. The Block Class: https://gist.github.com/anonymous/ecd39b293c6e9c3e1027 The Tile-Entity Class: https://gist.github.com/anonymous/4f25e127ff126602848b The Gui Handler Class: https://gist.github.com/anonymous/84ec07e27abbc9a45da9 The Container Class: https://gist.github.com/anonymous/9c57f12d747c4ca36c69 The Gui Class: https://gist.github.com/anonymous/ec53474e0863ac05351e The Main Mod Class: https://gist.github.com/anonymous/e1ce366d6f90bbc0f38e Latest Log: https://gist.github.com/anonymous/27bac0f0c47d6270ae40
  11. Well i have overridden createTileEntity, shouldn't that create the tile-entity for that block? Anyway i overrided hasTileEntity but i am still getting the same problem.
  12. Sorry for the long response. I was at school. When i returned there was a problem with my building's electric system, so they had to work for about an hour. I just opened eclipse and ran the debugger again. I no longer get that error now ( for some reason ). I can add slots that belong to the player inventory. But when i try to add slots to my tile entity inventory, as soon as i try to open the gui, minecraft crashes with this error: The class of Tile Entity is on my original post.
  13. None of them. I rechecked again. I had forgotten to register my tile entities. Even after i did. The console displays the same message but now i am able to add slots to the gui.
  14. Yes hovering over different variables does bring up soma values. The only value that it's null at the C08PacketPlayerBlockPlacement is the stack.
  15. This is what's written in line 654 of NetHandlerPlayServer: this.sendPacket(new S2FPacketSetSlot(this.playerEntity.openContainer.windowId, slot.slotNumber, this.playerEntity.inventory.getCurrentItem())); This is what the debugger says: And this is the method in which the line 654 takes part in:
  16. I mostly want to know if this is a problem of the build version of forge that i am running or i completely messed up. If it's a forge build problem then i have to upgrade right now. And it might be since it's been some time since i have created this project. However i don't want to make wrong statements, by saying that this is a forge problem. By any means i am not expert at this and i am requiring the help of some who know more about the programming language and Forge as a project in general.
  17. I just started creating a Tile-Entity which will act as a charger for some items and i am having problems with the gui. I just set-up the GUI Handler the Gui Container, Gui Class. I copied some of the code for the methods of the inventory at Tile Entity from the official Forge Tutorials. Now, don't think that i copied the code because i don't know how to do it on my own, it's just because i am a little bit lazy. I understand every part of the code that i copied and i am certain that i could have created it on my own, so please don't hate on me copying some code. Let's get to the problem now. When i right click the block. The GUI displays and everything works, but i am concerned by a problem. The console displays some error messages: Very weird problem. It has never happen to me before. These are the classes which i think are causing the problem: (If you need more info i will update this post) Main Class: My Block Class: Tile Entity Class: (Extends a base class which holds the energy value and such) Gui Handler: Container: Gui Class: I know that there's a lot of classes there, but i am worried that this problem will cause bigger problems later. If any of you have the patience to look through everything and give me an answer, i will greatly appreciate it. Thank you for the time UPDATE: I just tried to add slots to the container and now the game crashes with another NullPointerException which i believe comes from the last error.
  18. In 1.7 i used a tessellator and a gradient texture that i created on photoshop to do this. I dont know if you can do the same thing on 1.8
  19. Thanks, that worked. Is it supposed to work like that, or did i mess something up?
  20. @dieseben There is no reason to be sarcastic. I admit it was stupidity of my side. @ArcLie If you have a pc, i reccommend upgrading your graphics card. You don't really need a very powerful one, i don't think it will be an expensive upgrade. Abd if you have a laptop, i am afraid i can't give you any other solution.
  21. It is bullshit indeed. It is the same game so it wouldnt make sense to behave differently in the development environment. Nonsense coming out of my mind....
  22. Well minecraft in the development environment takes up much more resources than it would normally take outside of it.
  23. I just created a basic energy Tool, which requires Energy to work. It is not really completed as for the moment it doesn't care about the amount of energy stored into the tool. I just set up the base to work with later. I was trying to show the amount of energy stored into the tool using the durability bar (as most modders have done). I am using getDurabilityForDisplay to do this. Well in the description this method says that it queries the percentage of the durability bar that should be drawn (1.0 for 100% and 0 for 0%). So i am just returning the amount of energy currently stored into the tool divided by the maximum amount of energy that the tool can hold. In theory this should make sense because if the tool is full, the stored energy is equal to max energy hence dividing them will give you 1.0 which should draw 100% of the durability bar. However this is kinda switched around. When the tool is full of energy the durability bar is empty, while when the tool is out of energy the durability bar is full. I am kinda confused with this. Here is the code: (I haven't done any clean-ups!) Base Class: Tool:
  24. The radius value should be added to the vz aswell otherwise "what you mentioned" will happend. And no the y coord shouldnt be used in this case. Unless you want these explosions to be created at a different height from that of the player.
  25. Do you mean that all the explosions are created at the player? Thats probably vecause your circle has no radius. You are just taking the player posx and posz and multiplying it witg sin and cos of the angle. Try this: vx=(player.posx + radius) * sin(angle).... I was on my phone and cant type well. But i think this should work
×
×
  • Create New...

Important Information

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