Jump 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. It crashes, because that's not how you open a gui. https://github.com/Draco18s/Artifacts/blob/master/main/java/com/draco18s/artifacts/block/BlockPedestal.java#L140 Also, you have a huge crapton of stuff you absolutely should not need in your ContainerGrinder class. You can see caves through the block because you didn't override renderAsNormalBlock and isOpaqueCube to return false: the neighboring blocks are seeing your block as a full, solid, cube, so they're not bothering to render faces that can't be seen.
  2. Look at the Javadoc on world.setBlock(int, int, int, Block, int, int)
  3. As an aside, any reason you aren't storing references to your blocks and items where they can be easily accessed? That would eliminate the need to so FindBlock.
  4. The thing you see in your inventory is a 3D model of it in the world, seen from a diagonal, orthographic, viewpoint. You are unlikely to get this representation as a flat texture to draw on the face of a block. Which is why barrel mods draw a 3D block sticking out.
  5. Yeah, there's a boolean in the TileEntity class that controls their tick/not-tick behavior. There's a setter for it. Use it. (Or a function you override, I haven't actually messed with 1.8 yet, but the standard behavior still exists)
  6. Nope. And I managed to dredge up an older post of my own that gave me what I needed, albeit in decimal format. glDisable(GL_TEXTURE_2D);
  7. Calling tess.setColor...no good Calling tess.setColor and GL11.glColor...no good Calling GL11.glColor...no good :\
  8. Then the color might be oriented in RGBA instead of ARGB
  9. Complete the next item in the series: 0, 8, 16...
  10. Sticks don't have their own class, so DamageTypes don't. In fact, many damage types in Minecraft don't have a separate class. However, the damage sources caused by entities are dynamic objects, created as needed based on the entity causing the damage and what (simple type) of damage it is. You're free to create a new class if you want, it gives you a little extra flexibility such as being able to customize the death-by message, func_151519_b . But the existing classes should be sufficient for your needs.
  11. Or you could check for a null world object and then supply a 0 for metadata instead.
  12. Lets dive in with our IDE, shall we? There's fortunately not a lot going on here. All of our parameters are getting passed to another function ( getDrops ), except one, p_149690_6_ which is being compared to a random value. This must be the probability of dropping each item returned by getDrops . So what does getDrops do? Oh hey, all of our other paramters now have names!
  13. Or more accurately, because of math, it's 0 (you start with 0 and start adding things together, and none of the values added end up in the set of bits used by alpha, so its 0). Also, drop the & 255 bit. That's setting all of your color values to 0. red = 128; //red is 128 red = red << 16; //red is 8388608 red = red & 255; //red is 0 /* 100000000000000000000000 & 11111111 ========================== 000000000000000000000000 */
  14. There are times when using the Property directly has its benefits. For example, I have an array of ints used as a dimension blacklist. To keep things organized, I tell the code to read the list, then sort it, and save it back to the config file. The only way to set a config property is through the Property object (the "get" from the config object only supplies a default, it doesn't change what's there). So the tutorial is not, technically, wrong.
  15. Server wins. It wouldn't make much sense otherwise. (But it does depend on what you're trying to do, if the code that references these strings only runs client side, then the client wins).
  16. Nope, didn't help. :\ I'm using the Tessellator for drawing, btw. And I've already got tess.setBrightness(15728880) , but it hasn't made a difference either.
  17. 1) I trimmed it (there's about 12 lines I removed, checking for various things). I know about push/pop. In retrospect I should have left that in. 2) GL11.glPushAttrib(GL11.GL_ENABLE_BIT) fixed the block outline color though, thanks! But I still have an issue with the lighting on the quads being incorrect.
  18. Here's just about anything you could ever want to do in an item in one item.
  19. Also use your IDE.
  20. I'm trying to draw some world-information as an overlay (so 3D quads, not 2D HUD things) and I'm having two problems: 1) I can't get the quads to be full-bright. They flicker between various lighting values as the camera moves. Pic 2) The block outline's outline color changes. Pic @SubscribeEvent public void renderEvent(DrawBlockHighlightEvent event) { ... GL11.glPushMatrix(); GL11.glTranslated(-event.player.posX, -event.player.posY, -event.player.posZ); GL11.glDisable(GL11.GL_LIGHTING); drawLine(thisBlock, points[i]); ... } private void drawLine(Vec3 blockA, Vec3 blockB) { Tessellator tess = Tessellator.instance; tess.setBrightness(15728880); tess.startDrawing(7); int d = Math.round((float)blockA.distanceTo(blockB)+0.2f); tess.setColorOpaque_F(1F, 0F, 0F); float ox = (blockA.xCoord - blockB.xCoord == 0?-1f/16f:0); float oz = (blockA.zCoord - blockB.zCoord == 0?1f/16f:0); if(blockA.xCoord - blockB.xCoord > 0 || blockA.zCoord - blockB.zCoord > 0) { tess.addVertex(blockA.xCoord + 0.5 + ox, blockA.yCoord - 0.01, blockA.zCoord + 0.5 + oz); tess.addVertex(blockB.xCoord + 0.5 + ox, blockB.yCoord + 0.99, blockB.zCoord + 0.5 + oz); tess.addVertex(blockB.xCoord + 0.5 - ox, blockB.yCoord + 0.99, blockB.zCoord + 0.5 - oz); tess.addVertex(blockA.xCoord + 0.5 - ox, blockA.yCoord - 0.01, blockA.zCoord + 0.5 - oz); } else { tess.addVertex(blockA.xCoord + 0.5 - ox, blockA.yCoord - 0.01, blockA.zCoord + 0.5 - oz); tess.addVertex(blockB.xCoord + 0.5 - ox, blockB.yCoord + 0.99, blockB.zCoord + 0.5 - oz); tess.addVertex(blockB.xCoord + 0.5 + ox, blockB.yCoord + 0.99, blockB.zCoord + 0.5 + oz); tess.addVertex(blockA.xCoord + 0.5 + ox, blockA.yCoord - 0.01, blockA.zCoord + 0.5 + oz); } tess.draw(); } What've I missed?
  21. Don't ever assume what "common" (or rare or whatever) is when working with materials that are either vanilla (ender pearls, nether stars, etc) or common mod things (tin, copper). The rarity of materials is entirely dependant on mod composition. A tech mod, for instance, we'll use a TON of iron, making that resource more rare (because there are more things wanting it). Which is why nether stars tend to be the "go to" uber rare resource got a number of mods. And is like "hold on, I haven't even found a nether skeleton yet, much less gotten three skulls."
  22. And what, prey tell, did you expect an empty onNeighborChange function do?

Important Information

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

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.