Everything posted by Draco18s
-
[1.7.10]Gui rendering repeatively
Alot no want your thanks.
-
[1.8][Solved] drawing a simple line
This isn't going to give you everything, but it will give you enough to get started. You're still going to need to get the coorridinates you want to draw to/from yourself as well as modify this code to draw bounding boxes, rather than center to center. (The tessellator, by the way, is just a wrapper and helper class that uses GL commands under the hood). GL11.glPushMatrix(); GL11.glPushAttrib(GL11.GL_ENABLE_BIT); Vec3 pos = event.player.getPosition(event.partialTicks); //because of the way 3D rendering is done, all coordinates are relative to the camera. This "resets" the "0,0,0" position to the location that is (0,0,0) in the world. GL11.glTranslated(-pos.xCoord, -pos.yCoord, -pos.zCoord); GL11.glDisable(GL11.GL_LIGHTING); GL11.glDisable(GL11.GL_TEXTURE_2D); //you will need to supply your own position vectors drawLineWithGL(pos1, pos2); GL11.glPopAttrib(); GL11.glPopMatrix(); //... private void drawLineWithGL(Vec3 blockA, Vec3 blockB) { int d = Math.round((float)blockA.distanceTo(blockB)+0.2f); GL11.glColor3f(0F, 1F, 0F); float oz = (blockA.xCoord - blockB.xCoord == 0?0:-1f/16f); float ox = (blockA.zCoord - blockB.zCoord == 0?0:1f/16f); GL11.glBegin(GL11.GL_LINE_STRIP); //you will want to modify these offsets. GL11.glVertex3d(blockA.xCoord + 0.5,blockA.yCoord - 0.01,blockA.zCoord + 0.5); GL11.glVertex3d(blockB.xCoord + 0.5,blockB.yCoord - 0.01,blockB.zCoord + 0.5); GL11.glEnd(); } This will draw a line from the underside-center to the underside-center in green. Your "the yellow bits don't need to be visible" in this code sample would be true, the lines drawn will be hidden by geometry. IIRC, in order to draw on top of geometry (the yellow bits visible) you need to call GL11.glDisable(GL11.GL_DEPTH_TEST); I have most of the GL commands outside the function because I was drawing multiple lines, so I did not need to set my settings, and then unset them, between each line. Line_strip was inside, because my actual use uses QUADS, so my LINE_STRIP drawing function had to specify. LINE_STRIP. Not STIPPLE. GL_LINE_STIPPLE is an enable/disable parameter that makes lines drawn with GL_LINES or GL_LINE_STRIP to be dashed.
-
[1.7.2] I want right click blockchest during the sneak.
We do not understand you.
-
[1.7.10] bytecode doesn't seem to match sourcecode
See my post here. You should be able to follow the folder path and find the original jar files nearby. http://www.minecraftforge.net/forum/index.php/topic,33642.0.html
-
[1.7.2] I want right click blockchest during the sneak.
It is already or not sir ? Why want create it ? You need to USE the event, not create it, instantiate it, or anything else. You need to create a LISTENER.
-
Spawning my entity causes gamecrash[STILL UNSOLVED]
Correction: Use the UUID.
-
[1.7.2] I want right click blockchest during the sneak.
http://jabelarminecraft.blogspot.com/p/minecraft-forge-172-event-handling.html
-
[1.8] Entity model not rotating properly
Math.toRadians(angdeg)
-
Spawning my entity causes gamecrash[STILL UNSOLVED]
More than one constructor: more than one place that the file needs to be specified. The EntityVehicle(World) constructor will be called at some point.
-
[1.8] Render not taking into account the world lighting.
Random guess: Have you tried GL11.glDisable(GL11.GL_TEXTURE_2D); ? I was doing some GL work a few weeks back and not having that disabled was causing what looked like lighting glitches.
-
[1.7.10]Gui openable only for one player
Look at how a chest works. It knows how many people are in it so it can animate open and closed. You should do something similar, only then disallow the interaction when the player attempts to open the GUI if there's already someone in it.
-
Get extact MovingObjectPoition from the Player
Is not magic, but I did miss a line. Vec3 vecPlayer = new Vec3 (entityplayer.posX,entityplayer.posY+entityplayer.eyeHeight,entityplayer.posZ); Edit: Also misnamed one var. I am on my tablet atm. So it should look like this public static MovingObjectPosition getMovingObjectPositionFromPlayer(World world, EntityPlayer entityplayer, boolean flag, double reach) { Vec3 vecPoint = entityplsuer.getLookVec(); Vec3 vecPlayer = new Vec3 (entityplayer.posX,entityplayer.posY+entityplayer.eyeHeight,entityplayer.posZ); MovingObjectPosition movingobjectposition = world.rayTraceBlocks(vecPlayer, vecPoint, false, false, true); return movingobjectposition; }
-
[1.8] how would you render an model on a player?
Just to clarify: hats (etc) aren't entities, they're models. Now that you know that, maybe a search will find that information.
-
[1.8] Entity model not rotating properly
Rotations are in radians.
-
Get extact MovingObjectPoition from the Player
public static MovingObjectPosition getMovingObjectPositionFromPlayer(World world, EntityPlayer entityplayer, boolean flag, double reach) { Vec3 vecPlayer = entityplsuer.getLookVec(); MovingObjectPosition movingobjectposition = world.rayTraceBlocks(vecPlayer, vecPoint, false, false, true); return movingobjectposition; } ?
-
[1.8] Need SRG names of potionRequirements and potionAmplifiers
The csv files are in: ~/.gradle/caches/minecraft/net/minecraftfirge/forge/[version]/unpacked/conf/ Where ~ is your user directory.
-
[1.7.2] I want right click blockchest during the sneak.
Use your IDE to examine the properties and methods of the event object.
-
Get the partial tick?
Again, why? What are you trying to accomplish that doesn't work on full ticks?
- Get the partial tick?
-
How to make reverse gravity
That's not a good reason. Coremods are [Expert+++] level things. It requires a deep understanding of the Java bytecode and the ASM library.
-
[1.7.10] Questions about multiblock structures
That is precisely what's happening. It's called z-fighting. Most mods avoid this problem by not using vanilla blocks in their structures. Your best bet is to create an invisible (but solid) block that replaces the redstone (or whatever) so that the original block doesn't render. But when broken, it drops the original and kills the multiblock.
-
(1.7.10) CoreMod Tutorials.
I don't think they're is one. As for events, there aren't any. There is just a handful of method calls, all of which I think 2 or 3 are important (i.e. The rest can be ignored and you'll still have a working coremod). The hard part will be writing the bytecode to dip what you want. And there will be no audible tutorial of the JVM.
-
(1.7.10) CoreMod Tutorials.
Let me Google that for you. You want the first result.
-
APIs
Its a system that allows moss to communicate or intact through procedures more complex than the FML Message system allows for.
-
[1.7.2] I want right click blockchest during the sneak.
No.
IPS spam blocked by CleanTalk.