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. You need packets.
  2. That's because those lines are referring to my TileEntity. You'll have to convert that to your mob, where appropriate. Do note that my TE rendered the label on one face whereas nametags should be rendered flat to the camera's view plane (ie. you shouldn't rotate it).
  3. What, exactly, are you trying to do? Panel 2 is highly appropriate: http://imgs.xkcd.com/comics/well_2.png[/img]
  4. This might help https://github.com/Draco18s/Artifacts/blob/master/main/java/com/draco18s/artifacts/client/PedestalRenderer.java#L57-107
  5. Because the leaves had initial rotations on them that you're overwriting when it animates.
  6. It depends on what he's doing. If you're doing something "right now because you're looking at this block" then no. If you're doing something like "get me a list of all the valid locations matching X criteria" and picking one (or more) at random/via sorting algorithm, etc. then yeah, you should use a custom class.
  7. Registering the entity doesn't magically make the ItemFishingRod class spawn it when used. And that bit you don't know? It's either strings or ints, which are largely irrelevant. Meaning you can put fuckanything in and it'll work. But it still doesn't magically make the Fishing rod use the new lure.
  8. Add: @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()); }
  9. Where ever you bloody need it. Seriously. You want to know the block's metadata? Get it. Want to change it? Set it. The code snippet I posted is a chunk of code from my own project that is not useful to you except as a demonstration of how that function works.
  10. for(int ox = -1; ox <= 1 && inc; ox++) { for(int oz = -1; oz <= 1 && inc; oz++) { b = world.getBlock(x+ox, y, z+oz); if(b == Blocks.snow_layer || b == this) { mm = world.getBlockMetadata(x+ox, y, z+oz); if(mm < myMetadata) { inc = false; world.setBlockMetadataWithNotify(x+ox, y, z+oz, mm+1, 3); } }
  11. I don't know what the problem is, but: Replace this: Item.ToolMaterial.STONECRUSHER With this: STONECRUSHER
  12. You should save the coordinates found too. Use a custom class that stores both the block and its position, and keep a list of those.
  13. In that case: GL11.gl_rotatef([angle in degrees], 0, 1, 0); Angle is going to be some amount of 90 degree increments, pull from block metadata and multiply.
  14. Technically you aren't rotating the block. You're just displaying the "front" icon on a different side. It's all in the getIcon function (look at the Furnace or the Dispenser).
  15. Seriously dude? That class is everything you need, just copy that ONE class. That class imports Jack and All from the OpenMods library. JACK AND ALL.
  16. setupDecompWorkspace not setupDevWorkspace, the README is a lying bitch. Then quit and relaunch your IDE
  17. import and examinie EnumHelper
  18. Almost none of the parameter names are converted to human-readable and left in SRG format. It bugs me, but I can deal most of the time.
  19. getIcon != getIIcon
  20. Package, class, constant, methods. Yep. (packages are all lower case. Classes are camel case with a capitalized first letter, constants are ALL CAPS, methods, fields, and other variables are camel case with lower case first letter). Because your method signature is wrong. It's not overriding any function in the super class. Look closely.
  21. Oh yeah. I was doing it for my seed for a while until I wanted to add an Information (tooltip) line. Vanilla does a ton of items: itemRegistry.addObject(289, "gunpowder", (new itemRegistry.addObject(288, "feather", (new Item()).setUnlocalizedName("feather").setCreativeTab(CreativeTabs.tabMaterials).setTextureName("feather")); Feathers has no special behaviors, no tooltip, nothing. It just needs an icon, a name, and a creative tab. Sticks, ingots, gunpowder, wheat, bowls, diamonds, flint, leather, brick, clay, bone, glowstone dust, sugar...they all do this.
  22. Or rather, it's common practice and considered good technique, but the compiler doesn't give a shit.
  23. This is why you use @Override If you had @Override on your getIIcon function you would know what the problem is.
  24. You need to set the block#blockIcon to not-null. You might not be using it for the TESR, but the breaking thing does use it.
  25. You'd have to fake it. Keep a stack at the maximum allowed as the "display" stack, then keep an internal counter storing the true value.

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.