Skip to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Draco18s

Members
  • Joined

  • Last visited

Everything posted by Draco18s

  1. Alot no want your thanks.
  2. 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.
  3. 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
  4. 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.
  5. http://jabelarminecraft.blogspot.com/p/minecraft-forge-172-event-handling.html
  6. Math.toRadians(angdeg)
  7. 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.
  8. 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.
  9. 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.
  10. 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; }
  11. Just to clarify: hats (etc) aren't entities, they're models. Now that you know that, maybe a search will find that information.
  12. Rotations are in radians.
  13. 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; } ?
  14. The csv files are in: ~/.gradle/caches/minecraft/net/minecraftfirge/forge/[version]/unpacked/conf/ Where ~ is your user directory.
  15. Use your IDE to examine the properties and methods of the event object.
  16. Again, why? What are you trying to accomplish that doesn't work on full ticks?
  17. That's not a good reason. Coremods are [Expert+++] level things. It requires a deep understanding of the Java bytecode and the ASM library.
  18. 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.
  19. 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.
  20. Let me Google that for you. You want the first result.
  21. Draco18s replied to Asweez's topic in Modder Support
    Its a system that allows moss to communicate or intact through procedures more complex than the FML Message system allows for.

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.