Giter VIP home page Giter VIP logo

zsoltmolnarrr / bettercombat Goto Github PK

View Code? Open in Web Editor NEW
104.0 7.0 37.0 20.56 MB

⚔️ Easy, spectacular and fun melee combat system from Minecraft Dungeons.

Home Page: https://www.curseforge.com/minecraft/mc-mods/better-combat-by-daedelus

License: GNU General Public License v3.0

Java 100.00%
combat dungeons fabrcimc fabric melee minecraft minecraft-dungeons minecraft-fabric minecraft-mod mod

bettercombat's Introduction

Better Combat

Java 17 Environment: Client & Server Discord

Easy, spectacular and fun melee combat system we know from Minecraft Dungeons.

Add unique behaviour to your weapon, or just reuse a preset, using data files (aka JSON API).

⭐️ Features

Primary features

  • Weapons have combos (each attack in the combo can be different in many ways)
  • Better weapon idle and attack animations
  • Upswing weapon before hitting for natural look and feel
  • No more pixel hunting for target in front, accurate weapon swing calculation (based on OBB+SAT)
  • Hitting multiple enemies with a single strike
  • Weapon attributes are synchronized (server sends to client)
  • Bundled resources: weapon animations, weapon sounds, weapon attribute presets
  • Integrate any weapon from any mod by just creating data files

Auxiliary features

  • Attacking with dual wielded weapons (held weapons are used alternated, +20% attack speed while dual wielding, Server configurable)
  • Two-handed weapons ignore offhand slot (melee and ranged weapons also supported)
  • Movement speed reduction while attacking (Server configurable)
  • Cancel attack during upswing (aka "feint") (Client configurable)
  • Hold attack key to spam attack (Client configurable)
  • Target in hitbox indication (Client configurable)
  • Swing thru grass (Client configurable)
  • Can disable mining with weapons (Client configurable)
  • Sweeping Edge enchantment reworked

Compatibility features

Dedicated compatibility

To be used by developers and modpack creators.

Assign weapon attribute to weapons individually, using data files (similar how item models are assigned), to specify their animations and behaviour.

This also known as JSON API. Read more about it at Integrate your mod section.

Fallback compatibility

To be used by players (requires knowledge of JSON and Regex).

Built into Better Combat, tries to automatically assign weapon attributes to items without attribute file, based on item id.

To change assignments, edit: config/bettercombat/fallback_compatibility.json file.

(Note: Fallback compatibility can only assign attributes to non-attributed weapons, it cannot override data file based assignments.)

NBT compatibility

⚠️ This feature does not work correctly in multiplayer, currently.

Weapon attributes can be read from ItemStack NBT. For example:

/give @p minecraft:wooden_sword{weapon_attributes:'{"parent":"bettercombat:claymore"}'} 1

Future plans:

  • Weapon trail animation while hitting
  • Parry (under consideration)
  • Additional weapon attributes (for example: pushback)

🔧 Configuration

Client

Fabric

You can access the client side settings via the Mod Menu.

Forge

You can access the client side settings in Main Menu > Mods > Better Combat > Config.

Server

Fallback compatibility configuration can be found at: /config/bettercombat/fallback_compatibility.json

Use fallback compatibility configuration to add compatibility for any weapon on your server. All weapon attributes are synchronized with clients upon joining the server.

Server config can be found at: /config/bettercombat/server.json5

Server configuration is synchronized with clients upon joining the server.

🔨 Integrate your mod

The next steps describe how to add dedicated compatibility for any item.

Installation

Dependencies to resolve via gradle:

Fabric

Download the latest release version of the mod with all of its dependencies, and put them into ./run/mods director.

Alternatively, if you would like to use the JAVA API provided by Better Combat. Install it via gradle:

repositories {
    maven { url 'https://api.modrinth.com/maven' }  
}

dependencies {
    [...]
    modImplementation "maven.modrinth:better-combat:VERSION-fabric"
}

(Note: JAVA API is only needed for special integration cases.)

Please note for both Forge and Fabric, Cloth Config and playerAnimator are required as well. Please see each link on how to add these to your dev environments.

