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. Ignore it. Client and server are the same thing these days, I don't know why that error is there, but it's not critical.
  2. par3/4/5 are an XYZ block location. IWorldGenerator passes a chunkX and chunkZ (so cX of 10 = world location of 160). You'll have to calculate Y manually. See this class for an example.
  3. There are no sprite indexes any more. Sprite sheets are generated at runtime from separate icon images.
  4. return true/false; -> return;
  5. Uh huh. You add the unimplemented methods, the move the code that exists in the methods you have into those methods.
  6. Then implement IWorldGenerator rather than extending WorldGenerator Note: That will probably cause errors, which you will need to fix, but the bulk of what you want to happen will remain constant. You'll probably just end up retyping a variable or method name.
  7. Er, no. That won't work. The bitwise AND you've got there will return 0 all the time, because this happens: 1101 (this is a metadata value expressed in binary. 0011 (3, binary) 0100 (4, binary) metadata & 3 = (1101) & (0011) -> 1 & 0 = 0, 1 & 1 = 1 -> 0001 previous result & 4 = (0001) & (0100) -> 0000 In order to get the 4 directions preserving on/off and open/close you'd just return the metadata value without modifying it.
  8. worldGen = new WorldGenLithium (someVal); GameRegistry.registerWorldGenerator(worldGen);
  9. This may be helpful (note: several things are going on in that class, quicksand is the only one you need to look at). I'm not sure that clay uses WorldGenLakes(...) but it probably uses something close.
  10. See line 153. Probably not the best method in the world, but it works. (Note: that particular class doesn't care about currently-active status, but that's just a flag)
  11. I would direct you to a wiki tutorial I wrote on this very subject, but the wiki appears down. Instead: All the way at the bottom.
  12. new ResourceLocation("assets/more_apples:textures/gui/container/Status Effect Icons.png"); "assets" is implied, you don't need it.
  13. And what does EntityMob extend?
  14. So uh. Let me guess. Your mob extends EntityLiving doesn't it? And your mob attacks ALL ENTITYLIVING INSTANCES. 2 + 2 = ? (Side note: the player does not extend EntityLiving)
  15. A player object is not required for the TNT to function, but that particular function has one available. Slight difference.
  16. Why is this: new ItemStarParts(4002); Not using a config based ID?
  17. onBlockPlacedBy will pass a player necessary to make it go boom.
  18. You can use IWorldGenerator to look for huts, actually. They are built with a material that appears no where else in worldgen, IIRC (spruce planks). Generate a bunch of worlds and figure out the Chunk coordinates* of a unique block position of the hut (e.g. the block that makes the door). Because huts are in swamps and at sea level, you will also want the Y coordinate. Check out how I look for pyramids: in this class. Line 63ish. *By which I mean the block's coordinates inside a chunk. 0-16.
  19. Fixed that for you. Madao, why are you using ModLoader.addName instead of LanguageRegistry.addName? ModLoader.addRecipe instead of GameRegistry.addShapedRecipe ?
  20. Ok, basic question: Why?

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.