Skip to content

Commit

Permalink
minecraft 1.18 update
Browse files Browse the repository at this point in the history
  • Loading branch information
Tigereye504 committed Dec 1, 2021
1 parent 8bd0828 commit 4d816a2
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 70 deletions.
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ org.gradle.jvmargs=-Xmx1G

# Fabric Properties
# check these on https://fabricmc.net/use
minecraft_version=1.18-pre4
yarn_mappings=1.18-pre4+build.3
loader_version=0.12.5
minecraft_version=1.18
yarn_mappings=1.18+build.1
loader_version=0.12.8

# Mod Properties
mod_version = 0.13.2
Expand All @@ -14,4 +14,4 @@ loader_version=0.12.5

# Dependencies
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api
fabric_version=0.42.7+1.18
fabric_version=0.43.1+1.18
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
public class HellishMaterials implements ModInitializer{

public static final String MODID = "hellish-materials";
public static final boolean DEBUG = false;
public static final boolean DEBUG = true;

@Override
public void onInitialize() {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package net.tigereye.hellishmaterials;

import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.fabric.api.object.builder.v1.client.model.FabricModelPredicateProviderRegistry;
import net.minecraft.nbt.NbtCompound;
import net.minecraft.util.Identifier;
import net.tigereye.hellishmaterials.items.Luckstone;
import net.tigereye.hellishmaterials.registration.HMItems;

public class HellishMaterialsClient implements ClientModInitializer {
@Override
public void onInitializeClient() {
FabricModelPredicateProviderRegistry.register(HMItems.LUCKSTONE, new Identifier("luck"), (itemStack, clientWorld, livingEntity, seed) -> {
float luck = 1;
NbtCompound tag = itemStack.getOrCreateNbt();
if (tag.contains(Luckstone.DISPLAY_KEY)) {
luck = tag.getFloat(Luckstone.DISPLAY_KEY);
}
if(HellishMaterials.DEBUG) {
System.out.println("Luckstone Diplay: " + luck);
}
return luck;
});
}
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"layer0": "hellish-materials:item/luckstone"
},
"overrides": [
{ "predicate": { "hellish-materials:luck": 1.0}, "model": "hellish-materials:item/luckstone" },
{ "predicate": { "hellish-materials:luck": 2.0}, "model": "hellish-materials:item/luckstone_very_unlucky" },
{ "predicate": { "hellish-materials:luck": 3.0}, "model": "hellish-materials:item/luckstone_unlucky" },
{ "predicate": { "hellish-materials:luck": 4.0}, "model": "hellish-materials:item/luckstone_lucky" },
{ "predicate": { "hellish-materials:luck": 5.0}, "model": "hellish-materials:item/luckstone_very_lucky" }
{ "predicate": { "luck": 1}, "model": "hellish-materials:item/luckstone" },
{ "predicate": { "luck": 2}, "model": "hellish-materials:item/luckstone_very_unlucky" },
{ "predicate": { "luck": 3}, "model": "hellish-materials:item/luckstone_unlucky" },
{ "predicate": { "luck": 4}, "model": "hellish-materials:item/luckstone_lucky" },
{ "predicate": { "luck": 5}, "model": "hellish-materials:item/luckstone_very_lucky" }
]
}
3 changes: 3 additions & 0 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
"entrypoints": {
"main": [
"net.tigereye.hellishmaterials.HellishMaterials"
],
"client": [
"net.tigereye.hellishmaterials.HellishMaterialsClient"
]
},
"mixins": [
Expand Down
2 changes: 0 additions & 2 deletions src/main/resources/hellish-materials.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,13 @@
"LivingEntityApplyDamageMixin",
"LivingEntityBaseTickMixin",
"LivingEntityDropEquipmentMixin",
"ModelPredicateProviderRegistryMixin",
"PiglinEntityEquipmentMixin",
"PlayerEntityApplyDamageMixin",
"StatusEffectInstanceMixin",
"WitherSkeletonEntityEquipmentMixin",
"ZombifiedPiglinEntityEquipmentMixin"
],
"client": [

],
"injectors": {
"defaultRequire": 1
Expand Down

0 comments on commit 4d816a2

Please sign in to comment.