-
-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Slightly change Measuring Tape behaviour and fix mod crashing on serv…
…ers. Bump to 1.10.1
- Loading branch information
1 parent
1573e00
commit c9c8bd2
Showing
4 changed files
with
39 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
...in/kotlin/io/github/lucaargolo/kibe/items/miscellaneous/MeasuringTapePredicateProvider.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package io.github.lucaargolo.kibe.items.miscellaneous | ||
|
||
import net.minecraft.client.item.UnclampedModelPredicateProvider | ||
import net.minecraft.client.world.ClientWorld | ||
import net.minecraft.entity.LivingEntity | ||
import net.minecraft.item.ItemStack | ||
|
||
class MeasuringTapePredicateProvider: UnclampedModelPredicateProvider { | ||
|
||
override fun unclampedCall(stack: ItemStack, world: ClientWorld?, entity: LivingEntity?, seed: Int): Float { | ||
val nbt = stack.nbt ?: return 0f | ||
if (MeasuringTape.MEASURING_LEVEL in nbt) { | ||
return 1f | ||
} | ||
return 0f | ||
} | ||
|
||
|
||
} |