mirror of
https://github.com/ViaVersion/ViaFabricPlus.git
synced 2024-11-25 12:25:22 +01:00
Updated Fabric API
This commit is contained in:
parent
751090cdfd
commit
88a1376881
@ -6,7 +6,7 @@ org.gradle.parallel=true
|
||||
minecraft_version=1.20.4
|
||||
yarn_mappings=1.20.4+build.3
|
||||
loader_version=0.15.3
|
||||
fabric_api_version=0.91.3+1.20.4
|
||||
fabric_api_version=0.93.1+1.20.4
|
||||
|
||||
# Project Details
|
||||
mod_version=3.0.6-SNAPSHOT
|
||||
@ -18,11 +18,12 @@ viaversion_version=4.10.0-23w51b-SNAPSHOT
|
||||
viabackwards_version=4.10.0-23w51b-SNAPSHOT
|
||||
vialegacy_version=2.2.22-SNAPSHOT
|
||||
viaaprilfools_version=2.0.11-SNAPSHOT
|
||||
viabedrock_version=0.0.4-SNAPSHOT
|
||||
vialoader_version=2.2.13-SNAPSHOT
|
||||
|
||||
# RaphiMC Libraries
|
||||
minecraftauth_version=3.1.0
|
||||
|
||||
viabedrock_version=0.0.4-SNAPSHOT
|
||||
raknet_transport_version=1.0.0.CR1-SNAPSHOT
|
||||
|
||||
# Lenni0451 Libraries
|
||||
|
@ -38,9 +38,14 @@ public abstract class MixinMetadataRewriter1_15To1_14_4 extends EntityRewriter<C
|
||||
|
||||
@Redirect(method = "registerRewrites", at = @At(value = "INVOKE", target = "Lcom/viaversion/viaversion/rewriter/meta/MetaFilter$Builder;removeIndex(I)V"))
|
||||
private void trackHealth(MetaFilter.Builder instance, int index) {
|
||||
instance.index(18).handler((event, meta) -> {
|
||||
WolfHealthTracker.get(event.user()).setWolfHealth(event.entityId(), meta.value());
|
||||
event.cancel();
|
||||
instance.handler((event, meta) -> { // Basically removeIndex, but we need to track the actual health value
|
||||
final int metaIndex = event.index();
|
||||
if (metaIndex == index) {
|
||||
WolfHealthTracker.get(event.user()).setWolfHealth(event.entityId(), meta.value());
|
||||
event.cancel();
|
||||
} else if (metaIndex > index) {
|
||||
event.setIndex(metaIndex - 1);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user