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. Note useful for me. I don't use a teleporter.
  2. Yes....but in order to add a spawn registration I need to hear that the biome exists: EntityRegistry.addSpawn(EntityNetherWisp.class, 1, 1, 1, EnumCreatureType.ambient, {biomes go here});
  3. My fix involved calling travelToDimension followed by a setPositionAndUpdate. Doing that mysteriously doesn't cause a nether portal.
  4. I'm trying to listen for other mods registering biomes so that my mod can set up mob spawns that are appropriate for the registered biome. It appears that this would be the BiomeEvent.CreateDecorator event, but when I listen for that, it never occurs. Widening the net to all BiomeEvents, I only see GetWaterColor and GetGrassColor (which, of course, fire all the time).
  5. Here's the mod itself[/i]. The video should be enough to give you an idea of what's going on.
  6. Already using it: It's a very odd side effect that isn't caused by the Entity#travelToDimension() method directly.
  7. This is a basic java question. The problem with being able to answer it is that I don't know what scope you mean by global. Under the strict definition of global scope, the answer would be "yes" because every time a new necromancer spawned it would set your single, global scope, variable to 0. Which is not what you want.
  8. Did you set up your workspace properly?
  9. I have an item that I would like to have teleport the player back to the overworld (dimension 0), at the overworld spawn position. I'd like to do this WITHOUT creating a nether portal at the overworld destination. Currently it appears that it is doing so, and immediately re-teleporting the player to the nether (regardless of original demarcation dimension). I tried looking at Mystcraft's teleportation code, but it is very complex, and with the amount of obfuscated method and field names I'm unable to follow it.
  10. You would need the obfuscated name. Go into mcp/conf and open up fields.csv in a text editor of your choice (or excel, but notepad is sufficient). Search for the field name ("foodExhaustionLevel" without quotes). Next to it, you'll find an obfuscated name (eg. "field_75126_c"). That is the field name you'd want to use with reflections. Mind that that field name won't work in the dev environment!
  11. I highly recommend Mystcraft. It adds some truly awesome features and if you need help merging your overworlds into Mystcraft ages, several people on the official forums can help out.
  12. 1) setTickRanomly(true); (If I'm remembering the method name properly) 2) world.getBlockId(x, y, z); //x, y, z will be "this block" you'll have to modify the coordinates to get adjacent blocks 3) Can't really. You can however use metadata or adjacent blocks to determine texture.
  13. Replace ModLoader.getMinecraftInstance().getIntegratedServer().worldServers[0] With access
  14. You're still using complicated ModLoader access: public Icon getBlockTexture(IBlockAccess access, int x, int y, int z, int side) { int front = 0; TileEntity tile = ModLoader.getMinecraftInstance().getIntegratedServer().worldServers[0].getBlockTileEntity(x, y, z); Seriously? ModLoader.getMinecraftInstance().getIntegratedServer().worldServers[0]? Dude, you're passed a world from the function parameters. IBlockAccess access. If you don't know what IBlockAccess is, it's basically ALL THE FUNCTIONS A WORLD HAS because World implements IBlockAccess.
  15. 1) I believe so. May have to tie into the "Hurt" event and check to see if the entity would die 2) Yes! Most certainly. 3) Absolutely! 4) With finagling and magical voodoo it would be possible (read: yes, but tricky. Know what you're doing first) 5) You'd need to create a new AI event and know how to program it. You might be able to get away with the behavior that causes wolves to hunt sheep. 6) Look at the Enderman 7) See 6. As for formations, that would require a really good AI structure.
  16. int someColor = nbt.getInteger("currentColorInt"); someColor++; nbt.setInteger("currentColorInt",someColor);
  17. It's called a config file. Configuration config = new Configuration(event.getSuggestedConfigurationFile()); config.load(); int fogID = config.getBlock("Fog", 1549).getInt(); config.save();
  18. public NBTTagCompound createDefault() { NBTTagCompound nbt = new NBTTagCompound("tag"); nbt.setInteger("someStringIdentifier",0); }
  19. I'll see if I can use that at some point to provide an "archipelago" type landscape for Mystcraft worlds. I ventured into the worldgenerator code at one point to see what I could screw with and get the kind of look I wanted (to no success) and then here you come along and have exactly what I want without having done hardly anything (and don't want the result yourself). Thanks.
  20. And if that's not enough for you, you can use CompressedStreamTools to read/write NBT data to any file you want.
  21. I still want your original, "failed" code. It looked awesome in its own way.
  22. Send me your code for that now, I want. (More specifically, it's almost exactly like a world generator a bunch of people would like to see in Mystcraft)
  23. So how does making sure the boundingbox is less than 63 make it spawn underground? Whats the bounding box got to do with if it can spawn underground. How does that work The bounding box thing is Mojang code. However, the bounding box minY just so conveniently happens to also bethe mob's posY[/u]. If the mob's posY is less than 63, then it's HIGHLY LIKELY that the mob is underground. What with ground being 63 and up or covered in water (and thus not a valid spawn location).

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.