Forge

repositories {
    maven { url 'https://api.modrinth.com/maven' }  
}

dependencies {
    [...]
    implementation fg.deobf('maven.modrinth:better-combat:VERSION-forge')
}

Prerequisite

Make sure to remove or disable all logic from your mod that is semantically conflicting with this mod:

  • Player animation and or model modifications
  • Attack range modifications
  • Attack timing or cooldown logic modifications
  • Custom attack sound playback
  • Attack/mining key handler modifications (of MinecraftClient)
  • Dual wielding logic
  • Custom item wielding appearance

(Note: Better Combat expects all items to be held like swords, it rotates them accordingly during animations. If you have a dagger that is facing backwards, you need to disable that, otherwise it will be facing backwards during attack animations too. Better Combat offers weapon specific poses for adjusting position and rotation of items while idling.)

Basics

Weapon attributes describe the behaviour of a weapon including: range, combos (list of attacks), animations and sounds, etc...

Assign weapon attributes to weapons of your mod, just by creating resource files. This is done similar to how you assign crafting recipes to an item. No need for any java dependency.

Weapon attributes can describe:

  • How the weapon is held (is two-handed, idle pose)
  • Attack range
  • List of attack moves (aka Combo), attacks have the following properties
    • Damage
    • Hitbox
    • Conditions
    • Animation
    • Sounds

Each mod should provide their own resources files for compatibility (preferably within their jar file) for the following reasons:

  • A single source of configuration files is difficult to maintain
  • More intuitive installation process for users
  • Every mod developer should decide how their weapon is meant to behave
  • Some mods may need to disable semantically conflicting features (mentioned at Prerequisite)

Let's see an example where we add attributes to a custom sword named "Big Sword" from your mod:

  • mod id is my-mod-id
  • id of the item is my-mod-id:big_sword

To assign weapon attributes to the Big Sword, create a new json file at the following location:

resources/data/my-mod-id/weapon_attributes/big_sword.json

The content of this json file should be the following:

Using a preset

Presets are out of the box collection of weapon attributes bundled with this mod, covering the common weapon types.

A fitting preset for a big two handed sword is the claymore from Better Combat, its identifier is: bettercombat:claymore. To use this preset add the following content to your JSON file:

{
  "parent": "bettercombat:claymore"
}

You can check out all available presets here.

You can check out how presets are used to add compatibility for Vanilla weapons here.

You can make and reference your own presets the same way.

Custom attributes

If you want unique behaviour for your weapon, you can create attributes from scratch.

The content of your weapon attributes JSON file is parsed into an AttributesContainer object. (Check out the inline java documentation of AttributesContainer for details.)

When no parent is specified, the value for "attributes" key must be a full json object that can be parsed into WeaponAttributes object.

{
  "attributes": { ... }
}

Check out the existing weapon presets to see practical examples of building from scratch.

Check out the available attack animations, bundled with Better Combat.

If you need more details, the java documentation of WeaponAttributes covers all the specifics.


When "parent" and "attributes" are both specified, you can customize attributes by partially (or fully) overriding the properties. Make sure the inheritance results in fully parsable WeaponAttributes object.

(Attributes are merged in parent -> child order. So parent properties are copied and overridden with child. The chain of inheritance can be any length.)

{
  "parent": "bettercombat:claymore",
  "attributes": {
    "attack_range": 3.5
    "attacks": [
      {
        "angle": 100
      },
      {
        "damageMultiplier": 0.1 
      },
      {
        "damageMultiplier": 0.3,
        "angle" = 90
      }
    ]
  }
}

You can create and use your own presets:

{
  "parent": "my-mod-id:longsword",
  "attributes": { ... }
}

Custom animations

Let's say you want to create a custom attack animation with the following name: big_sword_slash

Creating animation

Create keyframe animations using our Blender model, that includes an export script creating animation files.

Check out the Animation guide for details. Blender example

Adding animation

Add the created animation to the following location

resources/assets/my-mod-id/attack_animations/big_sword_slash.json

Using the animation

