@@ -149,39 +149,6 @@ protected void growTree(Block b) {
149
149
}
150
150
}
151
151
}
152
-
153
- protected boolean bigTreeSaplings (Block b ) {
154
- Material treeType = b .getType ();
155
- TreeType type = SAPLING_TO_BIG_TREE_TYPE .get (treeType );
156
- for (List <BlockFace > q : QUADS ) {
157
- if (q .stream ().map (b ::getRelative ).allMatch (c -> c .getType ().equals (treeType ))) {
158
- // All the same sapling type found in this quad
159
- q .stream ().map (b ::getRelative ).forEach (c -> c .setType (Material .AIR ));
160
- // Get the tree planting location
161
- Location l = b .getRelative (q .get (0 )).getLocation ();
162
- if (b .getWorld ().generateTree (l , RAND , type ,
163
- bs -> Flags .TREES_GROWING_OUTSIDE_RANGE .isSetForWorld (bs .getWorld ())
164
- || addon .getIslands ().getProtectedIslandAt (bs .getLocation ()).isPresent ())) {
165
- if (addon .getSettings ().isEffectsEnabled ()) {
166
- showSparkles (b );
167
- }
168
- if (addon .getSettings ().isSoundsEnabled ()) {
169
- b .getWorld ().playSound (b .getLocation (), addon .getSettings ().getSoundsGrowingBigTreeSound (),
170
- (float )addon .getSettings ().getSoundsGrowingBigTreeVolume (), (float )addon .getSettings ().getSoundsGrowingBigTreePitch ());
171
- }
172
- return true ;
173
- } else {
174
- // Generation failed, reset saplings
175
- q .stream ().map (b ::getRelative ).forEach (c -> c .setType (treeType ));
176
- }
177
- }
178
- }
179
- return false ;
180
- }
181
-
182
- protected void showSparkles (Block b ) {
183
- AROUND .stream ().map (b ::getRelative ).map (Block ::getLocation ).forEach (x -> x .getWorld ().playEffect (x , addon .getSettings ().getEffectsTwerk (), 0 ));
184
- }
185
152
186
153
protected boolean bigTreeSaplings (Block b ) {
187
154
Material treeType = b .getType ();
@@ -323,4 +290,4 @@ private void getNearbySaplings(Player player, Island i) {
323
290
}
324
291
325
292
}
326
- }
293
+ }
0 commit comments