Jump to content

Belpois

Members
  • Posts

    128
  • Joined

  • Last visited

Everything posted by Belpois

  1. I bet that the TileEntity your getting "TileEntityA t = (TileEntityA) access.getTileEntity(x-1, y, z);" is not a type of TileEntityA, ClassCastException maybe? Can you post your error log, please
  2. That would technically work, but what if he has multiple blocks how would he tell which one to set? Or will they always be next to each other?
  3. Hey, blender is good but you would need to either import the 3D model vertices manually or create a model loader... use Techne to make you life easier as it has a nice export button for a minecraft model file. http://techne.zeux.me/
  4. Do you have some kind of item in hand when clicking the blocks? As Blocks only save NBT tags when placed down as that is when the tile entity is present. A block in hand has no tile entity and no NBT Tags. You might an ItemStack which contains an NBT tag to transfer one block NBT to the other. Place Block A (TE NBT = "Hello") Place Block B (TE NBT = "") Put transfer item in hand Right click Block A, data "Hello" is saved to ItemStack NBT Right click Block B, data is transferred from ItemStack to Block B Tile Entity NBT, (TE NBT = "Hello" now) At least that is one way you could do it as there are different ways on what data is used to transfer the NBT tag, I just gave to simplest one I know. You could simply take the coordinates of the block and give them to the second block for processing. Or you could use packets to transfer the data but you would still need some kind of proxy between blocks simly to discover the tile entity coordinates.
  5. Does "EntityAIBaseOrder" extend ArrayList? Because if not you cannot cast the object EntityAIBaseOrder to an ArrayList.
  6. For my file names I'd rather go for "/sampleblock/sampleblock_north.png" no upper cases just underscores. This way I won't have any problems with naming stuff as everything is in lowercase.
  7. Have you checked the casing on you texture file? Remember zip files are case sensitive.
  8. You'd rather go for comparing instances or names.
  9. I would just encode the data as a byte stream and send it, the configuration would just be that encoded data. Why would you need to send the config comments with your configuration? Will the clients be able to edit the config? In that case I would provide a nice gui for that.
  10. Can you tell us what your mod does exactly? It would help us to help you.
  11. Yes you can technically transform anything to bytes, just deserialize it the way you serialized it, the only thing at stake is efficiency. Now the only downside is that I'm not sure XML Serializers support comments when serializing, you'd have to test it out and if not find a LIB that does serialize comments too.
  12. No, It would be a LOT harder to read. Then even I would not know what property means what, for it is very complicated config. I'd need both readme file and comments, and they might not be enough! Use an XMLSerializer then, XML supports comments <!-- -->
  13. Actually the result there would be 0, because neither of those numbers (7 or 15) are floats. </Nitpick> HAHA Damn! I knew I should have added the float notation after the number, but my head just said this is an example no one would care , I was wrong hehe. Moral of the story: The computer is a dumb machine, so tell it exactly what you need or else you will suffer the consequences
  14. Draw quads that form the players body (head, legs, arms) and then use the players skin to bind the texture.
  15. No. Please no. Ok ok, I checked it's the forge event bus Hooking it up with the forge event bus makes it work. Even armor is hidden and anything in my hand. PPPatternClientGuiManager ppPatternClientGuiManager = new PPPatternClientGuiManager(); MinecraftForge.EVENT_BUS.register(ppPatternClientGuiManager); this.guiManagers.put(GuiPPPattern.class, ppPatternClientGuiManager); ignore the names, I just stuck it in a handler to check if the code works or not
  16. Send a packet to the server, the GUI is only a presentation layer nothing except drawing should be computed on the Client. MC Client = Presentation Layer Packets = Transport Layer MC Server = Logic/Business Layer If you follow that pattern everything should work, clicking a button should just send a packet and the server does everything.
  17. What method or function you have used? The same one that was mentioned in this forum: @SubscribeEvent public void pre(RenderPlayerEvent.Pre event) { event.setCanceled(true); } The class I implemented it in, is hooked with both the Forge Event bus and FML event bus. Try both see which one will trigger it.
  18. I guess there is only one way to find out! Although, I'm pretty sure it still is capped...
  19. I don't think there is a texture for light
  20. Minecraft has 16 different light levels, 0 Being the darkest and 15 being lightest. Light Level 15 would equal to the maximum light level a block can reach. http://minecraft.gamepedia.com/Light In code the range is 0F to 1.0F float lightValue = 0F; lightValue = 7/15; // Result 0.467F; But any value from 0F to 1.0F would work A better explanation: http://greyminecraftcoder.blogspot.com/2013/08/lighting.html
  21. To be honest, I would first finish my mod and then if I have time I would try and make it look better. MoSCoW Method (Must, Should, Could, Would) split all tasks in those criteria and move from there. Must are the ones that have to be completed no matter what, Should are tasks that are needed but not too urgent, Could are tasks that will help you in the long run but aren't too important and Would are the features that with or without the finished product would still work. This method really allows me not to waste time while working on my projects.
  22. I just wrote the code in my mod and it works, also in 3rd person mode. Obviously other players need to receive a packet to know that they don't have to show the player model. Image: Start a different MC in debug mode and open to LAN so you can test this, with multiple players.
  23. Yes vertices can be a bit confusing at first, if your interested have a look at this https://open.gl/drawing
  24. Create a new class name is GuiToggleButton or something and make it extend GuiButton. Add some logic, that will set a Boolean field to true/false each time the button is clicked (Creating a toggle essentially) Now override the draw method, and draw the button so when it's toggled it stays selected. Code:
  25. I got this from the MC Wiki http://minecraft.gamepedia.com/Potion Seems like even vanilla MC doesn't hide the armor.
×
×
  • Create New...

Important Information

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