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 / BooleanModelOverride.java
Last active March 22, 2024 23:10
[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++;
}