9
9
import de .dafuqs .spectrum .blocks .upgrade .*;
10
10
import de .dafuqs .spectrum .helpers .*;
11
11
import de .dafuqs .spectrum .items .magic_items .*;
12
- import de .dafuqs .spectrum .networking .*;
12
+ import de .dafuqs .spectrum .networking .s2c_payloads . *;
13
13
import de .dafuqs .spectrum .particle .*;
14
14
import de .dafuqs .spectrum .progression .*;
15
15
import de .dafuqs .spectrum .recipe .enchanter .*;
@@ -147,12 +147,12 @@ public static void serverTick(World world, BlockPos blockPos, BlockState blockSt
147
147
if (enchanterBlockEntity .craftingTime % 60 == 1 ) {
148
148
if (!checkRecipeRequirements (world , blockPos , enchanterBlockEntity )) {
149
149
enchanterBlockEntity .craftingTime = 0 ;
150
- SpectrumS2CPacketSender .sendCancelBlockBoundSoundInstance ((ServerWorld ) enchanterBlockEntity .getWorld (), enchanterBlockEntity .pos );
150
+ PlayBlockBoundSoundInstancePayload .sendCancelBlockBoundSoundInstance ((ServerWorld ) enchanterBlockEntity .getWorld (), enchanterBlockEntity .pos );
151
151
return ;
152
152
}
153
153
}
154
154
if (enchanterBlockEntity .craftingTime == 1 ) {
155
- SpectrumS2CPacketSender .sendPlayBlockBoundSoundInstance (SpectrumSoundEvents .ENCHANTER_WORKING , (ServerWorld ) enchanterBlockEntity .getWorld (), enchanterBlockEntity .pos , Integer .MAX_VALUE );
155
+ PlayBlockBoundSoundInstancePayload .sendPlayBlockBoundSoundInstance (SpectrumSoundEvents .ENCHANTER_WORKING , (ServerWorld ) enchanterBlockEntity .getWorld (), enchanterBlockEntity .pos , Integer .MAX_VALUE );
156
156
}
157
157
158
158
if (enchanterBlockEntity .currentRecipe instanceof EnchanterRecipe enchanterRecipe ) {
@@ -180,7 +180,7 @@ public static void serverTick(World world, BlockPos blockPos, BlockState blockSt
180
180
if (enchanterBlockEntity .craftingTime >= enchanterBlockEntity .craftingTimeTotal ) {
181
181
playCraftingFinishedEffects (enchanterBlockEntity );
182
182
craftEnchantmentUpgradeRecipe (enchanterBlockEntity , enchantmentUpgradeRecipe );
183
- SpectrumS2CPacketSender .sendCancelBlockBoundSoundInstance ((ServerWorld ) enchanterBlockEntity .getWorld (), enchanterBlockEntity .pos );
183
+ PlayBlockBoundSoundInstancePayload .sendCancelBlockBoundSoundInstance ((ServerWorld ) enchanterBlockEntity .getWorld (), enchanterBlockEntity .pos );
184
184
185
185
craftingSuccess = true ;
186
186
}
@@ -196,7 +196,7 @@ public static void serverTick(World world, BlockPos blockPos, BlockState blockSt
196
196
if (!drained ) {
197
197
enchanterBlockEntity .currentItemProcessingTime = -1 ;
198
198
enchanterBlockEntity .updateInClientWorld ();
199
- SpectrumS2CPacketSender .sendCancelBlockBoundSoundInstance ((ServerWorld ) enchanterBlockEntity .getWorld (), enchanterBlockEntity .pos );
199
+ PlayBlockBoundSoundInstancePayload .sendCancelBlockBoundSoundInstance ((ServerWorld ) enchanterBlockEntity .getWorld (), enchanterBlockEntity .pos );
200
200
201
201
}
202
202
}
@@ -207,7 +207,7 @@ public static void serverTick(World world, BlockPos blockPos, BlockState blockSt
207
207
enchanterBlockEntity .currentItemProcessingTime = -1 ;
208
208
enchanterBlockEntity .craftingTime = 0 ;
209
209
enchanterBlockEntity .updateInClientWorld ();
210
- SpectrumS2CPacketSender .sendCancelBlockBoundSoundInstance ((ServerWorld ) enchanterBlockEntity .getWorld (), enchanterBlockEntity .pos );
210
+ PlayBlockBoundSoundInstancePayload .sendCancelBlockBoundSoundInstance ((ServerWorld ) enchanterBlockEntity .getWorld (), enchanterBlockEntity .pos );
211
211
212
212
craftingSuccess = true ;
213
213
}
@@ -277,7 +277,7 @@ public static boolean isValidCenterEnchantingSetup(@NotNull EnchanterBlockEntity
277
277
public static void playCraftingFinishedEffects (@ NotNull EnchanterBlockEntity enchanterBlockEntity ) {
278
278
enchanterBlockEntity .getWorld ().playSound (null , enchanterBlockEntity .pos , SoundEvents .ENTITY_PLAYER_LEVELUP , SoundCategory .BLOCKS , 1.0F , 1.0F );
279
279
280
- SpectrumS2CPacketSender .playParticleWithRandomOffsetAndVelocity ((ServerWorld ) enchanterBlockEntity .getWorld (),
280
+ PlayParticleWithRandomOffsetAndVelocityPayload .playParticleWithRandomOffsetAndVelocity ((ServerWorld ) enchanterBlockEntity .getWorld (),
281
281
new Vec3d (enchanterBlockEntity .pos .getX () + 0.5D , enchanterBlockEntity .pos .getY () + 0.5 , enchanterBlockEntity .pos .getZ () + 0.5D ),
282
282
SpectrumParticleTypes .LIME_SPARKLE_RISING , 75 , new Vec3d (0.5D , 0.5D , 0.5D ),
283
283
new Vec3d (0.1D , -0.1D , 0.1D ));
@@ -750,7 +750,7 @@ public boolean drainExperience(int amount) {
750
750
// There was enough experience drained from the knowledge gem that the visual changed
751
751
// To display the updated knowledge gem size clientside the inventory has to be synched
752
752
// to the clients for rendering purposes
753
- SpectrumS2CPacketSender .playParticleWithPatternAndVelocity (null , (ServerWorld ) world , new Vec3d (this .pos .getX () + 0.5 , this .pos .getY () + 2.5 , this .pos .getZ () + 0.5 ), SpectrumParticleTypes .LIME_CRAFTING , VectorPattern .SIXTEEN , 0.05F );
753
+ PlayParticleWithPatternAndVelocityPayload .playParticleWithPatternAndVelocity (null , (ServerWorld ) world , new Vec3d (this .pos .getX () + 0.5 , this .pos .getY () + 2.5 , this .pos .getZ () + 0.5 ), SpectrumParticleTypes .LIME_CRAFTING , VectorPattern .SIXTEEN , 0.05F );
754
754
this .updateInClientWorld ();
755
755
}
756
756
}
0 commit comments