You can use your custom animation by referencing it, following the resource identifier pattern.

Make sure to specify a fitting upswing value next to your animation (to make it look and feel nice to use).

{
  // ...
  "attributes": {
    // ...
    "attacks": [
      {
        "animation": "my-mod-id:big_sword_slash",
        "upswing": 0.5
      },
      // ...
    ]
  }
}

📦 Using datapacks

You can create datapacks to add dedicated compatibility for any weapon.

⚠️ Caution! Some mods may have conflicting features, that causes incorrect appearance or behaviour of weapons, even if compatibility is added. In this case mod developers need to resolve incompatibilities. (Check mod compatibility section for potential source of problems.)

Steps:

  1. Create a datapack
  2. Add weapon attribute files based on our integration guide, the easiest way to use existing presets of Better Combat

For example, adding compatibility for an item with id fruits:banana_sword from Fruits mod, to make it act like a claymore, would look like the following.

File path:

DataPackName/data/fruits/weapon_attributes/banana_sword.json

Content:

{
  "parent": "bettercombat:claymore"
}

⛓ Mod compatibility

This mod has been created in the spirit of maximal compatibility. However since some core mechanics are overridden, mods trying to change the same thing will never be compatible.

Mods with one or more of these features are considered as a semantic incompatibility

  • Dual wielding implementation
  • Attack range modifications
  • Attack timing or attack cooldown logic modifications
  • Attack/mining key handler modifications (of MinecraftClient)
  • Player model modification

✍️ Contribution

Before committing yourself to implementing any change for the project, it is strongly suggested to check with us on Discord. The project has a strong vision for what technical solutions are accepted, and what features belong to the scope of the project.

Avoid creating pull requests with the following content:

  • huge code changes
  • feature that is out of scope
  • feature that already exist in some form

bettercombat's People

Contributors

azuredoom avatar bernie-g avatar chronosacaria avatar dev0louis avatar ejdarrow avatar ellet0 avatar endilcrafter avatar fitfc avatar kosmx avatar leximon avatar lukegrahamlandry avatar mattiagre avatar merhaf avatar mpustovoi avatar saga23456 avatar skel39eek66 avatar thelegendofsaram avatar unroman avatar vertexcubed avatar yurannnzzz avatar zsoltmolnarrr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

bettercombat's Issues

Render 2nd skin layer arms in first person

Not exactly a pressing issue, but one you may want to know about regardless for that extra polish.
Exactly what the title says, you'll spot the differences here I'm sure.
2022-07-21_19 48 19
2022-07-21_19 48 24

compatibility issue with medival weapons | 1.19 fabric

This both mods are working good but only in some cases like battle axe. But there are some issues too:

  • long sword should have 3,3 range but have 2,5
  • mace should have 2 range but have 2,5
  • javelin, ninjato and francisca is not even having new animations
  • war axe have wrong animations
  • dagger have wrong or just weird animations im not sure

Attack range problem video:
https://youtu.be/U9bOBRnuqSI

Animation issue video:
https://youtu.be/cppYVFJxggI

medieval weapons:
https://www.curseforge.com/minecraft/mc-mods/medievalweapons

Add a toggle for new combat mechanics.

Something akin to what Epic Fight mod does. The new features shouldn't activate unless you switch into the new combat.
Maybe add a new idle for it to make it visually apparent both in first and third person? Or a GUI message saying that combat has been engaged.

The only real reason why I'm suggesting this is because whenever I try to chop a tree with this mod installed I keep accidentally swinging the axe around like I'm trying to angrily chop the tree down whenever a block finishes mining and there's nothing to mine behind it.
Edit: As you can imagine it's a bit jarring since it interrupts mining and the only way to stop this from happening is to have auto swing disabled, but that's not ideal since I like having that on, it makes combat more fluid.

Head is visible in First Person whilst Twilight Forest (Forge) is installed

Minecraft version - 1.18.2
Mod loader - Forge 40.1.73
Mod version - 1.1.0+1.18.2
I am using the latest version available - Yes

Describe the bug
Whilst in first person and having Twilight Forest installed, whenever the player attacks, their head comes into the view.

