initial: server-side fix for Gunfire 0.1.6-a + SBW 0.8.9 ammo consume
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
package com.zern.gunfiresbfix;
|
||||
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
|
||||
@Mod("gunfiresbfix")
|
||||
public class GunfireSBWFix {
|
||||
public GunfireSBWFix() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.zern.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 com.zern.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,3 @@
|
||||
public field com/atsuishio/superbwarfare/data/gun/AmmoConsumer type
|
||||
public field com/atsuishio/superbwarfare/data/gun/AmmoConsumer typeOf
|
||||
public method com/atsuishio/superbwarfare/data/gun/AmmoConsumer <init> (Ljava/lang/String;I)V
|
||||
@@ -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": "com.zern.gunfiresbfix.mixin",
|
||||
"compatibilityLevel": "JAVA_17",
|
||||
"refmap": "mixins.gunfiresbfix.refmap.json",
|
||||
"mixins": [
|
||||
"AmmoConsumerAccessor",
|
||||
"GunItemConsumeFixMixin"
|
||||
],
|
||||
"client": [],
|
||||
"server": []
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"pack": {
|
||||
"description": "Gunfire-SBW Fix",
|
||||
"pack_format": 15,
|
||||
"supported_formats": [15, 15]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user