73 |
return true; |
return true; |
74 |
} |
} |
75 |
|
|
76 |
buildTemplate( player.getLocation(), template); |
buildTemplate( player.getLocation(), template, 1); |
77 |
|
buildTemplate( player.getLocation(), template, 2); |
78 |
|
|
79 |
return false; |
return false; |
80 |
} |
} |
176 |
|
|
177 |
} |
} |
178 |
|
|
179 |
void buildTemplate(Location loc, Pair[][][] template) { |
void buildTemplate(Location loc, Pair[][][] template, int pass) { |
180 |
World world = loc.getWorld(); |
World world = loc.getWorld(); |
181 |
for (int i=0; i<template.length; i++ ) { |
for (int i=0; i<template.length; i++ ) { |
182 |
for (int j=0; j<template[0].length; j++) { |
for (int j=0; j<template[0].length; j++) { |
194 |
|
|
195 |
//plugin.getLogger().info( String.format( "Setting typeid at %d,%d,%d to %d", x,y,z, type) ); |
//plugin.getLogger().info( String.format( "Setting typeid at %d,%d,%d to %d", x,y,z, type) ); |
196 |
|
|
197 |
|
if (pass == 1) { |
198 |
|
if ( type == 50 || type == 75 || type == 76) //torch / redstone torch |
199 |
|
continue; |
200 |
|
if (type == 64 || type==71) //door / irondoor |
201 |
|
continue; |
202 |
|
if (type == 68) // sign |
203 |
|
continue; |
204 |
|
} |
205 |
|
|
206 |
world.getBlockAt(x, y, z).setTypeIdAndData(type, data, true); |
world.getBlockAt(x, y, z).setTypeIdAndData(type, data, true); |
207 |
|
|
208 |
} |
} |
209 |
} |
} |
210 |
} |
} |