To Reproduce
Steps to reproduce the behavior:

  1. Install Better Combat
  2. Install Twilight Forest
  3. Swing weapon
  4. See back of head

Expected behavior
That the head should not come into view whilst attacking in first person

Screenshots or video recordings
TwilightForestBetterCombatIncompat

Additional context
Not really

Fails if too many weapons are declared.

apon loading a world after adding the entirety of gate of babylons weapons excluding the yoyos and boomerangs, and also adding every tool except the hoe, the game throws an error stating that the string is too long, and crashes.
Encountered an unexpected exception
io.netty.handler.codec.EncoderException: String too big (was 52451 bytes encoded, max 32767)
at net.minecraft.class_2540.method_10788(class_2540.java:519)
at net.minecraft.class_2540.method_10814(class_2540.java:513)
at net.bettercombat.logic.WeaponRegistry.updateEncodedRegistry(WeaponRegistry.java:113)
at net.bettercombat.logic.WeaponRegistry.loadAttributes(WeaponRegistry.java:101)
at net.bettercombat.BetterCombat.lambda$onInitialize$0(BetterCombat.java:20)
at net.fabricmc.fabric.api.event.lifecycle.v1.ServerLifecycleEvents.lambda$static$2(ServerLifecycleEvents.java:49)
at net.minecraft.server.MinecraftServer.handler$zmn000$afterSetupServer(MinecraftServer.java:2812)
at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:676)
at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:273)
at java.base/java.lang.Thread.run(Thread.java:833)

Attacking is not exclusive with right-click use actions

The player is able to perform attacks while using an item such as a shield, spyglass, or crossbow. Doing so doesn't interrupt the item's use. Similarly, the player is able to initiate right-click actions during the attack animation, such as placing blocks or raising their shield. Items which have both a weapon attack and a right-click action can be used simultaneously, so the player can strip logs while swinging their axe, and throw a trident while thrusting with it. Attacking with a trident while also holding right-click to use it causes the player to attack using the back end, which isn't particularly relevant information but I thought it looked neat.

This allows the player to do things they can't do in vanilla, which they probably shouldn't be allowed to - for instance, attacking freely without ever having to lower their shield.

Scale Attack Range with Pehkui's entity scale

Just an idea for something long down the road, but, I figured this is probably one of the easier ways to add compatibility between Better Combat and Pehkui.
So, if Pehkui doubles your "block reach" by 2, your attack range likewise multiplies by 2 -- and vise versa.
The reason why I mention "block reach" specifically is because it's usually calculated when growing or shrinking players' base height.
Assuming this wouldn't be a total pain in the arse to program, that is. Thanks for reading.

[Feature] Configurable windup time

You know what would be great? A setting in the server json file that controls the point in the animation where a hit is registered :)

kick from server when attack with weapon in inventorio slot

Not happened all the time, but sometimes the server kick out the player with error below when using a weapon from the inventorio mod's weapon slot, the server didn't crash

