mirror of
https://github.com/GTMEGA/EndlessIDs.git
synced 2026-11-12 16:37:49 +00:00
Extend PotionIDs Byte -> Short
This commit is contained in:
1 parent
8a3b75cf14
commit
9d5d87fe81
2 files changed
+32
No files matched your search
+29
@@ -0,0 +1,29 @@
|
||||
package com.falsepattern.endlessids.mixin.mixins.common.vanilla.potion;
|
||||
|
||||
import org.spongepowered.asm.mixin.Final;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Mutable;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
|
||||
import net.minecraft.potion.Potion;
|
||||
|
||||
@Mixin(Potion.class)
|
||||
public class PotionMixin {
|
||||
|
||||
@Shadow
|
||||
@Final
|
||||
@Mutable
|
||||
public static Potion[] potionTypes;
|
||||
|
||||
|
||||
@Inject(method = "<clinit>",
|
||||
at = @At(value = "RETURN"),
|
||||
require = 1)
|
||||
private static void clinit(CallbackInfo ci) {
|
||||
potionTypes = new Potion[32767];
|
||||
}
|
||||
}
|
||||
@@ -46,6 +46,9 @@ public enum Mixin implements IMixin {
|
||||
GenLayerRiverMixMixin(Side.COMMON, avoid(TargetedMod.DRAGONAPI), "vanilla.worldgen.GenLayerRiverMixMixin"),
|
||||
GenLayerVoronoiZoomMixin(Side.COMMON, always(), "vanilla.worldgen.GenLayerVoronoiZoomMixin"),
|
||||
//endregion Minecraft->common->worldgen
|
||||
//region Minecraft->common->potion
|
||||
PotionMixin (Side.COMMON, always(), "vanilla.potion.PotionMixin"),
|
||||
//endregion Minecraft->common->potion
|
||||
//endregion Minecraft->common
|
||||
//region Minecraft->client
|
||||
ChunkMixinClient(Side.CLIENT, always(), "vanilla.ChunkMixin"),
|
||||
|
||||
Reference in new issue
Block a user