Basically, it's a hazard for zombies and skeletons.
It will emit a light level of 15 like glowstone, will be movable like a torch, and will KILL THE UNDEAD!
So, any zombie/skele that walks within...let's say 5-6 blocks of it catches on fire as if it were in direct sunlight.
However, here's a small problem. I'm not sure how to go about tricking the game into thinking that the 6 block radius around the block is in direct sunlight.
I guess it WOULD be possible to create an area of influence around the block, almost like the 1x1x1 radius of a block of fire, that will light zombie and skeleton entities on fire.
I was hoping someone who has had experience with that kind of thing could point me to the right source file to get started. I've taken a good look at World, BlockFire, EntityFire, and many others, but I can't seem to nail down how to go about creating this sphere of influence.
Also, anyone got any crafting ideas? I was thinking about glowstone in an iron and glass box.
As for crafting. Maybe combining Purple Dye and Glass to make a filtered/tinted glass, that you can combine with glowstone and some stuff?
Know it doesn't really make any sense on a scientific perspective (as all it would do is filter out everything except purple light), but can't think of anything better on the run. Maybe have some diamonds involved too, because everyone knows diamonds are MAGIC. xD
Actually, I may have an idea for a power source. I remember something in Portal 2 that dealt with concentrated solar energy.
Craft a glass sphere with a glass cube on the top, left, right, and bottom. Stick the sphere in the solar collector. Let it collect the rays, and then you stick this sphere inside of the iron and glass box, and wala, you have the sun in a box.
To detect blocks around mobs, I suppose it is possible to, inside EntityZombie/EntitySkeleton/whatever, to get their position (posX, posY, posZ) every tick, and then check for the lamp id around them. So if we took a 2 block radius (for simplicity). You can try and do, for(int i = posX-2; i<=posX+2; i++), and then inside that for(int j = posY-2; etcetc), so you get ints i, j, and k (which are now block coordinates) (the chain of fors select all the blocks within a 2 block radius if you think about it) and then you can do if(world.getBlockId(i,j,k)==yourblock.blockID), then you can do, world.setBlockWithNotify(posX,posY,posZ, .blockID) and then your zombie/skele is on fire! yay.
Rollback Post to RevisionRollBack
Has nice day!
Please no PMing, and no, I'm not a moderator.
It will emit a light level of 15 like glowstone, will be movable like a torch, and will KILL THE UNDEAD!
So, any zombie/skele that walks within...let's say 5-6 blocks of it catches on fire as if it were in direct sunlight.
However, here's a small problem. I'm not sure how to go about tricking the game into thinking that the 6 block radius around the block is in direct sunlight.
I guess it WOULD be possible to create an area of influence around the block, almost like the 1x1x1 radius of a block of fire, that will light zombie and skeleton entities on fire.
I was hoping someone who has had experience with that kind of thing could point me to the right source file to get started. I've taken a good look at World, BlockFire, EntityFire, and many others, but I can't seem to nail down how to go about creating this sphere of influence.
Also, anyone got any crafting ideas? I was thinking about glowstone in an iron and glass box.
As for crafting. Maybe combining Purple Dye and Glass to make a filtered/tinted glass, that you can combine with glowstone and some stuff?
Know it doesn't really make any sense on a scientific perspective (as all it would do is filter out everything except purple light), but can't think of anything better on the run. Maybe have some diamonds involved too, because everyone knows diamonds are MAGIC. xD
Craft a glass sphere with a glass cube on the top, left, right, and bottom. Stick the sphere in the solar collector. Let it collect the rays, and then you stick this sphere inside of the iron and glass box, and wala, you have the sun in a box.
Try out metadataChunkBlock, it seems to have those stuff you might need.
Please no PMing, and no, I'm not a moderator.
PINCH ME!
Thanks for your help, guys. As soon as I get home and get a chance, I'll give it a shot with those classes and functions and see what I can pull up.
I plan to have a slew of "base defenses" up eventually, and mob detection is a must :tongue.gif:
EDIT: ....which I just found.
I can't wait to test this.