[13:35:27] [Netty Server IO #20/ERROR]: Encountered exception while handling in channel with name "bettercombat:c2s_request_attack"
java.lang.NullPointerException: Cannot invoke "net.bettercombat.logic.AttackHand.attack()" because "hand" is null
	at net.bettercombat.network.ServerNetwork.lambda$initializeHandlers$6(ServerNetwork.java:73) ~[bettercombat-1.0.10+1.19.jar:?]
	at net.fabricmc.fabric.impl.networking.server.ServerPlayNetworkAddon.receive(ServerPlayNetworkAddon.java:89) ~[fabric-networking-api-v1-1.1.0+442de8b8a9-4071c58cedb5d399.jar:?]
	at net.fabricmc.fabric.impl.networking.server.ServerPlayNetworkAddon.receive(ServerPlayNetworkAddon.java:38) ~[fabric-networking-api-v1-1.1.0+442de8b8a9-4071c58cedb5d399.jar:?]
	at net.fabricmc.fabric.impl.networking.AbstractChanneledNetworkAddon.handle(AbstractChanneledNetworkAddon.java:100) [fabric-networking-api-v1-1.1.0+442de8b8a9-4071c58cedb5d399.jar:?]
	at net.fabricmc.fabric.impl.networking.server.ServerPlayNetworkAddon.handle(ServerPlayNetworkAddon.java:84) [fabric-networking-api-v1-1.1.0+442de8b8a9-4071c58cedb5d399.jar:?]
	at net.minecraft.class_3244.handler$bgk000$handleCustomPayloadReceivedAsync(class_3244.java:2383) [server-intermediary.jar:?]
	at net.minecraft.class_3244.method_12075(class_3244.java) [server-intermediary.jar:?]
	at net.minecraft.class_2817.method_12199(class_2817.java:38) [server-intermediary.jar:?]
	at net.minecraft.class_2817.method_11054(class_2817.java:7) [server-intermediary.jar:?]
	at net.minecraft.class_2535.method_10759(class_2535.java:171) [server-intermediary.jar:?]
	at net.minecraft.class_2535.method_10770(class_2535.java:156) [server-intermediary.jar:?]
	at net.minecraft.class_2535.channelRead0(class_2535.java:54) [server-intermediary.jar:?]
	at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:99) [netty-transport-4.1.76.Final.jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) [netty-transport-4.1.76.Final.jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) [netty-transport-4.1.76.Final.jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) [netty-transport-4.1.76.Final.jar:?]
	at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:327) [netty-codec-4.1.76.Final.jar:?]
	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:299) [netty-codec-4.1.76.Final.jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) [netty-transport-4.1.76.Final.jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) [netty-transport-4.1.76.Final.jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) [netty-transport-4.1.76.Final.jar:?]
	at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:327) [netty-codec-4.1.76.Final.jar:?]
	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:299) [netty-codec-4.1.76.Final.jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) [netty-transport-4.1.76.Final.jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) [netty-transport-4.1.76.Final.jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) [netty-transport-4.1.76.Final.jar:?]
	at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:327) [netty-codec-4.1.76.Final.jar:?]
	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:299) [netty-codec-4.1.76.Final.jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) [netty-transport-4.1.76.Final.jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) [netty-transport-4.1.76.Final.jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) [netty-transport-4.1.76.Final.jar:?]
	at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) [netty-codec-4.1.76.Final.jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) [netty-transport-4.1.76.Final.jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) [netty-transport-4.1.76.Final.jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) [netty-transport-4.1.76.Final.jar:?]
	at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:286) [netty-handler-4.1.76.Final.jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) [netty-transport-4.1.76.Final.jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) [netty-transport-4.1.76.Final.jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) [netty-transport-4.1.76.Final.jar:?]
	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) [netty-transport-4.1.76.Final.jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) [netty-transport-4.1.76.Final.jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) [netty-transport-4.1.76.Final.jar:?]
	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) [netty-transport-4.1.76.Final.jar:?]
	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166) [netty-transport-4.1.76.Final.jar:?]
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:722) [netty-transport-4.1.76.Final.jar:?]
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:658) [netty-transport-4.1.76.Final.jar:?]
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:584) [netty-transport-4.1.76.Final.jar:?]
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:496) [netty-transport-4.1.76.Final.jar:?]
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986) [netty-common-4.1.76.Final.jar:?]
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) [netty-common-4.1.76.Final.jar:?]
	at java.lang.Thread.run(Thread.java:833) [?:?]

Some crash

