Everything posted by Draco18s
-
Minecraft forge aim teleportation help?
World#clip(...) It performs a raycast against blocks. A lot of things in vanilla use it to determine what you're looking at.
-
1.6.2 (Custom Energy Like Buildcraft/IC2/Thermal Expansion)
Grab their API and start using it. It makes your mod dependent on whichever one you choose, so choose wisely. (There is nothing wrong with creating a mod for another mod, it will however influence the direction and theme of your own mod)
-
Inventory unique ID for same item?
You don't set CURRENT damage in the constructor. The Item class is a singleton, only one of them exists at a time.* Each stack of your Item class is where the current damage comes in. You'd need to look through the player's inventory for those. *Exceptions exist.
-
1.6.2 (Custom Energy Like Buildcraft/IC2/Thermal Expansion)
Put another way: I've been modding for a while and I would still not attempt an energy system. Of course, what value does your own custom energy system that could not be achieved by either a) using IC2 b) using BC c) using Thermal Expansion or d) using Universal Electricity?
-
Biome Registration Event?
Dug into Mystcraft awaiting a reply. Apparently XCW just waits until PostInit then loops through the entire BiomeList for non-null entries. Copied and utilized. Seems odd that Biomes don't fire off a registration event. There is this in the BiomeDictionary: public static void registerAllBiomesAndGenerateEvents() { for(int i = 0; i < BIOME_LIST_SIZE; i++) { BiomeGenBase biome = BiomeGenBase.biomeList[i]; if (biome.theBiomeDecorator instanceof DeferredBiomeDecorator) { DeferredBiomeDecorator decorator = (DeferredBiomeDecorator) biome.theBiomeDecorator; decorator.fireCreateEventAndReplace(); } if(biome != null) { checkRegistration(biome); } } } But it appears to be unused and would cause a crash if called (+1 cookie if you can figure out why).
-
Teleporting a Player to a new Dimension
Note useful for me. I don't use a teleporter.
-
Biome Registration Event?
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});
-
Teleporting a Player to a new Dimension
My fix involved calling travelToDimension followed by a setPositionAndUpdate. Doing that mysteriously doesn't cause a nether portal.
-
Biome Registration Event?
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).
-
Vertical Redstone Wire Block... Help? [UNSOLVED]
Here's the mod itself[/i]. The video should be enough to give you an idea of what's going on.
-
Teleporting a Player to a new Dimension
Already using it: It's a very odd side effect that isn't caused by the Entity#travelToDimension() method directly.
-
How often does the entire entity class get called?
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.
-
Forge src not working [SOLVED]
Did you set up your workspace properly?
-
Teleporting a Player to a new Dimension
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.
-
Reading a private variable
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!
-
Multiple Worlds
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.
-
No blocks showing up?
- [Unsolved]Update Block Texture
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.- error blockFurnace direction!
Replace ModLoader.getMinecraftInstance().getIntegratedServer().worldServers[0] With access- error blockFurnace direction!
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.- Mob / Entity questions
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.- NBT Data help for items
int someColor = nbt.getInteger("currentColorInt"); someColor++; nbt.setInteger("currentColorInt",someColor);- how do i make a ID list in a text file and how do i make an other file to log in
It's called a config file. Configuration config = new Configuration(event.getSuggestedConfigurationFile()); config.load(); int fogID = config.getBlock("Fog", 1549).getInt(); config.save();- NBT Data help for items
public NBTTagCompound createDefault() { NBTTagCompound nbt = new NBTTagCompound("tag"); nbt.setInteger("someStringIdentifier",0); }- Biome too...watery
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. - [Unsolved]Update Block Texture
IPS spam blocked by CleanTalk.
Important Information
By using this site, you agree to our Terms of Use.