net.minecraft.packet.play.EntitySpawnS2C

Here are the examples of the java api net.minecraft.packet.play.EntitySpawnS2C taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

2 Examples 7

18 Source : MixinClientPlayNetworkHandler.java
with Creative Commons Zero v1.0 Universal
from ModificationStation

@Inject(method = "handleEnreplacedySpawn(Lnet/minecraft/packet/play/EnreplacedySpawnS2C;)V", at = @At(value = "FIELD", target = "Lnet/minecraft/packet/play/EnreplacedySpawnS2C;z:I", opcode = Opcodes.GETFIELD, shift = At.Shift.BY, by = 5), locals = LocalCapture.CAPTURE_FAILHARD)
private void captureCoords(EnreplacedySpawnS2C packet, CallbackInfo ci, double var2, double var4, double var6) {
    capturedX = var2;
    capturedY = var4;
    capturedZ = var6;
}

15 Source : MixinClientPlayNetworkHandler.java
with Creative Commons Zero v1.0 Universal
from ModificationStation

@ModifyVariable(method = "handleEnreplacedySpawn(Lnet/minecraft/packet/play/EnreplacedySpawnS2C;)V", index = 8, at = @At("LOAD"))
private EnreplacedyBase onEnreplacedySpawn(EnreplacedyBase enreplacedy, EnreplacedySpawnS2C packet) {
    Optional<QuadFunction<Level, Double, Double, Double, EnreplacedyBase>> enreplacedyHandler = EnreplacedyHandlerRegistry.INSTANCE.getByIdentifier(Identifier.of(ModID.of("minecraft"), String.valueOf(packet.id)));
    if (enreplacedyHandler.isPresent())
        enreplacedy = enreplacedyHandler.get().apply(level, capturedX, capturedY, capturedZ);
    return enreplacedy;
}