@@ -80,14 +80,17 @@ public <T extends BlockEntity> BlockEntityTicker<T> getTicker(Level level, Block
8080
8181 @ Override
8282 public void animateTick (BlockState state , Level level , BlockPos pos , RandomSource rand ) {
83- if (Boolean .FALSE .equals (state .getValue (ACTIVE )) || level .getLevelData ().getGameTime () % 24000 >= 12000 || !level .canSeeSkyFromBelowWater (pos .above ()) || rand .nextInt (3 ) != 0 ) {
83+ if (Boolean .FALSE .equals (state .getValue (ACTIVE )) || level .getLevelData ().getGameTime () % 24000 >= 12000 || !level .canSeeSkyFromBelowWater (pos .above ())
84+ || rand .nextInt (3 ) != 0 ) {
8485 return ;
8586 }
86- level .addParticle (ColorParticleOption .create (ParticleTypes .ENTITY_EFFECT , 0.9F , 0.9F , 0.0F ), pos .getX () + 0.5D + rand .nextGaussian () / 8 , pos .getY () + 1.1D , pos .getZ () + 0.5D + rand .nextGaussian () / 8 , 0D , 0D , 0D );
87+ level .addParticle (ColorParticleOption .create (ParticleTypes .ENTITY_EFFECT , 0.9F , 0.9F , 0.0F ), pos .getX () + 0.5D + rand .nextGaussian () / 8 ,
88+ pos .getY () + 1.1D , pos .getZ () + 0.5D + rand .nextGaussian () / 8 , 0D , 0D , 0D );
8789 }
8890
8991 @ Override
90- protected InteractionResult useItemOn (ItemStack heldItem , BlockState state , Level level , BlockPos pos , Player player , InteractionHand hand , BlockHitResult p_316140_ ) {
92+ protected InteractionResult useItemOn (ItemStack heldItem , BlockState state , Level level , BlockPos pos , Player player , InteractionHand hand ,
93+ BlockHitResult p_316140_ ) {
9194 if (Boolean .TRUE .equals (state .getValue (ACTIVE ))) {
9295 return InteractionResult .CONSUME ;
9396 }
@@ -120,9 +123,11 @@ protected InteractionResult useItemOn(ItemStack heldItem, BlockState state, Leve
120123 }
121124
122125 private void playSoundAndSpawnParticles (Level level , BlockPos pos , AlkahestryAltarBlockEntity altar ) {
123- level .playSound (null , pos , SoundEvents .LAVA_EXTINGUISH , SoundSource .BLOCKS , 0.3F , 0.5F + 0.5F * altar .getRedstoneCount () + (float ) (level .getRandom ().nextGaussian () / 8 ));
126+ level .playSound (null , pos , SoundEvents .LAVA_EXTINGUISH , SoundSource .BLOCKS , 0.3F ,
127+ 0.5F + 0.5F * altar .getRedstoneCount () + (float ) (level .getRandom ().nextGaussian () / 8 ));
124128 for (int particles = level .getRandom ().nextInt (3 ); particles < 3 + altar .getRedstoneCount () * 4 + altar .getRedstoneCount (); particles ++) {
125- level .addParticle (DustParticleOptions .REDSTONE , pos .getX () + 0.5D + level .getRandom ().nextGaussian () / 5 , pos .getY () + 1.2D , pos .getZ () + 0.5D + level .getRandom ().nextGaussian () / 5 , 1D , 0D , 0D );
129+ level .addParticle (DustParticleOptions .REDSTONE , pos .getX () + 0.5D + level .getRandom ().nextGaussian () / 5 , pos .getY () + 1.2D ,
130+ pos .getZ () + 0.5D + level .getRandom ().nextGaussian () / 5 , 1D , 0D , 0D );
126131 }
127132 }
128133
0 commit comments