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. Out of curiosity, what's the performance difference between keeping them as constants versus returning new int[]{0} every time where is needed?
  2. Show the code for the isOffCooldown(...) method. We need to know why you need access to a World there. As well as why that function is calling getCooldown(...) Notably, because isOffCooldown is calling getCooldown, you could just add a World param to getCooldown and then pass it, then badabing, you have your world object (but still have an infinite loop).
  3. World (or an entity) is passed to most Item methods, the rest have no need.
  4. onLivingUpdate doesn't need to pass the World as a parameter because Entities have a World property that is accessible all the time, this.worldObj.
  5. Uh. Neither 9minecraft nor minecrafteo are "good sites."
  6. Vanilla has unique packets for every tile entity and is not appropriate for mod added tile entities.
  7. Pretty much. All my modding efforts have resulted in $80. Which is an order of magnitude less than I've made from a board game I helped design in two days. And that is about 3 orders less than my actual jobs have paid.
  8. *Facepalm* You get the data out of the packet the same way it got in. Its not fucking magic.
  9. Whichever you want to. It doesn't really matter a whole lot, but the invisible blocks method might be cheaper in terms of rendering.
  10. It works, but the point is you don't need a new variable to hold the information. Just use the same variable you already had. You're not going to break anything.
  11. You shouldn't need to extend BlockSand. My guess is that you're trying to spawn the entity client-side, as opposed to server-side.
  12. I wouldn't use a bounding box greater than a single cube (with slight exceptions, such as a fence, which is why bounding boxes can be up to about 1.5 blocks tall, more than that and the game caps the height, though I am unsure of the precise value. Width/depth are likewise capped to a single block). What you want to do is something like the bed or door, where the primary block spawns the second (and in your case, third) blocks when placed, and if any of them are broken, it breaks all of them.
  13. Axis Aligned Bounding Boxes are aligned to the axis for a reason. All entity bounding boxes are axis aligned as well. You are having to delve deep into code that few people look at, much less touch, and do things that don't make a whole lot of sense. You're going to have to work on the problem by yourself for the most part. Off hand though, it appears that whatever angle of rotation you're using isn't consistently calculated from one draw frame to the next.
  14. The problem is in your json file. Take a look at the json files for colored glass.
  15. What is the problem that you are having?
  16. 1) Why are you doing this? 2) You posted no code.
  17. Make a new constructor that only takes one argument. Done. Magic!
  18. Ugh. Seriously people, @Override is an IDE annotation. It makes Eclipse (or IntelliJ) make sure that the function you have marked as override is actually overriding a function in the superclass hierarchy. "Not putting the annotation" will do jack shit other than not alerting you to potential problems.
  19. But you didn't even change the thing I pointed out.
  20. That doesn't speed up the animation, it just lets the target get hurt immediately.
  21. Current code posted is identical to old code. Anyway, your inability to kill the fire probably has to do with the fact that onItemRightClick is client-side-only. When I was doing this kind of stuff, I had to use packets to properly make right-click functionality work correctly.
  22. Look for where DrawBlockHighlightEvent is dispatched. Work backwards from there (unless you just need to run code when the event happens, in which case, ta da! that's what you were looking for).
  23. Huh. Weird. Haven't run into that before, but I've also never created an asset directory with that name. (Good thing most of the asset directory names are arbitrary!)
  24. *Giggle* Groovy's site says that Groovy has a "flat learning curve" and if they knew what a learning curve actually was, they'd realize that "flat" is not how to describe a curve. Or more specifically, that it's a function f(x) where x is the number of minutes spent and f(x) is skill obtained. A flat result from f(x) means that it's never approaching 1, aka mastery. http://english.stackexchange.com/questions/6209/what-is-meant-by-steep-learning-curve/6226#6226 They should have used the phrase "easy to learn."
  25. Select the assets folder in the Eclipse project view, hit F5

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.