Everything posted by Draco18s
-
Iron Golem Spawning
Spawning Iron Golems: check The question: making spawned iron golems hostile to the player. Is it possible to make already-hostile iron golems without creating a custom mob? I consider this a nice-to-have, but I'm not even sure where to start with this.
-
Setting an x,y,z location with a tool in game
Yes. Look at world.rayTraceBlocks_do_do(...)
-
How does Minecraft internally store blocks in memory?
Came as a result of someone needing blockIDs > 255 in their worldgen, so they posted on BinaryMage for some help and that was supplied, figured it was relevant here.
-
Function called for Items in Chests?
Because of the way my items are built, I'm already using the EntityItemUpdate function (as there are effects which use it) so tying into that isn't difficult and keeps everything inside my Item class.
-
How does Minecraft internally store blocks in memory?
Also some helpful insight from XCompWiz:
-
[solved][1.6.4]How to spawn entities
No. Because you're doing it through Forge ModLoader. EntityRegistry.addSpawn(EntityBlinkDog.class, 8, 2, 4, EnumCreatureType.monster, BiomeGenBase.plains); And for spawn eggs: EntityList.addMapping(EntityBlinkDog.class, "Blink Dog", 4, 14342901, 8026845); You'll have to look up what each of the ints do, the only ones I remember are the second two in the spawn egg (the big ones): they refer to the base and spot color on the egg icon.
-
Function called for Items in Chests?
It gets tossed into the world as an EntityItem, and because THAT receives updates, it's easy to go "oh, hey, I've been dropped. Hey NBT, what was the player's entity ID?"
- Waiting 2 seconds?
-
DungeonHooks.addDungeonLoot ?
To help get into structures, take a look at this: http://www.minecraftforum.net/topic/1336152-132-updated-metadata-support-simple-schematic-to-java-file-converter/ While the code outputted is for 1.3.2, there's only a handful of names that need to be changed to make it work. I've also been pointed at MCreator, as it will output Java files that you can edit as well.
-
DungeonHooks.addDungeonLoot ?
I am already aware of how to use ChestGenHooks, ty. As for your question: that you have your own thread for and no, I do not.
-
Change the face of the block
Its based on the block metadata. You're not going to find a class level variable for it.
-
DungeonHooks.addDungeonLoot ?
My goal was to allow other mods to build dungeons that would get my loot without adding it to the vanilla dungeon loot list. Apparently the person who sent me that link doesn't understand what dungeon loot is properly.
-
Change the face of the block
Look at BlockLog for how vanilla handles it.
-
DungeonHooks.addDungeonLoot ?
I got pointed at this tutorial and it's clearly both inaccurate (uses both MinecraftForge.addDungeonLoot and DungeonHooks.addDungeonLoot in its examples) and out of date (this method exists in neither). Where has it gone? ChestGenHooks has this comment: //Currently implemented categories for chests/dispensers, Dungeon loot is still in DungeonHooks Which is also...wrong, as DungeonHooks only has add/remove mob.
-
Function called for Items in Chests?
Moritz and I found a solution that works well enough: onUpdate, if the player has an inventory open, remove effect. So the effect is suppressed while they're looking in a chest.
-
Function called for Items in Chests?
I'm not sure that's all that viable either, as these effects are unique (each has a separate UUID for the SharedMonsterAttribute system, so that they stack), so I need to remove exactly the one that was placed into the chest. I'd have to add several flags to every player. :\ If they have any, then I need to loop through their entire inventory and verify each one.
-
Function called for Items in Chests?
I want to know when it's NOT in the player's inventory. And scanning every inventory of every player on a server ever tick is not a viable solution. I only need the function called once (the frame that it leaves the player's inventory) but I need something.
-
[1.5.2] Make tools glow?
You can do it client side only, Dynamic Lights does, but I don't know how to go about doing that.
-
[1.5.2] Make tools glow?
I get around it by not updating the light block every tick, but rather every 3.5 blocks between where the light SHOULD be and where it IS.
-
2x2x2 Techne Model Block
AxisAlignedBB.getAABBPool().getAABB(double, double, double, double, double, double)
-
2x2x2 Techne Model Block
Return a new AABB that is the right size. The collission box, the boundary size, and the MovingObjectPosition collisionRayTrace box are all used for different purposes. You'll need to set all three of them to being your 2x2x2 box.
-
[1.5.2] Make tools glow?
I did this. The way I did it is not...very clean but it works. Essentially check during the item's onUpdate call to see if it's the current item (I did all the time, even when dropped, but this is what you're looking for). Then if so, spawn at the player's head (if air) a block that has the following properties: 1) Emits Light 2) Material.air 3) Resistance and Hardness 0 4) getCollisionBoundingBoxFromPool returns null 5) collisionRayTrace returns null 6) shouldSideBeRendered, isOpaqueCube, renderAsNormalBlock returns false Mind that placing and removing a light-emitting block is laggy if you do it all the time (lighting updates) so you'll want to use your item's ItemStack stackTagCompound to store both WHERE you placed the light (so you can remove it) and WHEN (so you can count up/down towards the next time you'll place a light block).
-
Function called for Items in Chests?
I have an item that applies a passive effect to the player that's carrying it, and I can remove this effect when the item is dropped, but I can't seem to find a spot that will let me know that the item was removed from the player's inventory and placed into another object's inventory.
-
2x2x2 Techne Model Block
/** * Returns a bounding box from the pool of bounding boxes (this means this box can change after the pool has been * cleared to be reused) */ public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World, int par2, int par3, int par4) { }
-
How does Minecraft internally store blocks in memory?
A chunk is an array of ExtendedBlockStorage objects, each of which is 16x16x16. So 16 of them. (An ExtendedBlockStorage is a fancy class that stores blocks as two arrays: one for the least significant bits as a byte and one, complex data type that is effectively a byte with some other functions, for the most significant bits).
IPS spam blocked by CleanTalk.