@@ -139,38 +139,38 @@ private void alterBlocks(LimitedRegion region, Location loc, Environment environ
139139 }
140140
141141 private void makeEndPortal (LimitedRegion region , int chunkX , int chunkZ ) {
142+ int y = addon .getSettings ().getEndFrameHeight ();
142143 for (int xx = 1 ; xx < 6 ; xx ++) {
143144 for (int zz = 1 ; zz < 6 ; zz ++) {
144145 if (xx == zz || (xx ==1 && zz ==5 ) || (xx ==5 && zz ==1 ) || (xx >1 && xx <5 && zz >1 && zz <5 )) {
145146 continue ;
146147 }
147- setFrame (region , xx + (chunkX << 4 ), addon .getSettings ().getEndFrameHeight (), zz + (chunkZ << 4 ));
148+ int x = xx + (chunkX << 4 );
149+ int z = zz + (chunkZ << 4 );
150+ region .setType (x , y , z , Material .END_PORTAL_FRAME );
151+ // Cast to end frame
152+ EndPortalFrame endFrame = (EndPortalFrame ) region .getBlockData (x , y , z );
153+
154+ // Add the odd eye of ender
155+ endFrame .setEye (random .nextDouble () < 0.8 );
156+ if (zz == 1 ) {
157+ // Face South
158+ endFrame .setFacing (BlockFace .SOUTH );
159+ } else if (zz == 5 ) {
160+ // Face North
161+ endFrame .setFacing (BlockFace .NORTH );
162+ } else if (xx == 1 ) {
163+ // Face East
164+ endFrame .setFacing (BlockFace .EAST );
165+ } else {
166+ // Face West
167+ endFrame .setFacing (BlockFace .WEST );
168+ }
169+ region .setBlockData (x , y , z , endFrame );
148170 }
149171 }
150172 }
151173
152- private void setFrame (LimitedRegion region , int xx , int yy , int zz ) {
153- region .setType (xx , yy , zz , Material .END_PORTAL_FRAME );
154- // Cast to end frame
155- EndPortalFrame endFrame = (EndPortalFrame ) region .getBlockData (xx , yy , zz );
156-
157- // Add the odd eye of ender
158- endFrame .setEye (random .nextDouble () < 0.8 );
159- if (zz == 1 ) {
160- // Face South
161- endFrame .setFacing (BlockFace .SOUTH );
162- } else if (zz == 5 ) {
163- // Face North
164- endFrame .setFacing (BlockFace .NORTH );
165- } else if (xx == 1 ) {
166- // Face East
167- endFrame .setFacing (BlockFace .EAST );
168- } else {
169- // Face West
170- endFrame .setFacing (BlockFace .WEST );
171- }
172- region .setBlockData (xx , yy , zz , endFrame );
173- }
174174
175175 private void setSaplingType (LimitedRegion region , Location loc ) {
176176 // Set sapling type if there is one specific to this biome
0 commit comments