Jump to content

Recommended Posts

Posted

Hello, I have made a structure and have been able to get it to spawn, but I have it spawning in the plains biome and as you know there is a lot of grass and tall grass. So my structure will not spawn if there is grass or tall grass. Is there a way to check if it's a certain material, and if it is then say  my structure can replace it. 

Posted

Should be a isReplacable() method on the block class. It isn't handled by the material. 

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted
1 hour ago, Draco18s said:

Should be a isReplacable() method on the block class. It isn't handled by the material. 

I have tried that, it was in the material class it is Material.isReplaceable. But my structure still wouldn't replace it. Also should I use an if statement like if it is replaceable then spawn my structure? Or should I just set isReplaceable.

Posted

You need to ask the block in the world if it is replaceable and if so, replace it.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted
1 hour ago, Draco18s said:

You need to ask the block in the world if it is replaceable and if so, replace it.

So I could do something like: 

 

Black block = world.getBlock();

if(block = Blocks.TALLGRASS){

block.isReplaceable();

 

I know this isn't exact but I don't have my computer in front of me right now

Posted
11 minutes ago, funsize888 said:

So I could do something like: 

 

Black block = world.getBlock();

if(block = Blocks.TALLGRASS){

block.isReplaceable();

 

I know this isn't exact but I don't have my computer in front of me right now

No. isReplaceable() is not a setter, it's a getter. Meaning when you call it, it is returning true or false, meaning whether or not the block is replaceable. It does not set that. You should be checking the value of isReplaceable() to determine if the block is, in fact, replaceable, and if so, using other methods (such as World#setBlockState or something) to replace it.

Whatever Minecraft needs, it is most likely not yet another tool tier.

Posted
7 hours ago, IceMetalPunk said:

No. isReplaceable() is not a setter, it's a getter. Meaning when you call it, it is returning true or false, meaning whether or not the block is replaceable. It does not set that. You should be checking the value of isReplaceable() to determine if the block is, in fact, replaceable, and if so, using other methods (such as World#setBlockState or something) to replace it.

Sorry, I'm a little confused still and I'm not quite sure what to put. Also do I have to do this with Bloack or can I do it with Material

Posted (edited)
9 minutes ago, funsize888 said:

Sorry, I'm a little confused still and I'm not quite sure what to put. Also do I have to do this with Bloack or can I do it with Material

You wrote that you could do if(block == Blocks.TALLGRASS).
I am not sure whether that is possible in forge, but if it is you could just replace it if the Statement Returns true.

 

EDIT: I think you should post your structure code,

because in the Block class it says that tall grass is replaceable, which means that it would be replaced if the structure spawned

Edited by ArmamentHaki
Posted (edited)
1 hour ago, ArmamentHaki said:

You wrote that you could do if(block == Blocks.TALLGRASS).
I am not sure whether that is possible in forge, but if it is you could just replace it if the Statement Returns true.

 

EDIT: I think you should post your structure code,

because in the Block class it says that tall grass is replaceable, which means that it would be replaced if the structure spawned

I don't have my computer with me right now, but thank you for your help and I'll try it when I can

Edited by funsize888
Posted

You don't want to check if the block is TALLGRASS, that only helps you against tall grass, not snow or other things.

You want to check if the block isReplaceable

  • Like 1

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted
On 7/1/2017 at 10:19 AM, Draco18s said:

You don't want to check if the block is TALLGRASS, that only helps you against tall grass, not snow or other things.

You want to check if the block isReplaceable

In that case I shouldn't have to write any code for it, if the blocks are already replaceable.

Posted

Yes, you do. isReplacable() isn't checked during world.setBlockState(), it's checked by ItemBlock's onUse action.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

 

3 hours ago, Draco18s said:

Yes, you do. isReplacable() isn't checked during world.setBlockState(), it's checked by ItemBlock's onUse action.

Ah, ok will test when I get home.

Posted (edited)
On ‎7‎/‎3‎/‎2017 at 7:18 PM, Draco18s said:

Yes, you do. isReplacable() isn't checked during world.setBlockState(), it's checked by ItemBlock's onUse action.

ok this is what I did:

Block block = world.getBlockState(new BlockPos(i,j,k)).getBlock();
		
		
		
		if(block.isReplaceable(world, new BlockPos(i,j,k))){	
		if(world.getBlockState(new BlockPos(i,j,k)).getBlock() == Blocks.GRASS) {
		if(world.getBiomeForCoordsBody(new BlockPos(i,j,k)).getBiomeClass().equals(BiomePlains.class)){
		if ((random.nextInt(1000) + 1) <= 100) {
		
			boolean place = true;

			for (int y = 0; y < 13; y++)
				for (int z = 0; z < 10; z++)
					for (int x = 0; x < 10; x++)
						if (world.getBlockState(new BlockPos(i + x, j + y + 1, k + z)).getBlock() != Blocks.AIR)
							place = false;

			if (place) {

It still doesn't spawn in the plains, or at all for that matter when that code is there

Edited by funsize888
Posted

You're checking if the Block is both replaceable and is equal to Blocks.GRASS, which will never be true because Blocks.GRASS isn't replaceable.

 

You can use the && (and) operator to combine multiple boolean expressions (like the conditions of the four if statements) into one.

 

Don't call World#getBiomeForCoordsBody directly, call World#getBiomeForCoords instead. This allows the WorldProvider to return the appropriate Biome (this may or may not call World#getBiomeForCoordsBody).

 

Don't compare to Blocks.AIR directly, use Block#isAir to support modded air-like blocks.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Posted
6 hours ago, Choonster said:

You're checking if the Block is both replaceable and is equal to Blocks.GRASS, which will never be true because Blocks.GRASS isn't replaceable.

 

You can use the && (and) operator to combine multiple boolean expressions (like the conditions of the four if statements) into one.

 

Don't call World#getBiomeForCoordsBody directly, call World#getBiomeForCoords instead. This allows the WorldProvider to return the appropriate Biome (this may or may not call World#getBiomeForCoordsBody).

 

Don't compare to Blocks.AIR directly, use Block#isAir to support modded air-like blocks.

since the tall grass is one block above the grass shouldn't I do i,j+1,k

Posted

If you only want to replace tall grass, you should only check for tall grass.

If you want to replace all replacable blocks, use isReplacable.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted (edited)
2 hours ago, Draco18s said:

If you only want to replace tall grass, you should only check for tall grass.

If you want to replace all replacable blocks, use isReplacable.

		if(world.getBlockState(new BlockPos(i,j+1,k)).getBlock().isReplaceable(world, new BlockPos(i,j+1,k))) {
		if(world.getBlockState(new BlockPos(i,j,k)).getBlock() == Blocks.GRASS) {

I have this and its still not working

Edited by funsize888
Posted (edited)
9 hours ago, Choonster said:

You're checking if the Block is both replaceable and is equal to Blocks.GRASS, which will never be true because Blocks.GRASS isn't replaceable.

 

You can use the && (and) operator to combine multiple boolean expressions (like the conditions of the four if statements) into one.

 

37 minutes ago, funsize888 said:

		if(world.getBlockState(new BlockPos(i,j+1,k)).getBlock().isReplaceable(world, new BlockPos(i,j+1,k))) {
		if(world.getBlockState(new BlockPos(i,j,k)).getBlock() == Blocks.GRASS) {

I have this and its still not working

Are you trying to replace the block above the grass or the grass itself?

You are now saying " if the block above is replaceable and the block is grass, do the following:"

Edited by Alpvax
Missed part of the quote
Posted (edited)

Are you calling this on the server side? (Use world.isRemote to check, it will be false on the server).

Where are your i, j, and k variables coming from? You should probably only create the BlockState BlockPos once. And you can use BlockState BlockPos.up (or something similar) to get the BlockPos above.

 

You should post your full structure code (or even better a link to a git repository).

Edited by Alpvax
Correcting BlockState to BlockPos
Posted
package structure.gen;

import java.util.Random;

import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.init.Blocks;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.tileentity.TileEntityChest;
import net.minecraft.tileentity.TileEntityMobSpawner;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraft.world.biome.BiomePlains;
import net.minecraft.world.chunk.IChunkGenerator;
import net.minecraft.world.chunk.IChunkProvider;
import net.minecraftforge.fml.common.IWorldGenerator;
import noahsmod.main.MyMod;

public class Creeper_Temple implements IWorldGenerator {

	
	
	@Override
	public void generate(Random random, int chunkX, int chunkZ, World world, IChunkGenerator chunkGenerator,IChunkProvider chunkProvider) {
	

		
		{
			
			switch (world.provider.getDimension())
			{
			case -1:
				generateNether(world,random,chunkX*16,chunkZ*16);
				
			case 0:
				generateSurface(world,random,chunkX*16,chunkZ*16);
				
			case 1:
				generateEnd(world,random,chunkX*16,chunkZ*16);
			}
			
		}
		
		
		
	}
		

	private void generateEnd(World world, Random random, int i, int j) {
		
		
	}


	private void generateNether(World world, Random random, int i, int j) {
		
		
	}


	public void generateSurface(World world, Random random, int i2, int k2) {

		
		
		int i = i2 + random.nextInt(15);
		int k = k2 + random.nextInt(15);

		int chunkX = i >> 4;
		int chunkZ = k >> 4;
		int height = world.getChunkFromChunkCoords(chunkX, chunkZ).getHeight(new BlockPos(i & 15, 0, k & 15));

		int j = height - 1;
		
		

			
		
		
		

		
		
		
		if(world.getBlockState(new BlockPos(i,j+1,k)).getBlock().isReplaceable(world, new BlockPos(i,j+1,k))) {
		if(world.getBlockState(new BlockPos(i,j,k)).getBlock() == Blocks.GRASS) {
		if(world.getBiomeForCoordsBody(new BlockPos(i,j,k)).getBiomeClass().equals(BiomePlains.class)){
		if ((random.nextInt(1000) + 1) <= 100) {
		
			boolean place = true;

			for (int y = 0; y < 13; y++)
				for (int z = 0; z < 10; z++)
					for (int x = 0; x < 10; x++)
						if (world.getBlockState(new BlockPos(i + x, j + y + 1, k + z)).getBlock() != Blocks.AIR)
							place = false;

			if (place) {
				world.setBlockState(new BlockPos(i + 1, j + 0, k + 1), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 2, j + 0, k + 1), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 3, j + 0, k + 1), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 4, j + 0, k + 1), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 5, j + 0, k + 1), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 6, j + 0, k + 1), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 7, j + 0, k + 1), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 8, j + 0, k + 1), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 1, j + 0, k + 2), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 2, j + 0, k + 2), Block.getBlockById(46).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 3, j + 0, k + 2), Block.getBlockById(46).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 4, j + 0, k + 2), Block.getBlockById(46).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 5, j + 0, k + 2), Block.getBlockById(46).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 6, j + 0, k + 2), Block.getBlockById(46).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 7, j + 0, k + 2), Block.getBlockById(46).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 8, j + 0, k + 2), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 1, j + 0, k + 3), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 2, j + 0, k + 3), Block.getBlockById(46).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 3, j + 0, k + 3), Block.getBlockById(46).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 4, j + 0, k + 3), Block.getBlockById(46).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 5, j + 0, k + 3), Block.getBlockById(46).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 6, j + 0, k + 3), Block.getBlockById(46).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 7, j + 0, k + 3), Block.getBlockById(46).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 8, j + 0, k + 3), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 1, j + 0, k + 4), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 2, j + 0, k + 4), Block.getBlockById(46).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 3, j + 0, k + 4), Block.getBlockById(46).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 4, j + 0, k + 4), Block.getBlockById(133).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 5, j + 0, k + 4), Block.getBlockById(46).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 6, j + 0, k + 4), Block.getBlockById(46).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 7, j + 0, k + 4), Block.getBlockById(46).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 8, j + 0, k + 4), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 1, j + 0, k + 5), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 2, j + 0, k + 5), Block.getBlockById(46).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 3, j + 0, k + 5), Block.getBlockById(46).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 4, j + 0, k + 5), Block.getBlockById(133).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 5, j + 0, k + 5), Block.getBlockById(46).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 6, j + 0, k + 5), Block.getBlockById(46).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 7, j + 0, k + 5), Block.getBlockById(46).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 8, j + 0, k + 5), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 1, j + 0, k + 6), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 2, j + 0, k + 6), Block.getBlockById(46).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 3, j + 0, k + 6), Block.getBlockById(46).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 4, j + 0, k + 6), Block.getBlockById(46).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 5, j + 0, k + 6), Block.getBlockById(46).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 6, j + 0, k + 6), Block.getBlockById(46).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 7, j + 0, k + 6), Block.getBlockById(46).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 8, j + 0, k + 6), Block.getBlockById(4).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 1, j + 0, k + 7), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 2, j + 0, k + 7), Block.getBlockById(46).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 3, j + 0, k + 7), Block.getBlockById(46).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 4, j + 0, k + 7), Block.getBlockById(46).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 5, j + 0, k + 7), Block.getBlockById(46).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 6, j + 0, k + 7), Block.getBlockById(46).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 7, j + 0, k + 7), Block.getBlockById(46).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 8, j + 0, k + 7), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 1, j + 0, k + 8), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 2, j + 0, k + 8), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 3, j + 0, k + 8), Block.getBlockById(98).getStateFromMeta(1), 3);
				world.setBlockState(new BlockPos(i + 4, j + 0, k + 8), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 5, j + 0, k + 8), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 6, j + 0, k + 8), Block.getBlockById(4).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 7, j + 0, k + 8), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 8, j + 0, k + 8), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 9, j + 0, k + 8), Block.getBlockById(106).getStateFromMeta(2), 3);
				world.setBlockState(new BlockPos(i + 1, j + 1, k + 0), Block.getBlockById(106).getStateFromMeta(1), 3);
				world.setBlockState(new BlockPos(i + 2, j + 1, k + 0), Block.getBlockById(106).getStateFromMeta(1), 3);
				world.setBlockState(new BlockPos(i + 3, j + 1, k + 0), Block.getBlockById(106).getStateFromMeta(1), 3);
				world.setBlockState(new BlockPos(i + 4, j + 1, k + 0), Block.getBlockById(106).getStateFromMeta(1), 3);
				world.setBlockState(new BlockPos(i + 7, j + 1, k + 0), Block.getBlockById(106).getStateFromMeta(1), 3);
				world.setBlockState(new BlockPos(i + 9, j + 1, k + 0), Block.getBlockById(18).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 1, j + 1, k + 1), Block.getBlockById(48).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 2, j + 1, k + 1), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 3, j + 1, k + 1), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 4, j + 1, k + 1), Block.getBlockById(48).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 5, j + 1, k + 1), Block.getBlockById(48).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 6, j + 1, k + 1), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 7, j + 1, k + 1), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 8, j + 1, k + 1), Block.getBlockById(48).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 9, j + 1, k + 1), Block.getBlockById(18).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 0, j + 1, k + 2), Block.getBlockById(18).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 1, j + 1, k + 2), Block.getBlockById(98).getStateFromMeta(1), 3);
				world.setBlockState(new BlockPos(i + 7, j + 1, k + 2), Block.getBlockById(54).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 8, j + 1, k + 2), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 9, j + 1, k + 2), Block.getBlockById(106).getStateFromMeta(2), 3);
				world.setBlockState(new BlockPos(i + 1, j + 1, k + 3), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 8, j + 1, k + 3), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 9, j + 1, k + 3), Block.getBlockById(106).getStateFromMeta(2), 3);
				world.setBlockState(new BlockPos(i + 1, j + 1, k + 4), Block.getBlockById(98).getStateFromMeta(1), 3);
				world.setBlockState(new BlockPos(i + 4, j + 1, k + 4), Block.getBlockById(65).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 5, j + 1, k + 4), Block.getBlockById(48).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 8, j + 1, k + 4), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 1, j + 1, k + 5), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 4, j + 1, k + 5), Block.getBlockById(106).getStateFromMeta(8), 3);
				world.setBlockState(new BlockPos(i + 5, j + 1, k + 5), Block.getBlockById(4).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 8, j + 1, k + 5), Block.getBlockById(48).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 0, j + 1, k + 6), Block.getBlockById(106).getStateFromMeta(8), 3);
				world.setBlockState(new BlockPos(i + 1, j + 1, k + 6), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 8, j + 1, k + 6), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 1, j + 1, k + 7), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 2, j + 1, k + 7), Block.getBlockById(54).getStateFromMeta(5), 3);
				world.setBlockState(new BlockPos(i + 8, j + 1, k + 7), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 9, j + 1, k + 7), Block.getBlockById(106).getStateFromMeta(2), 3);
				world.setBlockState(new BlockPos(i + 0, j + 1, k + 8), Block.getBlockById(65).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 1, j + 1, k + 8), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 2, j + 1, k + 8), Block.getBlockById(98).getStateFromMeta(1), 3);
				world.setBlockState(new BlockPos(i + 3, j + 1, k + 8), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 4, j + 1, k + 8), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 5, j + 1, k + 8), Block.getBlockById(98).getStateFromMeta(1), 3);
				world.setBlockState(new BlockPos(i + 6, j + 1, k + 8), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 7, j + 1, k + 8), Block.getBlockById(4).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 8, j + 1, k + 8), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 9, j + 1, k + 8), Block.getBlockById(106).getStateFromMeta(2), 3);
				world.setBlockState(new BlockPos(i + 1, j + 1, k + 9), Block.getBlockById(18).getStateFromMeta(12), 3);
				world.setBlockState(new BlockPos(i + 4, j + 1, k + 9), Block.getBlockById(106).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 7, j + 1, k + 9), Block.getBlockById(18).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 8, j + 1, k + 9), Block.getBlockById(18).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 9, j + 1, k + 9), Block.getBlockById(106).getStateFromMeta(2), 3);
				world.setBlockState(new BlockPos(i + 2, j + 2, k + 0), Block.getBlockById(106).getStateFromMeta(1), 3);
				world.setBlockState(new BlockPos(i + 3, j + 2, k + 0), Block.getBlockById(106).getStateFromMeta(1), 3);
				world.setBlockState(new BlockPos(i + 4, j + 2, k + 0), Block.getBlockById(106).getStateFromMeta(1), 3);
				world.setBlockState(new BlockPos(i + 7, j + 2, k + 0), Block.getBlockById(106).getStateFromMeta(1), 3);
				world.setBlockState(new BlockPos(i + 0, j + 2, k + 1), Block.getBlockById(18).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 1, j + 2, k + 1), Block.getBlockById(48).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 2, j + 2, k + 1), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 3, j + 2, k + 1), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 4, j + 2, k + 1), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 5, j + 2, k + 1), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 6, j + 2, k + 1), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 7, j + 2, k + 1), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 8, j + 2, k + 1), Block.getBlockById(48).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 9, j + 2, k + 1), Block.getBlockById(18).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 0, j + 2, k + 2), Block.getBlockById(106).getStateFromMeta(8), 3);
				world.setBlockState(new BlockPos(i + 1, j + 2, k + 2), Block.getBlockById(98).getStateFromMeta(1), 3);
				world.setBlockState(new BlockPos(i + 8, j + 2, k + 2), Block.getBlockById(48).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 9, j + 2, k + 2), Block.getBlockById(106).getStateFromMeta(2), 3);
				world.setBlockState(new BlockPos(i + 1, j + 2, k + 3), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 8, j + 2, k + 3), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 1, j + 2, k + 4), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 4, j + 2, k + 4), Block.getBlockById(65).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 5, j + 2, k + 4), Block.getBlockById(4).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 8, j + 2, k + 4), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 0, j + 2, k + 5), Block.getBlockById(106).getStateFromMeta(8), 3);
				world.setBlockState(new BlockPos(i + 1, j + 2, k + 5), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 4, j + 2, k + 5), Block.getBlockById(106).getStateFromMeta(8), 3);
				world.setBlockState(new BlockPos(i + 5, j + 2, k + 5), Block.getBlockById(48).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 8, j + 2, k + 5), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 0, j + 2, k + 6), Block.getBlockById(106).getStateFromMeta(8), 3);
				world.setBlockState(new BlockPos(i + 1, j + 2, k + 6), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 8, j + 2, k + 6), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 1, j + 2, k + 7), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 8, j + 2, k + 7), Block.getBlockById(48).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 9, j + 2, k + 7), Block.getBlockById(106).getStateFromMeta(2), 3);
				world.setBlockState(new BlockPos(i + 0, j + 2, k + 8), Block.getBlockById(65).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 1, j + 2, k + 8), Block.getBlockById(48).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 2, j + 2, k + 8), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 3, j + 2, k + 8), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 4, j + 2, k + 8), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 5, j + 2, k + 8), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 6, j + 2, k + 8), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 7, j + 2, k + 8), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 8, j + 2, k + 8), Block.getBlockById(48).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 9, j + 2, k + 8), Block.getBlockById(106).getStateFromMeta(2), 3);
				world.setBlockState(new BlockPos(i + 1, j + 2, k + 9), Block.getBlockById(18).getStateFromMeta(12), 3);
				world.setBlockState(new BlockPos(i + 4, j + 2, k + 9), Block.getBlockById(106).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 7, j + 2, k + 9), Block.getBlockById(18).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 2, j + 3, k + 0), Block.getBlockById(106).getStateFromMeta(1), 3);
				world.setBlockState(new BlockPos(i + 4, j + 3, k + 0), Block.getBlockById(106).getStateFromMeta(1), 3);
				world.setBlockState(new BlockPos(i + 7, j + 3, k + 0), Block.getBlockById(106).getStateFromMeta(1), 3);
				world.setBlockState(new BlockPos(i + 8, j + 3, k + 0), Block.getBlockById(18).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 9, j + 3, k + 0), Block.getBlockById(18).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 0, j + 3, k + 1), Block.getBlockById(18).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 1, j + 3, k + 1), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 2, j + 3, k + 1), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 3, j + 3, k + 1), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 4, j + 3, k + 1), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 5, j + 3, k + 1), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 6, j + 3, k + 1), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 7, j + 3, k + 1), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 8, j + 3, k + 1), Block.getBlockById(98).getStateFromMeta(1), 3);
				world.setBlockState(new BlockPos(i + 9, j + 3, k + 1), Block.getBlockById(106).getStateFromMeta(2), 3);
				world.setBlockState(new BlockPos(i + 0, j + 3, k + 2), Block.getBlockById(106).getStateFromMeta(8), 3);
				world.setBlockState(new BlockPos(i + 1, j + 3, k + 2), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 8, j + 3, k + 2), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 9, j + 3, k + 2), Block.getBlockById(106).getStateFromMeta(2), 3);
				world.setBlockState(new BlockPos(i + 1, j + 3, k + 3), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 8, j + 3, k + 3), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 1, j + 3, k + 4), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 4, j + 3, k + 4), Block.getBlockById(106).getStateFromMeta(8), 3);
				world.setBlockState(new BlockPos(i + 5, j + 3, k + 4), Block.getBlockById(98).getStateFromMeta(1), 3);
				world.setBlockState(new BlockPos(i + 8, j + 3, k + 4), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 0, j + 3, k + 5), Block.getBlockById(106).getStateFromMeta(8), 3);
				world.setBlockState(new BlockPos(i + 1, j + 3, k + 5), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 4, j + 3, k + 5), Block.getBlockById(65).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 5, j + 3, k + 5), Block.getBlockById(4).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 8, j + 3, k + 5), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 0, j + 3, k + 6), Block.getBlockById(106).getStateFromMeta(8), 3);
				world.setBlockState(new BlockPos(i + 1, j + 3, k + 6), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 8, j + 3, k + 6), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 1, j + 3, k + 7), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 8, j + 3, k + 7), Block.getBlockById(48).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 9, j + 3, k + 7), Block.getBlockById(106).getStateFromMeta(2), 3);
				world.setBlockState(new BlockPos(i + 0, j + 3, k + 8), Block.getBlockById(65).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 1, j + 3, k + 8), Block.getBlockById(48).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 2, j + 3, k + 8), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 3, j + 3, k + 8), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 4, j + 3, k + 8), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 5, j + 3, k + 8), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 6, j + 3, k + 8), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 7, j + 3, k + 8), Block.getBlockById(4).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 8, j + 3, k + 8), Block.getBlockById(4).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 1, j + 3, k + 9), Block.getBlockById(106).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 2, j + 3, k + 9), Block.getBlockById(18).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 4, j + 3, k + 9), Block.getBlockById(106).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 5, j + 3, k + 9), Block.getBlockById(106).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 6, j + 3, k + 9), Block.getBlockById(106).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 7, j + 3, k + 9), Block.getBlockById(106).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 8, j + 3, k + 9), Block.getBlockById(18).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 0, j + 4, k + 0), Block.getBlockById(18).getStateFromMeta(12), 3);
				world.setBlockState(new BlockPos(i + 1, j + 4, k + 0), Block.getBlockById(106).getStateFromMeta(1), 3);
				world.setBlockState(new BlockPos(i + 2, j + 4, k + 0), Block.getBlockById(106).getStateFromMeta(1), 3);
				world.setBlockState(new BlockPos(i + 4, j + 4, k + 0), Block.getBlockById(106).getStateFromMeta(1), 3);
				world.setBlockState(new BlockPos(i + 7, j + 4, k + 0), Block.getBlockById(106).getStateFromMeta(1), 3);
				world.setBlockState(new BlockPos(i + 8, j + 4, k + 0), Block.getBlockById(18).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 0, j + 4, k + 1), Block.getBlockById(18).getStateFromMeta(12), 3);
				world.setBlockState(new BlockPos(i + 1, j + 4, k + 1), Block.getBlockById(48).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 2, j + 4, k + 1), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 3, j + 4, k + 1), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 4, j + 4, k + 1), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 5, j + 4, k + 1), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 6, j + 4, k + 1), Block.getBlockById(48).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 7, j + 4, k + 1), Block.getBlockById(48).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 8, j + 4, k + 1), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 9, j + 4, k + 1), Block.getBlockById(106).getStateFromMeta(2), 3);
				world.setBlockState(new BlockPos(i + 0, j + 4, k + 2), Block.getBlockById(18).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 1, j + 4, k + 2), Block.getBlockById(48).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 8, j + 4, k + 2), Block.getBlockById(98).getStateFromMeta(1), 3);
				world.setBlockState(new BlockPos(i + 9, j + 4, k + 2), Block.getBlockById(106).getStateFromMeta(2), 3);
				world.setBlockState(new BlockPos(i + 1, j + 4, k + 3), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 8, j + 4, k + 3), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 1, j + 4, k + 4), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 4, j + 4, k + 4), Block.getBlockById(106).getStateFromMeta(8), 3);
				world.setBlockState(new BlockPos(i + 5, j + 4, k + 4), Block.getBlockById(48).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 8, j + 4, k + 4), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 0, j + 4, k + 5), Block.getBlockById(106).getStateFromMeta(8), 3);
				world.setBlockState(new BlockPos(i + 1, j + 4, k + 5), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 4, j + 4, k + 5), Block.getBlockById(65).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 5, j + 4, k + 5), Block.getBlockById(98).getStateFromMeta(1), 3);
				world.setBlockState(new BlockPos(i + 8, j + 4, k + 5), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 0, j + 4, k + 6), Block.getBlockById(106).getStateFromMeta(8), 3);
				world.setBlockState(new BlockPos(i + 1, j + 4, k + 6), Block.getBlockById(98).getStateFromMeta(1), 3);
				world.setBlockState(new BlockPos(i + 8, j + 4, k + 6), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 9, j + 4, k + 6), Block.getBlockById(106).getStateFromMeta(2), 3);
				world.setBlockState(new BlockPos(i + 1, j + 4, k + 7), Block.getBlockById(98).getStateFromMeta(1), 3);
				world.setBlockState(new BlockPos(i + 8, j + 4, k + 7), Block.getBlockById(98).getStateFromMeta(1), 3);
				world.setBlockState(new BlockPos(i + 9, j + 4, k + 7), Block.getBlockById(106).getStateFromMeta(2), 3);
				world.setBlockState(new BlockPos(i + 0, j + 4, k + 8), Block.getBlockById(65).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 1, j + 4, k + 8), Block.getBlockById(48).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 2, j + 4, k + 8), Block.getBlockById(4).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 3, j + 4, k + 8), Block.getBlockById(4).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 4, j + 4, k + 8), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 5, j + 4, k + 8), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 6, j + 4, k + 8), Block.getBlockById(98).getStateFromMeta(1), 3);
				world.setBlockState(new BlockPos(i + 7, j + 4, k + 8), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 8, j + 4, k + 8), Block.getBlockById(98).getStateFromMeta(1), 3);
				world.setBlockState(new BlockPos(i + 9, j + 4, k + 8), Block.getBlockById(18).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 1, j + 4, k + 9), Block.getBlockById(106).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 2, j + 4, k + 9), Block.getBlockById(106).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 3, j + 4, k + 9), Block.getBlockById(18).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 4, j + 4, k + 9), Block.getBlockById(106).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 5, j + 4, k + 9), Block.getBlockById(106).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 6, j + 4, k + 9), Block.getBlockById(106).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 7, j + 4, k + 9), Block.getBlockById(106).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 8, j + 4, k + 9), Block.getBlockById(18).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 2, j + 5, k + 0), Block.getBlockById(18).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 4, j + 5, k + 0), Block.getBlockById(106).getStateFromMeta(1), 3);
				world.setBlockState(new BlockPos(i + 8, j + 5, k + 0), Block.getBlockById(18).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 0, j + 5, k + 1), Block.getBlockById(106).getStateFromMeta(8), 3);
				world.setBlockState(new BlockPos(i + 1, j + 5, k + 1), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 2, j + 5, k + 1), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 3, j + 5, k + 1), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 4, j + 5, k + 1), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 5, j + 5, k + 1), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 6, j + 5, k + 1), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 7, j + 5, k + 1), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 8, j + 5, k + 1), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 9, j + 5, k + 1), Block.getBlockById(106).getStateFromMeta(2), 3);
				world.setBlockState(new BlockPos(i + 0, j + 5, k + 2), Block.getBlockById(106).getStateFromMeta(8), 3);
				world.setBlockState(new BlockPos(i + 1, j + 5, k + 2), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 8, j + 5, k + 2), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 1, j + 5, k + 3), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 8, j + 5, k + 3), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 1, j + 5, k + 4), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 4, j + 5, k + 4), Block.getBlockById(106).getStateFromMeta(8), 3);
				world.setBlockState(new BlockPos(i + 5, j + 5, k + 4), Block.getBlockById(98).getStateFromMeta(1), 3);
				world.setBlockState(new BlockPos(i + 8, j + 5, k + 4), Block.getBlockById(48).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 9, j + 5, k + 4), Block.getBlockById(18).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 0, j + 5, k + 5), Block.getBlockById(106).getStateFromMeta(8), 3);
				world.setBlockState(new BlockPos(i + 1, j + 5, k + 5), Block.getBlockById(98).getStateFromMeta(1), 3);
				world.setBlockState(new BlockPos(i + 4, j + 5, k + 5), Block.getBlockById(65).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 5, j + 5, k + 5), Block.getBlockById(4).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 8, j + 5, k + 5), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 0, j + 5, k + 6), Block.getBlockById(106).getStateFromMeta(8), 3);
				world.setBlockState(new BlockPos(i + 1, j + 5, k + 6), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 8, j + 5, k + 6), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 9, j + 5, k + 6), Block.getBlockById(106).getStateFromMeta(2), 3);
				world.setBlockState(new BlockPos(i + 1, j + 5, k + 7), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 8, j + 5, k + 7), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 9, j + 5, k + 7), Block.getBlockById(106).getStateFromMeta(2), 3);
				world.setBlockState(new BlockPos(i + 0, j + 5, k + 8), Block.getBlockById(65).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 1, j + 5, k + 8), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 2, j + 5, k + 8), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 3, j + 5, k + 8), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 4, j + 5, k + 8), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 5, j + 5, k + 8), Block.getBlockById(4).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 6, j + 5, k + 8), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 7, j + 5, k + 8), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 8, j + 5, k + 8), Block.getBlockById(98).getStateFromMeta(1), 3);
				world.setBlockState(new BlockPos(i + 9, j + 5, k + 8), Block.getBlockById(18).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 1, j + 5, k + 9), Block.getBlockById(106).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 3, j + 5, k + 9), Block.getBlockById(18).getStateFromMeta(12), 3);
				world.setBlockState(new BlockPos(i + 4, j + 5, k + 9), Block.getBlockById(106).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 5, j + 5, k + 9), Block.getBlockById(106).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 7, j + 5, k + 9), Block.getBlockById(106).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 8, j + 5, k + 9), Block.getBlockById(106).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 1, j + 6, k + 0), Block.getBlockById(18).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 4, j + 6, k + 0), Block.getBlockById(106).getStateFromMeta(1), 3);
				world.setBlockState(new BlockPos(i + 8, j + 6, k + 0), Block.getBlockById(18).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 0, j + 6, k + 1), Block.getBlockById(106).getStateFromMeta(8), 3);
				world.setBlockState(new BlockPos(i + 1, j + 6, k + 1), Block.getBlockById(98).getStateFromMeta(1), 3);
				world.setBlockState(new BlockPos(i + 2, j + 6, k + 1), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 3, j + 6, k + 1), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 4, j + 6, k + 1), Block.getBlockById(48).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 5, j + 6, k + 1), Block.getBlockById(48).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 6, j + 6, k + 1), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 7, j + 6, k + 1), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 8, j + 6, k + 1), Block.getBlockById(98).getStateFromMeta(1), 3);
				world.setBlockState(new BlockPos(i + 9, j + 6, k + 1), Block.getBlockById(18).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 0, j + 6, k + 2), Block.getBlockById(106).getStateFromMeta(8), 3);
				world.setBlockState(new BlockPos(i + 1, j + 6, k + 2), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 8, j + 6, k + 2), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 1, j + 6, k + 3), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 8, j + 6, k + 3), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 0, j + 6, k + 4), Block.getBlockById(18).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 1, j + 6, k + 4), Block.getBlockById(4).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 4, j + 6, k + 4), Block.getBlockById(65).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 5, j + 6, k + 4), Block.getBlockById(4).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 8, j + 6, k + 4), Block.getBlockById(48).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 9, j + 6, k + 4), Block.getBlockById(106).getStateFromMeta(2), 3);
				world.setBlockState(new BlockPos(i + 0, j + 6, k + 5), Block.getBlockById(106).getStateFromMeta(8), 3);
				world.setBlockState(new BlockPos(i + 1, j + 6, k + 5), Block.getBlockById(4).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 4, j + 6, k + 5), Block.getBlockById(106).getStateFromMeta(8), 3);
				world.setBlockState(new BlockPos(i + 5, j + 6, k + 5), Block.getBlockById(98).getStateFromMeta(1), 3);
				world.setBlockState(new BlockPos(i + 8, j + 6, k + 5), Block.getBlockById(48).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 9, j + 6, k + 5), Block.getBlockById(18).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 0, j + 6, k + 6), Block.getBlockById(106).getStateFromMeta(8), 3);
				world.setBlockState(new BlockPos(i + 1, j + 6, k + 6), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 8, j + 6, k + 6), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 9, j + 6, k + 6), Block.getBlockById(106).getStateFromMeta(2), 3);
				world.setBlockState(new BlockPos(i + 1, j + 6, k + 7), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 8, j + 6, k + 7), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 9, j + 6, k + 7), Block.getBlockById(106).getStateFromMeta(2), 3);
				world.setBlockState(new BlockPos(i + 0, j + 6, k + 8), Block.getBlockById(65).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 1, j + 6, k + 8), Block.getBlockById(98).getStateFromMeta(1), 3);
				world.setBlockState(new BlockPos(i + 2, j + 6, k + 8), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 3, j + 6, k + 8), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 4, j + 6, k + 8), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 5, j + 6, k + 8), Block.getBlockById(4).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 6, j + 6, k + 8), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 7, j + 6, k + 8), Block.getBlockById(35).getStateFromMeta(15), 3);
				world.setBlockState(new BlockPos(i + 8, j + 6, k + 8), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 9, j + 6, k + 8), Block.getBlockById(106).getStateFromMeta(2), 3);
				world.setBlockState(new BlockPos(i + 1, j + 6, k + 9), Block.getBlockById(106).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 2, j + 6, k + 9), Block.getBlockById(18).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 3, j + 6, k + 9), Block.getBlockById(18).getStateFromMeta(12), 3);
				world.setBlockState(new BlockPos(i + 5, j + 6, k + 9), Block.getBlockById(106).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 7, j + 6, k + 9), Block.getBlockById(106).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 8, j + 6, k + 9), Block.getBlockById(106).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 1, j + 7, k + 0), Block.getBlockById(18).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 4, j + 7, k + 0), Block.getBlockById(106).getStateFromMeta(1), 3);
				world.setBlockState(new BlockPos(i + 8, j + 7, k + 0), Block.getBlockById(18).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 0, j + 7, k + 1), Block.getBlockById(106).getStateFromMeta(8), 3);
				world.setBlockState(new BlockPos(i + 1, j + 7, k + 1), Block.getBlockById(98).getStateFromMeta(1), 3);
				world.setBlockState(new BlockPos(i + 2, j + 7, k + 1), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 3, j + 7, k + 1), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 4, j + 7, k + 1), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 5, j + 7, k + 1), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 6, j + 7, k + 1), Block.getBlockById(48).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 7, j + 7, k + 1), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 8, j + 7, k + 1), Block.getBlockById(98).getStateFromMeta(1), 3);
				world.setBlockState(new BlockPos(i + 0, j + 7, k + 2), Block.getBlockById(106).getStateFromMeta(8), 3);
				world.setBlockState(new BlockPos(i + 1, j + 7, k + 2), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 8, j + 7, k + 2), Block.getBlockById(4).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 1, j + 7, k + 3), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 8, j + 7, k + 3), Block.getBlockById(4).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 0, j + 7, k + 4), Block.getBlockById(18).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 1, j + 7, k + 4), Block.getBlockById(4).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 4, j + 7, k + 4), Block.getBlockById(106).getStateFromMeta(8), 3);
				world.setBlockState(new BlockPos(i + 5, j + 7, k + 4), Block.getBlockById(48).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 8, j + 7, k + 4), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 9, j + 7, k + 4), Block.getBlockById(106).getStateFromMeta(2), 3);
				world.setBlockState(new BlockPos(i + 0, j + 7, k + 5), Block.getBlockById(18).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 1, j + 7, k + 5), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 4, j + 7, k + 5), Block.getBlockById(65).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 5, j + 7, k + 5), Block.getBlockById(4).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 8, j + 7, k + 5), Block.getBlockById(48).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 9, j + 7, k + 5), Block.getBlockById(18).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 0, j + 7, k + 6), Block.getBlockById(106).getStateFromMeta(8), 3);
				world.setBlockState(new BlockPos(i + 1, j + 7, k + 6), Block.getBlockById(48).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 8, j + 7, k + 6), Block.getBlockById(98).getStateFromMeta(1), 3);
				world.setBlockState(new BlockPos(i + 9, j + 7, k + 6), Block.getBlockById(106).getStateFromMeta(2), 3);
				world.setBlockState(new BlockPos(i + 0, j + 7, k + 7), Block.getBlockById(106).getStateFromMeta(8), 3);
				world.setBlockState(new BlockPos(i + 1, j + 7, k + 7), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 8, j + 7, k + 7), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 9, j + 7, k + 7), Block.getBlockById(106).getStateFromMeta(2), 3);
				world.setBlockState(new BlockPos(i + 0, j + 7, k + 8), Block.getBlockById(65).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 1, j + 7, k + 8), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 2, j + 7, k + 8), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 3, j + 7, k + 8), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 4, j + 7, k + 8), Block.getBlockById(48).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 5, j + 7, k + 8), Block.getBlockById(48).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 6, j + 7, k + 8), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 7, j + 7, k + 8), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 8, j + 7, k + 8), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 1, j + 7, k + 9), Block.getBlockById(106).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 2, j + 7, k + 9), Block.getBlockById(18).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 5, j + 7, k + 9), Block.getBlockById(106).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 7, j + 7, k + 9), Block.getBlockById(106).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 8, j + 7, k + 9), Block.getBlockById(106).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 4, j + 8, k + 0), Block.getBlockById(106).getStateFromMeta(1), 3);
				world.setBlockState(new BlockPos(i + 1, j + 8, k + 1), Block.getBlockById(18).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 2, j + 8, k + 1), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 3, j + 8, k + 1), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 4, j + 8, k + 1), Block.getBlockById(98).getStateFromMeta(1), 3);
				world.setBlockState(new BlockPos(i + 5, j + 8, k + 1), Block.getBlockById(98).getStateFromMeta(1), 3);
				world.setBlockState(new BlockPos(i + 6, j + 8, k + 1), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 7, j + 8, k + 1), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 8, j + 8, k + 1), Block.getBlockById(18).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 1, j + 8, k + 2), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 8, j + 8, k + 2), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 0, j + 8, k + 3), Block.getBlockById(18).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 1, j + 8, k + 3), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 8, j + 8, k + 3), Block.getBlockById(98).getStateFromMeta(1), 3);
				world.setBlockState(new BlockPos(i + 0, j + 8, k + 4), Block.getBlockById(18).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 1, j + 8, k + 4), Block.getBlockById(48).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 4, j + 8, k + 4), Block.getBlockById(65).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 5, j + 8, k + 4), Block.getBlockById(98).getStateFromMeta(1), 3);
				world.setBlockState(new BlockPos(i + 8, j + 8, k + 4), Block.getBlockById(98).getStateFromMeta(1), 3);
				world.setBlockState(new BlockPos(i + 1, j + 8, k + 5), Block.getBlockById(48).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 4, j + 8, k + 5), Block.getBlockById(106).getStateFromMeta(8), 3);
				world.setBlockState(new BlockPos(i + 5, j + 8, k + 5), Block.getBlockById(48).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 8, j + 8, k + 5), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 9, j + 8, k + 5), Block.getBlockById(18).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 1, j + 8, k + 6), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 8, j + 8, k + 6), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 1, j + 8, k + 7), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 8, j + 8, k + 7), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 2, j + 8, k + 8), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 3, j + 8, k + 8), Block.getBlockById(4).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 4, j + 8, k + 8), Block.getBlockById(4).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 5, j + 8, k + 8), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 6, j + 8, k + 8), Block.getBlockById(48).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 7, j + 8, k + 8), Block.getBlockById(48).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 2, j + 8, k + 9), Block.getBlockById(18).getStateFromMeta(12), 3);
				world.setBlockState(new BlockPos(i + 3, j + 8, k + 9), Block.getBlockById(106).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 2, j + 9, k + 1), Block.getBlockById(18).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 5, j + 9, k + 1), Block.getBlockById(106).getStateFromMeta(1), 3);
				world.setBlockState(new BlockPos(i + 6, j + 9, k + 1), Block.getBlockById(18).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 7, j + 9, k + 1), Block.getBlockById(18).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 8, j + 9, k + 1), Block.getBlockById(18).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 1, j + 9, k + 2), Block.getBlockById(18).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 2, j + 9, k + 2), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 3, j + 9, k + 2), Block.getBlockById(98).getStateFromMeta(1), 3);
				world.setBlockState(new BlockPos(i + 4, j + 9, k + 2), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 5, j + 9, k + 2), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 6, j + 9, k + 2), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 7, j + 9, k + 2), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 0, j + 9, k + 3), Block.getBlockById(18).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 1, j + 9, k + 3), Block.getBlockById(18).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 2, j + 9, k + 3), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 7, j + 9, k + 3), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 8, j + 9, k + 3), Block.getBlockById(106).getStateFromMeta(2), 3);
				world.setBlockState(new BlockPos(i + 2, j + 9, k + 4), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 4, j + 9, k + 4), Block.getBlockById(65).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 5, j + 9, k + 4), Block.getBlockById(98).getStateFromMeta(1), 3);
				world.setBlockState(new BlockPos(i + 7, j + 9, k + 4), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 8, j + 9, k + 4), Block.getBlockById(18).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 2, j + 9, k + 5), Block.getBlockById(98).getStateFromMeta(1), 3);
				world.setBlockState(new BlockPos(i + 4, j + 9, k + 5), Block.getBlockById(65).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 5, j + 9, k + 5), Block.getBlockById(98).getStateFromMeta(1), 3);
				world.setBlockState(new BlockPos(i + 7, j + 9, k + 5), Block.getBlockById(48).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 8, j + 9, k + 5), Block.getBlockById(18).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 9, j + 9, k + 5), Block.getBlockById(18).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 2, j + 9, k + 6), Block.getBlockById(98).getStateFromMeta(1), 3);
				world.setBlockState(new BlockPos(i + 7, j + 9, k + 6), Block.getBlockById(48).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 2, j + 9, k + 7), Block.getBlockById(48).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 3, j + 9, k + 7), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 4, j + 9, k + 7), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 5, j + 9, k + 7), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 6, j + 9, k + 7), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 7, j + 9, k + 7), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 8, j + 9, k + 7), Block.getBlockById(106).getStateFromMeta(2), 3);
				world.setBlockState(new BlockPos(i + 2, j + 9, k + 8), Block.getBlockById(18).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 3, j + 9, k + 8), Block.getBlockById(18).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 5, j + 10, k + 1), Block.getBlockById(106).getStateFromMeta(1), 3);
				world.setBlockState(new BlockPos(i + 1, j + 10, k + 2), Block.getBlockById(18).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 2, j + 10, k + 2), Block.getBlockById(18).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 3, j + 10, k + 2), Block.getBlockById(4).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 4, j + 10, k + 2), Block.getBlockById(48).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 5, j + 10, k + 2), Block.getBlockById(48).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 6, j + 10, k + 2), Block.getBlockById(4).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 7, j + 10, k + 2), Block.getBlockById(18).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 2, j + 10, k + 3), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 3, j + 10, k + 3), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 4, j + 10, k + 3), Block.getBlockById(98).getStateFromMeta(1), 3);
				world.setBlockState(new BlockPos(i + 5, j + 10, k + 3), Block.getBlockById(4).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 6, j + 10, k + 3), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 7, j + 10, k + 3), Block.getBlockById(4).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 8, j + 10, k + 3), Block.getBlockById(106).getStateFromMeta(2), 3);
				world.setBlockState(new BlockPos(i + 2, j + 10, k + 4), Block.getBlockById(48).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 3, j + 10, k + 4), Block.getBlockById(4).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 4, j + 10, k + 4), Block.getBlockById(18).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 5, j + 10, k + 4), Block.getBlockById(4).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 6, j + 10, k + 4), Block.getBlockById(48).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 7, j + 10, k + 4), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 8, j + 10, k + 4), Block.getBlockById(18).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 1, j + 10, k + 5), Block.getBlockById(106).getStateFromMeta(8), 3);
				world.setBlockState(new BlockPos(i + 2, j + 10, k + 5), Block.getBlockById(48).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 3, j + 10, k + 5), Block.getBlockById(98).getStateFromMeta(1), 3);
				world.setBlockState(new BlockPos(i + 4, j + 10, k + 5), Block.getBlockById(18).getStateFromMeta(12), 3);
				world.setBlockState(new BlockPos(i + 5, j + 10, k + 5), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 6, j + 10, k + 5), Block.getBlockById(98).getStateFromMeta(1), 3);
				world.setBlockState(new BlockPos(i + 7, j + 10, k + 5), Block.getBlockById(4).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 1, j + 10, k + 6), Block.getBlockById(65).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 2, j + 10, k + 6), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 3, j + 10, k + 6), Block.getBlockById(4).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 4, j + 10, k + 6), Block.getBlockById(48).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 5, j + 10, k + 6), Block.getBlockById(48).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 6, j + 10, k + 6), Block.getBlockById(98).getStateFromMeta(1), 3);
				world.setBlockState(new BlockPos(i + 7, j + 10, k + 6), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 8, j + 10, k + 6), Block.getBlockById(106).getStateFromMeta(2), 3);
				world.setBlockState(new BlockPos(i + 3, j + 10, k + 7), Block.getBlockById(48).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 4, j + 10, k + 7), Block.getBlockById(98).getStateFromMeta(1), 3);
				world.setBlockState(new BlockPos(i + 5, j + 10, k + 7), Block.getBlockById(48).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 6, j + 10, k + 7), Block.getBlockById(48).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 3, j + 10, k + 8), Block.getBlockById(106).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 4, j + 10, k + 8), Block.getBlockById(106).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 3, j + 11, k + 2), Block.getBlockById(4).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 4, j + 11, k + 2), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 5, j + 11, k + 2), Block.getBlockById(98).getStateFromMeta(1), 3);
				world.setBlockState(new BlockPos(i + 6, j + 11, k + 2), Block.getBlockById(4).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 2, j + 11, k + 3), Block.getBlockById(4).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 7, j + 11, k + 3), Block.getBlockById(4).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 2, j + 11, k + 4), Block.getBlockById(48).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 7, j + 11, k + 4), Block.getBlockById(98).getStateFromMeta(1), 3);
				world.setBlockState(new BlockPos(i + 1, j + 11, k + 5), Block.getBlockById(106).getStateFromMeta(8), 3);
				world.setBlockState(new BlockPos(i + 2, j + 11, k + 5), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 7, j + 11, k + 5), Block.getBlockById(98).getStateFromMeta(1), 3);
				world.setBlockState(new BlockPos(i + 1, j + 11, k + 6), Block.getBlockById(65).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 2, j + 11, k + 6), Block.getBlockById(4).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 6, j + 11, k + 6), Block.getBlockById(54).getStateFromMeta(4), 3);
				world.setBlockState(new BlockPos(i + 7, j + 11, k + 6), Block.getBlockById(48).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 8, j + 11, k + 6), Block.getBlockById(106).getStateFromMeta(2), 3);
				world.setBlockState(new BlockPos(i + 3, j + 11, k + 7), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 4, j + 11, k + 7), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 5, j + 11, k + 7), Block.getBlockById(98).getStateFromMeta(1), 3);
				world.setBlockState(new BlockPos(i + 6, j + 11, k + 7), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 4, j + 12, k + 2), Block.getBlockById(48).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 6, j + 12, k + 2), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 2, j + 12, k + 3), Block.getBlockById(98).getStateFromMeta(1), 3);
				world.setBlockState(new BlockPos(i + 7, j + 12, k + 4), Block.getBlockById(48).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 2, j + 12, k + 5), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 7, j + 12, k + 6), Block.getBlockById(98).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 3, j + 12, k + 7), Block.getBlockById(48).getStateFromMeta(0), 3);
				world.setBlockState(new BlockPos(i + 5, j + 12, k + 7), Block.getBlockById(4).getStateFromMeta(0), 3);
				
				
				TileEntityChest chest = (TileEntityChest)world.getTileEntity(new BlockPos(i + 2, j + 1 , k +7 ));
				chest.setLootTable((MyMod.LOOT_CHEST), new Random().nextLong());
				
				TileEntityChest chest2 = (TileEntityChest)world.getTileEntity(new BlockPos(i + 6, j + 11 , k + 6 ));
				chest2.setLootTable((MyMod.LOOT_CHEST2), new Random().nextLong());
				
				TileEntityChest chest3 = (TileEntityChest)world.getTileEntity(new BlockPos(i + 7, j + 1 , k + 2 ));
				chest3.setLootTable((MyMod.LOOT_CHEST3), new Random().nextLong());
				
				
				world.setBlockState(new BlockPos(i + 7, j + 1, k + 7), Blocks.MOB_SPAWNER.getDefaultState(), 2);
				TileEntity tileentity = world.getTileEntity(new BlockPos(i + 7, j + 1, k + 7));
				
				if(tileentity instanceof TileEntityMobSpawner){
					
					((TileEntityMobSpawner) tileentity).getSpawnerBaseLogic().setEntityId(new ResourceLocation("creeper"));
				}
				
				
				
			}
				
				
				
			}
		}
	}

	
	
	}
	
}
	
}




