forgot to update fapi smh

This commit is contained in:
SD 2022-01-14 13:29:55 +05:30
parent 50c81f1aee
commit b5ae14b81c
5 changed files with 8 additions and 7 deletions

View file

@ -106,7 +106,7 @@ dependencies {
minecraft "com.mojang:minecraft:1.18.1" minecraft "com.mojang:minecraft:1.18.1"
mappings "net.fabricmc:yarn:1.18.1+build.1:v2" mappings "net.fabricmc:yarn:1.18.1+build.1:v2"
modImplementation "net.fabricmc:fabric-loader:0.12.12" modImplementation "net.fabricmc:fabric-loader:0.12.12"
modImplementation "net.fabricmc.fabric-api:fabric-api:0.42.1+1.17" modImplementation "net.fabricmc.fabric-api:fabric-api:0.44.0+1.18"
includeCompile("com.flowpowered", "flow-math", "1.0.3") includeCompile("com.flowpowered", "flow-math", "1.0.3")
includeCompile("org.jgrapht", "jgrapht-core", "1.1.0") includeCompile("org.jgrapht", "jgrapht-core", "1.1.0")
includeCompile("com.github.DimensionalDevelopment", "poly2tri.java", "0.1.1") includeCompile("com.github.DimensionalDevelopment", "poly2tri.java", "0.1.1")

View file

@ -7,14 +7,13 @@ import net.minecraft.util.Identifier;
import net.minecraft.util.registry.Registry; import net.minecraft.util.registry.Registry;
public class ModEnchants { public class ModEnchants {
//public static Enchantment STRING_THEORY_ENCHANTMENT; public static Enchantment STRING_THEORY_ENCHANTMENT;
public static void init() { public static void init() {
/*
STRING_THEORY_ENCHANTMENT = Registry.register( STRING_THEORY_ENCHANTMENT = Registry.register(
Registry.ENCHANTMENT, Registry.ENCHANTMENT,
new Identifier("dimdoors", "string_theory"), new Identifier("dimdoors", "string_theory"),
new StringTheoryEnchantment(Enchantment.Rarity.UNCOMMON, EnchantmentTarget.WEARABLE, new EquipmentSlot[] {EquipmentSlot.FEET, EquipmentSlot.LEGS, EquipmentSlot.CHEST, EquipmentSlot.HEAD}) new StringTheoryEnchantment(Enchantment.Rarity.UNCOMMON, EnchantmentTarget.WEARABLE, new EquipmentSlot[] {EquipmentSlot.FEET, EquipmentSlot.LEGS, EquipmentSlot.CHEST, EquipmentSlot.HEAD})
); );
*/
} }
} }

View file

@ -8,16 +8,18 @@ public class StringTheoryEnchantment extends Enchantment {
public StringTheoryEnchantment(Rarity weight, EnchantmentTarget type, EquipmentSlot[] slotTypes) { public StringTheoryEnchantment(Rarity weight, EnchantmentTarget type, EquipmentSlot[] slotTypes) {
super(weight, type, slotTypes); super(weight, type, slotTypes);
} }
@Override @Override
public int getMinPower(int level) { public int getMinPower(int level) {
return 10000; return 10000;
} }
@Override @Override
public int getMaxLevel() { public int getMaxLevel() {
return 1; return 1;
} }
public boolean isTreasure() { public boolean isTreasure() {
return true; return true;
} }
} }

View file

@ -12,7 +12,7 @@ public abstract class LimboEntranceSource {
public abstract Text getMessage(PlayerEntity player); public abstract Text getMessage(PlayerEntity player);
public void broadcast(PlayerEntity player, MinecraftServer server) { public void broadcast(PlayerEntity player, MinecraftServer server) {
server.getPlayerManager().broadcastChatMessage(this.getMessage(player), MessageType.SYSTEM, Util.NIL_UUID); server.getPlayerManager().broadcast(this.getMessage(player), MessageType.SYSTEM, Util.NIL_UUID);
} }
public static LimboDeathEntranceSource ofDamageSource(DamageSource source) { public static LimboDeathEntranceSource ofDamageSource(DamageSource source) {

View file

@ -18,6 +18,6 @@ public enum LimboExitReason implements StringIdentifiable {
public void broadcast(PlayerEntity player) { public void broadcast(PlayerEntity player) {
//noinspection ConstantConditions //noinspection ConstantConditions
player.getServer().getPlayerManager().broadcastChatMessage(new TranslatableText(asString(), player.getGameProfile().getName()), MessageType.SYSTEM, Util.NIL_UUID); player.getServer().getPlayerManager().broadcast(new TranslatableText(asString(), player.getGameProfile().getName()), MessageType.SYSTEM, Util.NIL_UUID);
} }
} }