Jump to content

RSQ

Members
  • Posts

    24
  • Joined

  • Last visited

Everything posted by RSQ

  1. Thanks for the replies! I ended up using TGG's first piece of code. Thanks delpi too.
  2. Lol delpi... As for the actual problem, I assume you want to recreate what you just stated. I currently have three of those types of blocks in my mod. The way I do it is create a tile entity, where an item variable is changed when you right click the block. Then the tile entity's renderer renders either that item's model directly, or one of your own models. Have fun with the rest.
  3. I was actually messing with nano time and all that last night. I actually got pretty close, but your code looks a lot better. Thanks once again mate!
  4. Hello, I currently have an item that it supposed to display something on screen when held. I do this by subscribing to the RenderGameOverlayEvent event. But, after some experimenting, I have found that this event runs more times per second with higher FPS than low FPS, which makes sense. The problem is that I want it to render at a certain speed without FPS changing the speed. How would I do this? Any help is appreciated!
  5. Привет товарищ! I haven't been getting sound either. Is this a bug?
  6. createNewTileEntity() is only called if you extend BlockContainer. If you don't want to extend it, try implementing ITileEntityProvider.
  7. Forgot to post this earlier, but I found that 8_b eventually calls 7_a.
  8. After exploring some random classes, I found this piece of code: WorldServer ws = (WorldServer) e.worldObj; ws.getEntityTracker().func_151248_b(e, new S12PacketEntityVelocity(e)); Also, a method .func_151247_a() exists but has similar features. Unsure about which to use. After putting that after my push code, and inserting an !isRemote, the issue seemed to be fixed for long distances, but still exists if the snowball is close to the player.
  9. Hello, I'm not sure how to send the packet, but I have found the classes. I've googled for a while but can't find the answer. Thanks for the help so far though!
  10. After some experimenting, I also discovered that when I only push the entity on the client side(worldObj.isRemote), it goes the first half of the flight, and the opposite for the server. I guess that means that without an isRemote or !isRemote check, the two are combined into one, so the snowball has to move quickly to get to the server bit after the client part is done, which explains the fast zone.
  11. Hello, I have a tile entity that is changing the motion of certain entities around it, like snowballs. If I change the motionX/Y/Z of the snowball, the movement is pretty strange. First it goes like it should, then goes hyperspeed in the middle of flight(almost teleports) and then returns back to normal. Is this a bug in vanilla minecraft/forge, or am I changing the motion incorrectly? This is basically all I'm doing: entity.motionX = someForceVariable; Any help is appreciated.
  12. Item.getItemFromBlock() Oh, that works too.
  13. Forgot about IItemRenderer, thanks guys! I'll try the code out later today. I assume I can register the IItemRenderer to the block somehow? Maybe through an ItemBlock? Not sure exactly.
  14. Hey forums, I recently made a block in my mod that has some fancy rendering when you place it down. I was wondering how I would render the same effects when the player is holding the block in their hand. I looked through the Item and Block classes to see if there was a method for when you hold the item, I found nothing. I also have tried a tick handler recently, but I'm unsure about which type of tick handler to use. Any help is appreciated.
  15. Hello forums, I've recently been into rendering. I wanted to have some fun with the tessellator and rendering random 3D shapes, like this triangular prism: I currently have the two slanted sides, and the two triangular bits rendering. I want to know how to figure out what 'direction' a group of vertices faces. For example, this code renders the image below: tessellator.addVertexWithUV(0.0F, 0, 0, 1, 0); tessellator.addVertexWithUV(0.5F, 1, 0, 1, 1); tessellator.addVertexWithUV(1.0F, 0, 0, 0, 0); tessellator.addVertexWithUV(0.5F, 0, 0, 0, 1); But, by simply changing a couple of numbers(i.e. the first parameter) and switching some around, I can make it face the opposite direction. What about the new code makes it so that it faces another direction? I only have about 2 days worth of experience on this topic, so sorry if the answer is obvious. Any help is appreciated. EDIT: TheGreyGhost saves the day, once again. Thank you! <3
  16. I apologise for the late reply, was sort of busy yesterday. With your tips, I've figured almost everything out. All that's left is the rendering of the wire. Again, thanks.
  17. I've learned the basics of ray tracing now, but I also found that in the method onBlockActivated(), there are 3 floats at the end that return the exact same value as ray tracing does. Should I still use ray tracing though? Also, I've looked at chickenbones' code once again and saw that he didn't use any of these x, y, and z values that the ray tracing returns, as far as I know. His code was something among the lines of if (hit.subHit==0) ... How can I use the subHit variable?
  18. Thanks for the tips, I'll try that out later.
  19. Hello forums I'm trying to create a block that has multiple hitboxes, like in the Ender Chest mod by Chickenbones. I do realise that the mod is open src, but I feel like I would understand ray tracing better if someone gave me some tips. After doing some research, I learned that you should use ray tracing to find where the player is looking, but I can't figure out how the actual subHit variable works. If anyone can help or has any tips, it would be appreciated.
  20. Ok, I did what you told. It worked. Do I have to move the code over every time?
  21. If you're talking about the MCP/src folder then I don't think that's the one I'm talking about. In Eclipse, on the right, the project says "Minecraft". Then there is a source folder there titled "src".
  22. I still don't see where I need to put my code, but alright, I'll reinstall. Should I be putting it in the src folder?
  23. There is no "minecraft" folder inside src.
  24. I (the other coder) went through the process you described several times. Recompile. Reobfuscate. Nothing happened. Empty reobf/minecraft folder. One of those times, it detected one of my classes, but it never detected all of my code. I need to note that my code is not in the source folder "src", but it's in another one I made. I tried moving my code to the src folder but nothing changed.
×
×
  • Create New...

Important Information

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