java.lang.RuntimeException: Could not execute entrypoint stage 'main' due to errors, provided by 'bettercombat'!
at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.lambda$invoke0$0(EntrypointUtils.java:51)
at net.fabricmc.loader.impl.util.ExceptionUtil.gatherExceptions(ExceptionUtil.java:33)
at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.invoke0(EntrypointUtils.java:49)
at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.invoke(EntrypointUtils.java:35)
at net.fabricmc.loader.impl.game.minecraft.Hooks.startClient(Hooks.java:52)
at net.minecraft.class_310.(class_310.java:452)
at net.minecraft.client.main.Main.main(Main.java:197)
at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:461)
at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74)
at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)
Caused by: java.lang.NoClassDefFoundError: me/lortseam/completeconfig/api/ConfigGroup
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1012)
at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150)
at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.defineClassFwd(KnotClassLoader.java:186)
at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.tryLoadClass(KnotClassDelegate.java:347)
at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.loadClass(KnotClassDelegate.java:218)
at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:145)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
at net.bettercombat.BetterCombat.(BetterCombat.java:12)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:467)
at net.fabricmc.loader.impl.util.DefaultLanguageAdapter.create(DefaultLanguageAdapter.java:50)
at net.fabricmc.loader.impl.entrypoint.EntrypointStorage$NewEntry.getOrCreate(EntrypointStorage.java:117)
at net.fabricmc.loader.impl.entrypoint.EntrypointContainerImpl.getEntrypoint(EntrypointContainerImpl.java:53)
at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.invoke0(EntrypointUtils.java:47)
... 7 more
Caused by: java.lang.ClassNotFoundException: me.lortseam.completeconfig.api.ConfigGroup
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.loadClass(KnotClassDelegate.java:226)
at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:145)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
... 22 more

crash-2022-07-20_19.38.01-client.txt

Custom Crosshair Mod incompatibility

@ardissaps This new issue that you are presenting appears to be between BetterCombat and Custom Crosshair Mod as per this part of your log (again, mapped for ease of reading):

[21/07/2022 09:39:32 AM] [Render thread/WARN] Configuration conflict: there is more than one oshi.architecture.properties file on the classpath
[21/07/2022 09:39:32 AM] ---- Minecraft Crash Report ----
[21/07/2022 09:39:32 AM] // Hi. I'm Minecraft, and I'm a crashaholic.
[21/07/2022 09:39:32 AM] 
[21/07/2022 09:39:32 AM] Time: 7/21/22, 9:39 AM
[21/07/2022 09:39:32 AM] Description: Initializing game
[21/07/2022 09:39:32 AM] 
[21/07/2022 09:39:32 AM] java.lang.RuntimeException: Mixin transformation of net.minecraft.client.gui.hud.InGameHud failed
[21/07/2022 09:39:32 AM] 	at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.getPostMixinClassByteArray(KnotClassDelegate.java:419)
[21/07/2022 09:39:32 AM] 	at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.tryLoadClass(KnotClassDelegate.java:323)
[21/07/2022 09:39:32 AM] 	at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.loadClass(KnotClassDelegate.java:218)
[21/07/2022 09:39:32 AM] 	at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:145)
[21/07/2022 09:39:32 AM] 	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
[21/07/2022 09:39:32 AM] 	at net.minecraft.client.MinecraftClient.<init>(MinecraftClient.java:593)
[21/07/2022 09:39:32 AM] 	at net.minecraft.client.main.Main.main(Main.java:197)
[21/07/2022 09:39:32 AM] 	at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:461)
[21/07/2022 09:39:32 AM] 	at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74)
[21/07/2022 09:39:32 AM] 	at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)
[21/07/2022 09:39:32 AM] Caused by: org.spongepowered.asm.mixin.transformer.throwables.MixinTransformerError: An unexpected critical error was encountered
[21/07/2022 09:39:32 AM] 	at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:392)
[21/07/2022 09:39:32 AM] 	at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClass(MixinTransformer.java:234)
[21/07/2022 09:39:32 AM] 	at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClassBytes(MixinTransformer.java:202)
[21/07/2022 09:39:32 AM] 	at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.getPostMixinClassByteArray(KnotClassDelegate.java:414)
[21/07/2022 09:39:32 AM] 	... 9 more
[21/07/2022 09:39:32 AM] Caused by: org.spongepowered.asm.mixin.injection.throwables.InjectionError: Critical injection failure: Redirector crosshairmod$renderCrosshair(Lnet/minecraft/InGameHud;Lnet/minecraft/MatrixStack;IIIIII)V in crosshairmod.mixins.json:InGameHudMixin from mod crosshairmod failed injection check, (0/1) succeeded. Scanned 1 target(s). Using refmap crosshairmod-refmap.json
[21/07/2022 09:39:32 AM] 	at org.spongepowered.asm.mixin.injection.struct.InjectionInfo.postInject(InjectionInfo.java:468)
[21/07/2022 09:39:32 AM] 	at org.spongepowered.asm.mixin.transformer.MixinTargetContext.applyInjections(MixinTargetContext.java:1385)
[21/07/2022 09:39:32 AM] 	at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.applyInjections(MixinApplicatorStandard.java:1052)
[21/07/2022 09:39:32 AM] 	at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.applyMixin(MixinApplicatorStandard.java:400)
[21/07/2022 09:39:32 AM] 	at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.apply(MixinApplicatorStandard.java:325)
[21/07/2022 09:39:32 AM] 	at org.spongepowered.asm.mixin.transformer.TargetClassContext.apply(TargetClassContext.java:421)
[21/07/2022 09:39:32 AM] 	at org.spongepowered.asm.mixin.transformer.TargetClassContext.applyMixins(TargetClassContext.java:403)
[21/07/2022 09:39:32 AM] 	at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:363)
[21/07/2022 09:39:32 AM] 	... 12 more

