mirror of
https://github.com/GTMEGA/EndlessIDs.git
synced 2026-11-18 19:39:11 +00:00
extend enchantment IDs
This commit is contained in:
4 files changed
+23
-1
No files matched your search
@@ -12,6 +12,7 @@ public class ExtendedConstants {
|
||||
public static final int bitsPerBiome = 16;
|
||||
|
||||
public static final int maximumPotionIDs = 65536;
|
||||
public static final int maximumEnchantmentIDs = 32768;
|
||||
|
||||
//BlockItemIDs
|
||||
public static final int nibblesPerID = bitsPerID / 4;
|
||||
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
package com.falsepattern.endlessids.mixin.mixins.common.vanilla.enchantment;
|
||||
|
||||
import com.falsepattern.endlessids.constants.ExtendedConstants;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.Constant;
|
||||
import org.spongepowered.asm.mixin.injection.ModifyConstant;
|
||||
|
||||
import net.minecraft.enchantment.Enchantment;
|
||||
|
||||
@Mixin(Enchantment.class)
|
||||
public abstract class EnchantmentMixin {
|
||||
@ModifyConstant(method = "<clinit>",
|
||||
constant = @Constant(intValue = 256),
|
||||
require = 1)
|
||||
private static int extendEnchantmentIDRange(int original) {
|
||||
return ExtendedConstants.maximumEnchantmentIDs;
|
||||
}
|
||||
}
|
||||
@@ -52,6 +52,9 @@ public enum Mixin implements IMixin {
|
||||
S1DPacketEntityEffectMixin(Side.COMMON, always(), "vanilla.potion.network.S1DPacketEntityEffectMixin"),
|
||||
S1EPacketRemoveEntityEffectMixin(Side.COMMON, always(), "vanilla.potion.network.S1EPacketRemoveEntityEffectMixin"),
|
||||
//endregion Minecraft->common->potion
|
||||
//region Minecraft->common->enchantment
|
||||
EnchantmentMixin(Side.COMMON, always(), "vanilla.enchantment.EnchantmentMixin"),
|
||||
//endregion Minecraft->common->enchantment
|
||||
//endregion Minecraft->common
|
||||
//region Minecraft->client
|
||||
ChunkMixinClient(Side.CLIENT, always(), "vanilla.ChunkMixin"),
|
||||
|
||||
Reference in new issue
Block a user