generated from quentin452/Catzmod1.7.10
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add MixinStateList (disabled by default) + removed MixinStateBaseFix
to help fixing duplicated stat ids crash
- Loading branch information
1 parent
9cdf63f
commit d87f522
Showing
4 changed files
with
28 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 0 additions & 41 deletions
41
src/main/java/fr/iamacat/multithreading/mixins/common/core/MixinStatBaseFix.java
This file was deleted.
Oops, something went wrong.
24 changes: 24 additions & 0 deletions
24
src/main/java/fr/iamacat/multithreading/mixins/common/core/MixinStatList.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package fr.iamacat.multithreading.mixins.common.core; | ||
|
||
import fr.iamacat.multithreading.config.MultithreadingandtweaksMultithreadingConfig; | ||
import net.minecraft.entity.EntityList; | ||
import net.minecraft.stats.StatBase; | ||
|
||
import net.minecraft.stats.StatList; | ||
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; | ||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; | ||
|
||
@Mixin(StatList.class) | ||
public class MixinStatList { | ||
@Inject(method = "func_151182_a", at = @At("TAIL"), remap = false) | ||
private static void onRegisterStat(EntityList.EntityEggInfo eggInfo, CallbackInfoReturnable<StatBase> info) { | ||
if (MultithreadingandtweaksMultithreadingConfig.enableMixinStatList) { | ||
StatBase stat = info.getReturnValue(); | ||
String statId = stat.statId; | ||
System.out.println("[Registered stat ID] " + statId); | ||
} | ||
} | ||
} |