mirror of
https://github.com/ViaVersion/ViaFabricPlus.git
synced 2024-11-22 11:56:21 +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
|
minecraft_version=1.20.4
|
||||||
yarn_mappings=1.20.4+build.3
|
yarn_mappings=1.20.4+build.3
|
||||||
loader_version=0.15.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
|
# Project Details
|
||||||
mod_version=3.0.6-SNAPSHOT
|
mod_version=3.0.6-SNAPSHOT
|
||||||
@ -18,11 +18,12 @@ viaversion_version=4.10.0-23w51b-SNAPSHOT
|
|||||||
viabackwards_version=4.10.0-23w51b-SNAPSHOT
|
viabackwards_version=4.10.0-23w51b-SNAPSHOT
|
||||||
vialegacy_version=2.2.22-SNAPSHOT
|
vialegacy_version=2.2.22-SNAPSHOT
|
||||||
viaaprilfools_version=2.0.11-SNAPSHOT
|
viaaprilfools_version=2.0.11-SNAPSHOT
|
||||||
viabedrock_version=0.0.4-SNAPSHOT
|
|
||||||
vialoader_version=2.2.13-SNAPSHOT
|
vialoader_version=2.2.13-SNAPSHOT
|
||||||
|
|
||||||
# RaphiMC Libraries
|
# RaphiMC Libraries
|
||||||
minecraftauth_version=3.1.0
|
minecraftauth_version=3.1.0
|
||||||
|
|
||||||
|
viabedrock_version=0.0.4-SNAPSHOT
|
||||||
raknet_transport_version=1.0.0.CR1-SNAPSHOT
|
raknet_transport_version=1.0.0.CR1-SNAPSHOT
|
||||||
|
|
||||||
# Lenni0451 Libraries
|
# 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"))
|
@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) {
|
private void trackHealth(MetaFilter.Builder instance, int index) {
|
||||||
instance.index(18).handler((event, meta) -> {
|
instance.handler((event, meta) -> { // Basically removeIndex, but we need to track the actual health value
|
||||||
WolfHealthTracker.get(event.user()).setWolfHealth(event.entityId(), meta.value());
|
final int metaIndex = event.index();
|
||||||
event.cancel();
|
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