Skip to content

Instantly share code, notes, and snippets.

View avetharun's full-sized avatar
🔏
working on worthless projects

Lillium avetharun

🔏
working on worthless projects
View GitHub Profile
@avetharun
avetharun / CMakeLists.txt
Last active March 30, 2025 22:53
Single-line vcpkg CMake definition
# Options of including:
# Inline
cmake_minimum_required (VERSION ...)
set(CMAKE_TOOLCHAIN_FILE $ENV{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake CACHE STRING "VCPKG toolchain file")
...
...
project("...")
@avetharun
avetharun / BooleanModelOverride.java
Last active March 30, 2025 22:53
[FabricMC] Custom model overrides for Items depending on their ModelTransformationMode
// Not required, but is very helpful.
@Environment(EnvType.CLIENT)
public class BooleanModelOverride implements ClampedModelPredicateProvider {
public static ModelTransformationMode currentModelTransform = ModelTransformationMode.NONE;
public static int offset = 1;
int thisOffset = 0;
public BooleanModelOverride(Function4<ItemStack, ClientWorld, LivingEntity, Integer, Boolean> p) {
this.predicate = p;
this.thisOffset = offset++;
}