Here

Posted

Have you tried using the debugger? 

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted
27 minutes ago, Alpvax said:

You should probably only create the BlockState once. And you can use BlockState.up (or something similar)

I think you ment BlockPos, not BlockState.

 

OP, how do you know that this does not work? Did you place a breakpoint after those 2 if statements and it is not being triggered? Because there are more thing that would stop your structure from spawning later down the line. Those 2 checks apart from creating a new BlockPos object every time(don't do that btw) look fine.

 


 

As @Choonster said, do not use getBiomeForCoordsBody.

 

24 minutes ago, funsize888 said:

world.getBiomeForCoordsBody(new BlockPos(i,j,k)).getBiomeClass().equals(BiomePlains.class)

Why are you comparing classes here? If your intention is making the structure only spawn in the plains biome you can either use BiomeDictionary or directly compare the biome to Biomes.PLAINS.

 

24 minutes ago, funsize888 said:

.getBlock() != Blocks.AIR

10 hours ago, Choonster said:

Don't compare to Blocks.AIR directly, use Block#isAir to support modded air-like blocks.

 

24 minutes ago, funsize888 said:

world.getBlockState(new BlockPos(i + x, j + y + 1, k + z)).getBlock() != Blocks.AIR

This will be true if the block above the inital ground height is not air thus forbiding your structure from spawning. Tallgrass, for example...

 

24 minutes ago, funsize888 said:

boolean place = true;

You do not need this. You can return from a loop directly when your air check fails. With your current code you are just wasting time in the loop if the structure won't generate.

 

24 minutes ago, funsize888 said:

Block.getBlockById(98).getStateFromMeta(0)

Never use IDs. They can and will change. Blocks class exists for a reason.

getStateFromMeta should not be called. Use BlockStates. A state with meta 0 will most likely be the default state. 

This way of spawning structures is very confusing and painful to update/fix later. Use templates if they are available in whatever version you are modding for.

 

24 minutes ago, funsize888 said:

new Random().nextLong()

Do not create a new Random object every time you need to do something. You have an instance of Random passed as an argument.

 

24 minutes ago, funsize888 said:

int i = i2 + random.nextInt(15);

nextInt returns a value from 0 to the number specified excluding this number. nextInt(15) will return a number from a range of [0-14].

 

24 minutes ago, funsize888 said:

world.getChunkFromChunkCoords(chunkX, chunkZ).getHeight(new BlockPos(i & 15, 0, k & 15))

=>

world.getHeight(i, k)

 

24 minutes ago, funsize888 said:

(random.nextInt(1000) + 1) <= 100)

