Skip to content

Instantly share code, notes, and snippets.

@apple502j
apple502j / migrating-to-packet-api.md
Last active July 2, 2024 18:09
Fabric API guide: Migrating to packet object-based API

Migrating to Packet Object-based Networking

Fabric API 0.77.0 for 1.19.4 and 1.20 introduced a new way of writing networking stack. This applies to ServerPlayNetworking and ClientPlayNetworking. This is a guide on migrating existing code using Networking API v1 to new, packet-based code.

If you are still using the deprecated Networking API v0, it is recommended to switch to v1 first.

When the old API should still be used

The new API makes some assumptions on the usage. While this covers most of the common and expected uses, there are cases where the old API still works better. Therefore, the old API is not deprecated in anyway. Also, the two APIs are network-compatible so long as the packet serialization is the same.

For example, you might want to continue using the old API if:

@mrk-han
mrk-han / emulator-install-using-avdmanager.md
Last active November 7, 2024 04:51
Installing and creating Emulators with AVDMANAGER (For Continuous Integration Server or Local Use)

Install and Create Emulators using AVDMANAGER and SDKMANAGER

TL;DR

For an emulator that mimics a Pixel 5 Device with Google APIs and ARM architecture (for an M1/M2 Macbook):

  1. List All System Images Available for Download: sdkmanager --list | grep system-images

  2. Download Image: sdkmanager --install "system-images;android-30;google_atd;arm64-v8a"

@andyneff
andyneff / Hybrid_files.md
Last active May 16, 2024 15:45
Hybrid script files

Hybrid files

  • A short compilations of hybrid files I've used/modifies whats out there for my use.

What do I mean by hybrid files? A file that can be parsed by two or more scripting lanauges and run (without or minimal error messages)

Batch and python

I copied this from here There are many different versions out there, of varying degrees of difficulty out there. However this is my favorite