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. Programming Sucks at a high level of abstraction enough. Having to think in single-byte instructions is maddening. Two freaking days to write 11 lines of code that insert 2 lines (in regular Java) into BlockCrops. #NeverAgain
  2. That's not what @SideOnly is for.
  3. Yeah, don't use bitwise AND unless you know what you're doing. Eclipse should throw an error...
  4. Fill the volume with invisible technical blocks that do not allow replacement (and otherwise are treated as air).
  5. Unfortunately, I cannot tell which line in your pasted code is TileFuelGenerator.java line 366.
  6. It does look like that, but here's how it's used in EntityLivingBase.java: public void swingItem() { ItemStack stack = this.getHeldItem(); if (stack != null && stack.getItem() != null) { Item item = stack.getItem(); if (item.onEntitySwing(this, stack)) //<-- RIGHT HERE { return; } } if (!this.isSwingInProgress || this.swingProgressInt >= this.getArmSwingAnimationEnd() / 2 || this.swingProgressInt < 0) { this.swingProgressInt = -1; this.isSwingInProgress = true; if (this.worldObj instanceof WorldServer) { ((WorldServer)this.worldObj).getEntityTracker().func_151247_a(this, new S0BPacketAnimation(this, 0)); } } }
  7. And of what type is the ArrayList?
  8. Man, I fcuked up my own URL tags by including the second link! Haha.
  9. Fixed that mangled GitGUI] GitGUI is pretty easy to work with, once you have it set up correctly. It has its flaws, but for pushing and pulling a repo to GitHub its very simple.
  10. Going to drop this in here because it's relevant.
  11. I think it will be more used than those skipped versions in the past, but yeah, there's going to be a A LOT of people--the lower skilled among us and those with less time--who will look at the sheer number of things that they'll have to relearn and say to themselves, "I think I'm happy with 1.7.10, I'll just add Gany's Surface for the 1.8 stuff."
  12. Your TileEntity
  13. 's what everyone else says. And by "everyone" I mean the 12 year olds who claim 4 years of Java experience and can't figure out why casting an Entity that's an instanceof EntityWolf to EntityPlayer crashes.
  14. That sounds like you're missing one of two things: 1) getDescriptionPacket and onDataPacket methods 2) if (worldObj != null) worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); inside your setInventorySlotContents method.
  15. It might Have Something to do With The capitalization Of your Texture files and Folders. Does the Case that you Used in your Code match, EXACTLY, the case Used in your file Structure? Windows doesn't give two shits if its a T or a t, but once it's archived into a JAR or ZIP file, it does.
  16. Unfortunately that doesn't seem to be true for 1.7, I think you're right that it was possible in 1.6 but it's been eliminated, the renderer only ever performs pass 0 and 1, and it skips pass 1 if getRenderBlockPass() doesn't return >=1. Aw that's a bummer.
  17. While this isn't going to solve your problem... SummonSphereShoes var2 double var3 double var5 double var7 Egads man, use intelligent variable names, please. This reeks of decompiled and copy-pasted code. this.rand.nextInt(3); /*...*/ getRNG().nextFloat(); Dafuk? Why didn't you use this.rand both times? It's a protected variable, there's no reason to use the public getter, much less using it in one place and not-using it in another inside the same method.
  18. That: @Override public int getRenderBlockPass() { return renderPass; } Is not what that is for. That function is supposed to return which pass the block renders in, not what pass the rendering is on. Basically, Vanilla is asking your block what pass it needs to render in, you return a 0 (default value for an unassigned integer), which it then goes on to render a Pass 0 and a Pass 1 (your block cheating and getting both) and then finishes with having done two passes (leaving a 1 stored in renderPass, so the next time that getter will return 1, having changed nothing). If you need a third, make that function return 2. IIRC that will cause the Vanilla code to see that "at least one block" requires a third pass and will loop through an extra time.
  19. Probably a mid-point step towards the API. I suspect there will be a revision farther down the line that will make it "simpler" again while retaining the benefits of the new system. But...it probably means I'll be skipping 1.8
  20. Based on having done basically that ("scan all the blocks") it's pretty fast, especially if you use Ernio's method, just keep in mind that an ExtendedBlockStorage object is a 16x16x16 volume (so each one in the array covers a range of 16 blocks on the Y axis inside a given chunk). If you're only looking for grass and leaves, you can easily skip the first 3. The fourth is probably skippable as well. Then you just have to skip the null ones until you run out (its possible for a non-null volume to be above a null volume in the extreme hills biome!). You can see what I did here. There's some things I need to update (like the fact that at one time it was registered as an IWorldGenerator, and now isn't and is called from a chunk generation event, so I can remove that interface).1 But the core loop is valid and handles blocks as their internally native block IDs (to avoid the overhead of converting every int back to a Block). There's some bits you don't need, of course, but that should at least help you figure out how to translate human-readable x/y/z values into the NibbleArray indexes (I had to dig into each call from world.getBlock until I had dissected all the way down to an inline array lookup). Also be alert to the fact that I broke the 16 block volume into two 8 block volumes for my own purposes. 1Huh, I don't remember doing that (Line 151). The hell'd I do that for? *Fixes*
  21. Might want to hash the blocks' position so they don't all run at the same time.
  22. No, I mean why do you need that information? What are you doing with it?
  23. Look at the function in Item.java You return an ArrayList of ItemStacks
  24. Obviously add "return false" just so you can run it. But seriously, are you sure you have the right method signature? If you put @Override on the line above this method, what does Eclipse tell you?

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.