It looks like they are both trying to target Lnet/minecraft/InGameHud;Lnet/minecraft/MatrixStack;IIIIII)V; Better Combat via InGameHudInject#pre_renderCrosshair and Custom Crosshair Mod via crosshairmod$renderCrosshair. It also appears that the Custom Crosshair Mod is trying to @Redirect as well, like BetterCombat is.

As Custom Crosshair Mod is, as G4mespeed is, All Rights Reserved and not Open Source, I cannot see what, exactly, is going on. However, it would probably be advisable to make a separate issue concerning this crash as it is related to a different mod. I would suggest a title, something along the lines of: "Crash on startup with Custom Crosshair Mod (v. 0.4.5)". You could also either copy and paste the mapped crash report or just link to this comment to make things easier for yourself

Originally posted by @chronosacaria in #10 (comment)

Missing first person attack animations

Hi since version 1.0.2 I have a bug "right click item usage while attacking" actually introduced by this version, but it was supposed to be fixed by it. Tried the newest versions with no luck, versions before 1.0.2 work fine.
latest.log

Missing weapon sounds

[20:18:57] [Render thread/INFO] (Minecraft) [STDERR]: java.io.FileNotFoundException: file:/Users/zsoltmolnar/Documents/Personal/MCDungeonsWeapons/run/.fabric/processedMods/bettercombat-1.0.0-64b5720b4b825f21.jar!/assets/bettercombat/sounds.json (No such file or directory)
[20:18:57] [Render thread/INFO] (Minecraft) [STDERR]: at java.base/java.io.FileInputStream.open0(Native Method)
[20:18:57] [Render thread/INFO] (Minecraft) [STDERR]: at java.base/java.io.FileInputStream.open(FileInputStream.java:216)
[20:18:57] [Render thread/INFO] (Minecraft) [STDERR]: at java.base/java.io.FileInputStream.(FileInputStream.java:157)
[20:18:57] [Render thread/INFO] (Minecraft) [STDERR]: at java.base/java.io.FileInputStream.(FileInputStream.java:111)
[20:18:57] [Render thread/INFO] (Minecraft) [STDERR]: at java.base/java.io.FileReader.(FileReader.java:60)
[20:18:57] [Render thread/INFO] (Minecraft) [STDERR]: at net.bettercombat.client.BetterCombatClient.registerSounds(BetterCombatClient.java:65)
[20:18:57] [Render thread/INFO] (Minecraft) [STDERR]: at net.bettercombat.client.BetterCombatClient.onInitializeClient(BetterCombatClient.java:48)
[20:18:57] [Render thread/INFO] (Minecraft) [STDERR]: at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.invoke0(EntrypointUtils.java:47)
[20:18:57] [Render thread/INFO] (Minecraft) [STDERR]: at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.invoke(EntrypointUtils.java:35)
[20:18:57] [Render thread/INFO] (Minecraft) [STDERR]: at net.fabricmc.loader.impl.game.minecraft.Hooks.startClient(Hooks.java:53)
[20:18:57] [Render thread/INFO] (Minecraft) [STDERR]: at net.minecraft.client.MinecraftClient.(MinecraftClient.java:514)
[20:18:57] [Render thread/INFO] (Minecraft) [STDERR]: at net.minecraft.client.main.Main.main(Main.java:178)
[20:18:57] [Render thread/INFO] (Minecraft) [STDERR]: at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:461)
[20:18:57] [Render thread/INFO] (Minecraft) [STDERR]: at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74)
[20:18:57] [Render thread/INFO] (Minecraft) [STDERR]: at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)
[20:18:57] [Render thread/INFO] (Minecraft) [STDERR]: at net.fabricmc.devlaunchinjector.Main.main(Main.java:86)

