mirror of
https://github.com/ViaVersion/ViaFabricPlus.git
synced 2024-12-21 16:38:39 +01:00
Fix footstep particles causes client disconnect
Also carry custom particle id through modern particle mappings
This commit is contained in:
parent
d0426c82e3
commit
49311d479f
@ -0,0 +1,46 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of ViaFabricPlus - https://github.com/FlorianMichael/ViaFabricPlus
|
||||||
|
* Copyright (C) 2021-2024 FlorianMichael/EnZaXD <florian.michael07@gmail.com> and RK_01/RaphiMC
|
||||||
|
* Copyright (C) 2023-2024 contributors
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package de.florianmichael.viafabricplus.injection.mixin.fixes.viaversion;
|
||||||
|
|
||||||
|
import com.viaversion.viaversion.api.data.FullMappingsBase;
|
||||||
|
import com.viaversion.viaversion.api.data.Mappings;
|
||||||
|
import com.viaversion.viaversion.api.data.ParticleMappings;
|
||||||
|
import de.florianmichael.viafabricplus.fixes.versioned.visual.FootStepParticle1_12_2;
|
||||||
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Mixin(ParticleMappings.class)
|
||||||
|
public abstract class MixinParticleMappings extends FullMappingsBase {
|
||||||
|
|
||||||
|
public MixinParticleMappings(List<String> unmappedIdentifiers, List<String> mappedIdentifiers, Mappings mappings) {
|
||||||
|
super(unmappedIdentifiers, mappedIdentifiers, mappings);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getNewId(int id) {
|
||||||
|
if (id == FootStepParticle1_12_2.ID) {
|
||||||
|
return id;
|
||||||
|
} else {
|
||||||
|
return super.getNewId(id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -137,6 +137,8 @@
|
|||||||
"fixes.minecraft.network.MixinClientPlayerInteractionManager",
|
"fixes.minecraft.network.MixinClientPlayerInteractionManager",
|
||||||
"fixes.minecraft.network.MixinClientPlayNetworkHandler",
|
"fixes.minecraft.network.MixinClientPlayNetworkHandler",
|
||||||
"fixes.minecraft.network.MixinMultiplayerServerListPinger",
|
"fixes.minecraft.network.MixinMultiplayerServerListPinger",
|
||||||
|
"fixes.minecraft.network.MixinNetworkStateTransitionHandler",
|
||||||
|
"fixes.minecraft.network.MixinNetworkStateTransitions",
|
||||||
"fixes.minecraft.network.MixinPlayerListEntry",
|
"fixes.minecraft.network.MixinPlayerListEntry",
|
||||||
"fixes.minecraft.network.MixinUpdatePlayerAbilitiesC2SPacket",
|
"fixes.minecraft.network.MixinUpdatePlayerAbilitiesC2SPacket",
|
||||||
"fixes.minecraft.screen.MixinAbstractCommandBlockScreen",
|
"fixes.minecraft.screen.MixinAbstractCommandBlockScreen",
|
||||||
@ -197,8 +199,7 @@
|
|||||||
"viabedrock.MixinJoinPackets",
|
"viabedrock.MixinJoinPackets",
|
||||||
"vialegacy.MixinExtensionProtocolMetadataStorage",
|
"vialegacy.MixinExtensionProtocolMetadataStorage",
|
||||||
"vialegacy.MixinViaLegacyConfig",
|
"vialegacy.MixinViaLegacyConfig",
|
||||||
"fixes.minecraft.network.MixinNetworkStateTransitionHandler",
|
"fixes.viaversion.MixinParticleMappings"
|
||||||
"fixes.minecraft.network.MixinNetworkStateTransitions"
|
|
||||||
],
|
],
|
||||||
"injectors": {
|
"injectors": {
|
||||||
"defaultRequire": 1
|
"defaultRequire": 1
|
||||||
|
Loading…
Reference in New Issue
Block a user