Lightning without a fire effect

Started by Norite113 on Sat, 01/12/2019 - 03:07

Topic category: User side tutorials

Last seen on 12:56, 13. Jan 2019
Joined Jan 2018
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Lightning without a fire effect
Sat, 01/12/2019 - 03:10 (edited)
a little help for beginners and not only Minecraft 1.10.2

creating own alterations for the magic I came across the problem at creating one of spells
12 hours of writing and testing
and I achieved the effect I wanted which

variable int size is responsible for area in which the fire is supposed to be out of order

this course book can be a base for creating other objects.
for example
they can change grass into gold
or something else

int size = 2;
for (int X = 0; X <= size; ++X) {
	for (int Y = 0; Y <= size; ++Y) {
		for (int Z = 0; Z <= size; ++Z) {
// ---------------------------------------[+Y]------------------------------------------
		if (world.getBlockState(new BlockPos(i + X, j + Y, k + Z)).getBlock() == Blocks.FIRE) {
			world.setBlockToAir(new BlockPos(i + X, j + Y, k + Z));
			}

		if (world.getBlockState(new BlockPos(i - X, j + Y, k - Z)).getBlock() == Blocks.FIRE) {
			world.setBlockToAir(new BlockPos(i - X, j + Y, k - Z));
			}

		if (world.getBlockState(new BlockPos(i + X, j + Y, k - Z)).getBlock() == Blocks.FIRE) {
			world.setBlockToAir(new BlockPos(i + X, j + Y, k - Z));
			}

		if (world.getBlockState(new BlockPos(i - X, j + Y, k + Z)).getBlock() == Blocks.FIRE) {
			world.setBlockToAir(new BlockPos(i - X, j + Y, k + Z));
			}

// ---------------------------------------[-Y]------------------------------------------
		if (world.getBlockState(new BlockPos(i + X, j - Y, k + Z)).getBlock() == Blocks.FIRE) {
			world.setBlockToAir(new BlockPos(i + X, j - Y, k + Z));
			}

		if (world.getBlockState(new BlockPos(i - X, j - Y, k - Z)).getBlock() == Blocks.FIRE) {
			world.setBlockToAir(new BlockPos(i - X, j - Y, k - Z));
			}

		if (world.getBlockState(new BlockPos(i + X, j - Y, k - Z)).getBlock() == Blocks.FIRE) {
			world.setBlockToAir(new BlockPos(i + X, j - Y, k - Z));
			}

		if(world.getBlockState(new BlockPos(i - X, j - Y, k + Z)).getBlock() == Blocks.FIRE)
			{world.setBlockToAir(new BlockPos(i - X, j - Y, k + Z));
			}
		}
	}
}

 

 

Edited by Norite113 on Sat, 01/12/2019 - 03:10