initial: server-side fix for Gunfire 0.1.6+ + SBW 0.8.9 ammo consume (me.sashegdev) - AT public-f AmmoConsumer.type

This commit is contained in:
SashegDev
2026-08-23 23:09:22 +03:00
commit 79e935ffa8
13 changed files with 233 additions and 0 deletions
@@ -0,0 +1,9 @@
package me.sashegdev.gunfiresbfix;
import net.minecraftforge.fml.common.Mod;
@Mod("gunfiresbfix")
public class GunfireSBWFix {
public GunfireSBWFix() {
}
}
@@ -0,0 +1,14 @@
package me.sashegdev.gunfiresbfix.mixin;
import com.atsuishio.superbwarfare.data.gun.AmmoConsumer;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.gen.Accessor;
@Mixin(value = AmmoConsumer.class, remap = false)
public interface AmmoConsumerAccessor {
@Accessor("type")
String getType();
@Accessor("type")
void setType(String type);
}
@@ -0,0 +1,17 @@
package me.sashegdev.gunfiresbfix.mixin;
import com.atsuishio.superbwarfare.data.gun.AmmoConsumer;
import com.atsuishio.superbwarfare.data.gun.GunData;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.ItemStack;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(value = GunData.class, remap = false)
public class GunItemConsumeFixMixin {
@Inject(method = "shoot", at = @At(value = "INVOKE", target = "Lcom/atsuishio/superbwarfare/item/gun/GunItem;playFireSounds (Lnet/minecraft/world/entity/player/Player;Lnet/minecraft/world/item/ItemStack;)V", shift = At.Shift.AFTER), remap = false)
private void fixAmmoConsume(Player player, ItemStack stack, CallbackInfo ci) {
}
}
@@ -0,0 +1 @@
public-f com.atsuishio.superbwarfare.data.gun.AmmoConsumer type
+35
View File
@@ -0,0 +1,35 @@
modLoader="javafml"
loaderVersion="[47,)"
license="MIT"
issueTrackerURL="https://git.swe.zern.cc/zern/gunfiresbfix/issues"
[[mods]]
modId="gunfiresbfix"
version="${file.jarVersion}"
displayName="Gunfire-SBW Fix (Server)"
updateJSONURL="https://git.swe.zern.cc/zern/gunfiresbfix"
displayURL="https://git.swe.zern.cc/zern/gunfiresbfix"
logoFile="logo.png"
authors="Zern"
description="Server-side fix for Gunfire Overhaul 0.1.6-a + SBW 0.8.9 IllegalAccessError and ammo not consumed. Requires both mods. Server only."
[[dependencies.gunfiresbfix]]
modId="forge"
mandatory=true
versionRange="[47.4.13,)"
ordering="NONE"
side="SERVER"
[[dependencies.gunfiresbfix]]
modId="superbwarfare"
mandatory=true
versionRange="[0.8.9,0.9)"
ordering="AFTER"
side="SERVER"
[[dependencies.gunfiresbfix]]
modId="gunfireoverhaul"
mandatory=true
versionRange="[0.1.6,0.2)"
ordering="AFTER"
side="SERVER"
@@ -0,0 +1,13 @@
{
"required": true,
"minVersion": "0.8.5",
"package": "me.sashegdev.gunfiresbfix.mixin",
"compatibilityLevel": "JAVA_17",
"refmap": "mixins.gunfiresbfix.refmap.json",
"mixins": [
"AmmoConsumerAccessor",
"GunItemConsumeFixMixin"
],
"client": [],
"server": []
}
+7
View File
@@ -0,0 +1,7 @@
{
"pack": {
"description": "Gunfire-SBW Fix",
"pack_format": 15,
"supported_formats": [15, 15]
}
}