Certain features connected to the player model become visible while attacking in first person

So far I have found that the following things become visible while the player is performing one of this mod's attack animations:

  • Worn skulls & heads
  • Worn elytra
  • Worn pumpkins
  • Non-equippable items and blocks placed in the helmet slot (such as with /item replace entity @s armor.head with acacia_sapling)
  • Arrows stuck in the playermodel
  • Parrots on either shoulder
  • Spyglasses being used, although this is only noticeable because of issue #12
  • I haven't checked, but from messages on the discord it seems that this also includes capes
  • The player's own hitbox, when hitboxes are enabled using F3+B

The player's shadow is also visible on the ground beneath them during an attack. I'm not sure if that's related or not, I can open a separate issue if it isn't.

[Forge] Firstperson Model

Minecraft version - 1.18.2
Mod loader - forge_20.1.73
Mod version - 1.1.0
I am using the latest version available - yes

Describe the bug
when useing First-person Model with Better Combat,arm was rendered twice and body won't render

To Reproduce
Steps to reproduce the behavior:
install First-person Model and Better Combat

Expected behavior
see only 2arms and my chest

Screenshots or video recordings
79QE4%6P_O)HGXGYSE92`SY

Additional context
Add any other context about the problem here.

Incompatible with The Box Trot

Just a quick note! I've found that using Better Combat and The Box Trot mods on the same profile causes some minor visual issues. While wearing a barrel on your head, some clipping occurs that causes the player's head to still be visible - this occurs during attack animations which is to be expected, but it also occurs while simply standing, walking, running, etc.

A fix would be cool, but at the very least I figured it would be good to note that a compatibility issue exists here. I'll be posting on the other mod's issues page as well to inform the devs there.

If it's important, this is on Minecraft version 1.19, Fabric version 0.14.9, and Better Combat version 1.0.13

2022-08-19_11 03 21

2022-08-19_11 03 09
.

tooltip bug

image no hide

image hide

When I set hide attribute modifiers, the attack range will still appear in tooltip

Missing first person attack animations

Minecraft version - 1.18.2
Mod loader - Fabric 0.14.8
Mod version - 1.0.3 and up
I am using the latest version available - yes, tried with the newest version

Describe the bug
Missing animation in first person view, third person works fine.

To Reproduce
Steps to reproduce the behavior:

  1. Attack in first person view
  2. Item slightly moves down and up, attack sound plays.

The mod causing this is First-person Model (Forge/Fabric) version 2.1.2, with version 2.1.0 bug is present as well, but if I use version 1.0.2 of Better Combat, there is no issue.

EmoteCraft mod

If EmoteCraft and Better Combat are installed at the same time, the game crashes on launch.

EmoteCraft needs to migrate to fabricPlayerAnimation library.

There is nothin I can do about it, just wait for it to be resolved.

Attacking with a weapon doesn't cause the body's yaw to change

The vanilla arm-swinging animation causes the player's body to rotate to match their head, however performing a weapon attack does not do so. Since the hitbox of a weapon attack is based on the head's rotation, this can cause weird-looking behaviour, especially with narrow attacks like the Trident's thrust attack - if the body is facing straight north, but the player's head is turned northeast, the animation will point north but the actual hitbox will point northeast. Forcing the body to match the head's yaw while attacking would fix this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.