random.nextInt(10) == 0 is much more understandable and does pretty much the same.

 

  • Like 2

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Version 1.19 - Forge 41.0.63 I want to create a wolf entity that I can ride, so far it seems to be working, but the problem is that when I get on the wolf, I can’t control it. I then discovered that the issue is that the server doesn’t detect that I’m riding the wolf, so I’m struggling with synchronization. However, it seems to not be working properly. As I understand it, the server receives the packet but doesn’t register it correctly. I’m a bit new to Java, and I’ll try to provide all the relevant code and prints *The comments and prints are translated by chatgpt since they were originally in Spanish* Thank you very much in advance No player is mounted, or the passenger is not a player. No player is mounted, or the passenger is not a player. No player is mounted, or the passenger is not a player. No player is mounted, or the passenger is not a player. No player is mounted, or the passenger is not a player. MountableWolfEntity package com.vals.valscraft.entity; import com.vals.valscraft.network.MountSyncPacket; import com.vals.valscraft.network.NetworkHandler; import net.minecraft.client.Minecraft; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.network.syncher.EntityDataSerializers; import net.minecraft.network.syncher.SynchedEntityData; import net.minecraft.server.MinecraftServer; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.Mob; import net.minecraft.world.entity.ai.attributes.AttributeSupplier; import net.minecraft.world.entity.ai.attributes.Attributes; import net.minecraft.world.entity.animal.Wolf; import net.minecraft.world.entity.player.Player; import net.minecraft.world.entity.Entity; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.Items; import net.minecraft.world.level.Level; import net.minecraft.world.phys.Vec3; import net.minecraftforge.event.TickEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.network.PacketDistributor; public class MountableWolfEntity extends Wolf { private boolean hasSaddle; private static final EntityDataAccessor<Byte> DATA_ID_FLAGS = SynchedEntityData.defineId(MountableWolfEntity.class, EntityDataSerializers.BYTE); public MountableWolfEntity(EntityType<? extends Wolf> type, Level level) { super(type, level); this.hasSaddle = false; } @Override protected void defineSynchedData() { super.defineSynchedData(); this.entityData.define(DATA_ID_FLAGS, (byte)0); } public static AttributeSupplier.Builder createAttributes() { return Wolf.createAttributes() .add(Attributes.MAX_HEALTH, 20.0) .add(Attributes.MOVEMENT_SPEED, 0.3); } @Override public InteractionResult mobInteract(Player player, InteractionHand hand) { ItemStack itemstack = player.getItemInHand(hand); if (itemstack.getItem() == Items.SADDLE && !this.hasSaddle()) { if (!player.isCreative()) { itemstack.shrink(1); } this.setSaddle(true); return InteractionResult.SUCCESS; } else if (!level.isClientSide && this.hasSaddle()) { player.startRiding(this); MountSyncPacket packet = new MountSyncPacket(true); // 'true' means the player is mounted NetworkHandler.CHANNEL.sendToServer(packet); // Ensure the server handles the packet return InteractionResult.SUCCESS; } return InteractionResult.PASS; } @Override public void travel(Vec3 travelVector) { if (this.isVehicle() && this.getControllingPassenger() instanceof Player) { System.out.println("The wolf has a passenger."); System.out.println("The passenger is a player."); Player player = (Player) this.getControllingPassenger(); // Ensure the player is the controller this.setYRot(player.getYRot()); this.yRotO = this.getYRot(); this.setXRot(player.getXRot() * 0.5F); this.setRot(this.getYRot(), this.getXRot()); this.yBodyRot = this.getYRot(); this.yHeadRot = this.yBodyRot; float forward = player.zza; float strafe = player.xxa; if (forward <= 0.0F) { forward *= 0.25F; } this.flyingSpeed = this.getSpeed() * 0.1F; this.setSpeed((float) this.getAttributeValue(Attributes.MOVEMENT_SPEED) * 1.5F); this.setDeltaMovement(new Vec3(strafe, travelVector.y, forward).scale(this.getSpeed())); this.calculateEntityAnimation(this, false); } else { // The wolf does not have a passenger or the passenger is not a player System.out.println("No player is mounted, or the passenger is not a player."); super.travel(travelVector); } } public boolean hasSaddle() { return this.hasSaddle; } public void setSaddle(boolean hasSaddle) { this.hasSaddle = hasSaddle; } @Override protected void dropEquipment() { super.dropEquipment(); if (this.hasSaddle()) { this.spawnAtLocation(Items.SADDLE); this.setSaddle(false); } } @SubscribeEvent public static void onServerTick(TickEvent.ServerTickEvent event) { if (event.phase == TickEvent.Phase.START) { MinecraftServer server = net.minecraftforge.server.ServerLifecycleHooks.getCurrentServer(); if (server != null) { for (ServerPlayer player : server.getPlayerList().getPlayers()) { if (player.isPassenger() && player.getVehicle() instanceof MountableWolfEntity) { MountableWolfEntity wolf = (MountableWolfEntity) player.getVehicle(); System.out.println("Tick: " + player.getName().getString() + " is correctly mounted on " + wolf); } } } } } private boolean lastMountedState = false; @Override public void tick() { super.tick(); if (!this.level.isClientSide) { // Only on the server boolean isMounted = this.isVehicle() && this.getControllingPassenger() instanceof Player; // Only print if the state changed if (isMounted != lastMountedState) { if (isMounted) { Player player = (Player) this.getControllingPassenger(); // Verify the passenger is a player System.out.println("Server: Player " + player.getName().getString() + " is now mounted."); } else { System.out.println("Server: The wolf no longer has a passenger."); } lastMountedState = isMounted; } } } @Override public void addPassenger(Entity passenger) { super.addPassenger(passenger); if (passenger instanceof Player) { Player player = (Player) passenger; if (!this.level.isClientSide && player instanceof ServerPlayer) { // Send the packet to the server to indicate the player is mounted NetworkHandler.CHANNEL.send(PacketDistributor.PLAYER.with(() -> (ServerPlayer) player), new MountSyncPacket(true)); } } } @Override public void removePassenger(Entity passenger) { super.removePassenger(passenger); if (passenger instanceof Player) { Player player = (Player) passenger; if (!this.level.isClientSide && player instanceof ServerPlayer) { // Send the packet to the server to indicate the player is no longer mounted NetworkHandler.CHANNEL.send(PacketDistributor.PLAYER.with(() -> (ServerPlayer) player), new MountSyncPacket(false)); } } } @Override public boolean isControlledByLocalInstance() { Entity entity = this.getControllingPassenger(); return entity instanceof Player; } @Override public void positionRider(Entity passenger) { if (this.hasPassenger(passenger)) { double xOffset = Math.cos(Math.toRadians(this.getYRot() + 90)) * 0.4; double zOffset = Math.sin(Math.toRadians(this.getYRot() + 90)) * 0.4; passenger.setPos(this.getX() + xOffset, this.getY() + this.getPassengersRidingOffset() + passenger.getMyRidingOffset(), this.getZ() + zOffset); } } } MountSyncPacket package com.vals.valscraft.network; import com.vals.valscraft.entity.MountableWolfEntity; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.player.Player; import net.minecraftforge.network.NetworkEvent; import java.util.function.Supplier; public class MountSyncPacket { private final boolean isMounted; public MountSyncPacket(boolean isMounted) { this.isMounted = isMounted; } public void encode(FriendlyByteBuf buffer) { buffer.writeBoolean(isMounted); } public static MountSyncPacket decode(FriendlyByteBuf buffer) { return new MountSyncPacket(buffer.readBoolean()); } public void handle(NetworkEvent.Context context) { context.enqueueWork(() -> { ServerPlayer player = context.getSender(); // Get the player from the context if (player != null) { // Verifies if the player has dismounted if (!isMounted) { Entity vehicle = player.getVehicle(); if (vehicle instanceof MountableWolfEntity wolf) { // Logic to remove the player as a passenger wolf.removePassenger(player); System.out.println("Server: Player " + player.getName().getString() + " is no longer mounted."); } } } }); context.setPacketHandled(true); // Marks the packet as handled } } networkHandler package com.vals.valscraft.network; import com.vals.valscraft.valscraft; import net.minecraft.resources.ResourceLocation; import net.minecraftforge.network.NetworkRegistry; import net.minecraftforge.network.simple.SimpleChannel; import net.minecraftforge.network.NetworkEvent; import java.util.function.Supplier; public class NetworkHandler { private static final String PROTOCOL_VERSION = "1"; public static final SimpleChannel CHANNEL = NetworkRegistry.newSimpleChannel( new ResourceLocation(valscraft.MODID, "main"), () -> PROTOCOL_VERSION, PROTOCOL_VERSION::equals, PROTOCOL_VERSION::equals ); public static void init() { int packetId = 0; // Register the mount synchronization packet CHANNEL.registerMessage( packetId++, MountSyncPacket.class, MountSyncPacket::encode, MountSyncPacket::decode, (msg, context) -> msg.handle(context.get()) // Get the context with context.get() ); } }  
    • Do you use features of inventory profiles next (ipnext) or is there a change without it?
    • Remove rubidium - you are already using embeddium, which is a fork of rubidium
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.