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. Ah, yeah, that'd do it. Also, try to use the [code ] tag.
  2. Ah, you're right, I missed that. Also, the pos = pos.add(0, 255, 0); might not be what you want. Don't you want to set the Y value to 255 not add 255? Though, is getBlockState the right function to use here? Pretty sure that's equivalent to getBlockMetadata , although not having actually played with 1.8 I'm admittedly guessing.
  3. world.getBlockState(pos) <-- and where is j? You're looking at the same block every single time.
  4. Potions are mo***fu*** weird. Those "weird strings" are basically a serialized way of doing bitwise math. Add, subtract, AND, NOT, XOR, etc. This is because every single potion in vanilla is a single item with 140 different damage values: Basically, each potion ingredient makes a change to the bits, only works if certain bits are active (for example, you can't make a splash potion out of a bottle of water even though if you give yourself a potion with those flags you will get a splash potion that doesn't exist) etc. etc. The one time I dug into the code I was duplicating it for my own purposes and even then it was tricky to work with and ended up redefining how the string options even worked because I couldn't get the original to do what I wanted/needed.
  5. So I removed all of my int clip = itemStack.stackTagCompound.getInteger("clip"); and replaced it with just the itemStack.stackTagCompound line, but I get the same result. No, not that. Those are local variables. He means this chunk and anything that references these: Item ammoType; String name; double reloadTime; double shotTime; int clipSize; float damage; float baseDamage; String fireSound; String reloadSound; int durability; int currentShotTime = 0; int currentReloadTime = 0;
  6. I know that. I don't have a certain block I'm trying to check for though. I'm trying to check for all blocks that interact only so I can spawn my entity if it doesn't interact. So you want any item when right clicked on any block to spawn something? Jesus christ, talk about a terrible idea...
  7. "JAR files are fundamental archive files, built on the ZIP file format and have the .jar file extension."
  8. Or you could fix your RIGHT_CLICK_BLOCK section of code to actually check for your block. More than one block returns false when right clicked and more than one returns true...
  9. Well. Did you call setTextureName ? What'd you pass?
  10. Change "modmercenario:/items/materiales/aceromercenario" to "modmercenario:materiales/aceromercenario"
  11. No error included in post. Cannot help. If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. Now go and learn Java. That is an order.
  12. Have you tried creating a new IChatComponent?
  13. That function returns void.
  14. You need to add the metadata check, duh.
  15. If you're looking at a GUI, you may need to call: if (worldObj != null) worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); So that the server detects and sends changes to the client.
  16. drawTexturedModalRect(guiLeft + 47, guiTop + 19, 176, 16, k + 1, 16); Lets see. So you're drawing it at an X and Y position (good, that works correctly) with a particular UV (good that works), with a width of K+1 (seems fine) and a height of 16. Uh, it looks like your height is wrong.
  17. All of the functions you're not declaring as overrides automatically default to the version in the superclass. Ergo, you do have supers, they're just not written down.
  18. SMP / SSP have no differences in packets. As long as you do this: @Override public Packet getDescriptionPacket() { NBTTagCompound nbtTag = new NBTTagCompound(); writeToNBT(nbtTag); return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 1, nbtTag); } @Override public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity packet) { readFromNBT(packet.func_148857_g()); } Your TEs will update properly.
  19. Ahhh. I wondered if it had gone TE.
  20. Yeah, "powered" and "in-wall" look like two states that are gotten via looking at adjacent blocks or calling ancillary functions. They're not going to be metadata stored. Though, just looking at the documentation available on the wiki, it is unclear how the flower pot works (22 different states, one of which is 'empty').
  21. StatCollector.translateToLocal(block.getUnlocalizedName())
  22. Make that parameter a variable that changes based on [whatever you want].
  23. Need more code. How are you setting anyblock ? In order to get the "full" name you need the block's metadata. The world has that information, but it entirely depends on what variables you have access to, which requires seeing the whole function.
  24. Well the first parameter is the player you're not sending the packet to ( entityplayermp != p_148543_1_ ). The last one is the packet to send. The integer right before the packet is the dimension ( entityplayermp.dimension == p_148543_10_ ). The double right before that is the radius ( d4 * d4 + d5 * d5 + d6 * d6 < p_148543_8_ * p_148543_8_ -> the distance formula, minus the square root). The remaining three parameters are the coordinates to send around (x, y, and z in order).

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.