This commit is contained in:
parent
10bfbdb53d
commit
263466eed3
@ -3,11 +3,11 @@ org.gradle.jvmargs = -Xmx1G
|
||||
|
||||
# Fabric Properties
|
||||
# check these on https://fabricmc.net/use
|
||||
minecraft_version = 1.16.1
|
||||
minecraft_version = 1.16.4
|
||||
curseforge_id = 365308
|
||||
simple_minecraft_version = 1.16.1
|
||||
yarn_build = 1
|
||||
fabric_loader_version = 0.8.8+build.202
|
||||
simple_minecraft_version = 1.16.4
|
||||
yarn_build = 7
|
||||
fabric_loader_version = 0.10.8
|
||||
|
||||
# Mod Properties
|
||||
mod_version = 1.2.9
|
||||
@ -16,7 +16,7 @@ org.gradle.jvmargs = -Xmx1G
|
||||
|
||||
# Dependencies
|
||||
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api
|
||||
fabric_api_version = 0.13.1+build.370-1.16
|
||||
cloth_config_version = 4.5.6
|
||||
auto_config_version = 3.2.0-unstable
|
||||
mod_menu_version = 1.12.2+build.16
|
||||
fabric_api_version = 0.28.1+1.16
|
||||
cloth_config_version = 4.8.3
|
||||
auto_config_version = 3.3.1
|
||||
mod_menu_version = 1.14.13+build.19
|
||||
|
@ -8,14 +8,12 @@ import com.thebrokenrail.sorcerycraft.spell.api.Spell;
|
||||
import com.thebrokenrail.sorcerycraft.spell.util.SpellHelper;
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
import net.minecraft.client.font.TextRenderer;
|
||||
import net.minecraft.client.gui.screen.ingame.HandledScreen;
|
||||
import net.minecraft.client.gui.widget.ButtonWidget;
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.text.LiteralText;
|
||||
import net.minecraft.text.StringRenderable;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraft.text.TranslatableText;
|
||||
import net.minecraft.util.Identifier;
|
||||
@ -202,7 +200,7 @@ public class CastingTableScreen extends HandledScreen<CastingTableScreenHandler>
|
||||
}
|
||||
|
||||
@Environment(EnvType.CLIENT)
|
||||
private class WidgetButtonPage extends ButtonWidget {
|
||||
public class WidgetButtonPage extends ButtonWidget {
|
||||
final int index;
|
||||
|
||||
public WidgetButtonPage(int i, int j, int k, PressAction pressAction) {
|
||||
@ -229,10 +227,5 @@ public class CastingTableScreen extends HandledScreen<CastingTableScreenHandler>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawCenteredText(MatrixStack matrices, TextRenderer textRenderer, StringRenderable stringRenderable, int x, int y, int color) {
|
||||
drawStringWithShadow(matrices, textRenderer, stringRenderable.getString(), this.x + 5, y, color);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ import com.mojang.brigadier.suggestion.SuggestionsBuilder;
|
||||
import com.thebrokenrail.sorcerycraft.SorceryCraft;
|
||||
import com.thebrokenrail.sorcerycraft.spell.api.Spell;
|
||||
import com.thebrokenrail.sorcerycraft.spell.api.registry.SpellRegistry;
|
||||
import net.minecraft.server.command.CommandSource;
|
||||
import net.minecraft.command.CommandSource;
|
||||
import net.minecraft.server.command.ServerCommandSource;
|
||||
import net.minecraft.text.TranslatableText;
|
||||
import net.minecraft.util.Identifier;
|
||||
|
@ -8,7 +8,7 @@ import com.thebrokenrail.sorcerycraft.spell.api.Spell;
|
||||
import com.thebrokenrail.sorcerycraft.spell.api.registry.SpellRegistry;
|
||||
import com.thebrokenrail.sorcerycraft.spell.util.SpellHelper;
|
||||
import com.thebrokenrail.sorcerycraft.spell.util.SpellPlayerEntity;
|
||||
import net.minecraft.command.arguments.EntityArgumentType;
|
||||
import net.minecraft.command.argument.EntityArgumentType;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.server.command.CommandManager;
|
||||
|
@ -53,7 +53,7 @@ public class CastingTableScreenHandler extends ScreenHandler {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxStackAmount() {
|
||||
public int getMaxItemCount() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,24 @@
|
||||
package com.thebrokenrail.sorcerycraft.mixin;
|
||||
|
||||
import com.thebrokenrail.sorcerycraft.client.gui.CastingTableScreen;
|
||||
import net.minecraft.client.font.TextRenderer;
|
||||
import net.minecraft.client.gui.DrawableHelper;
|
||||
import net.minecraft.client.gui.widget.AbstractButtonWidget;
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.minecraft.text.Text;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
|
||||
@SuppressWarnings("ConstantConditions")
|
||||
@Mixin(AbstractButtonWidget.class)
|
||||
public class MixinAbstractButtonWidget {
|
||||
@Redirect(at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/widget/AbstractButtonWidget;drawCenteredText(Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/font/TextRenderer;Lnet/minecraft/text/Text;III)V"), method = "renderButton")
|
||||
public void drawCenteredText(MatrixStack matrices, TextRenderer textRenderer, Text text, int centerX, int y, int color) {
|
||||
if ((Object) this instanceof CastingTableScreen.WidgetButtonPage) {
|
||||
DrawableHelper.drawStringWithShadow(matrices, textRenderer, text.getString(), ((CastingTableScreen.WidgetButtonPage) (Object) this).x + 5, y, color);
|
||||
} else {
|
||||
DrawableHelper.drawCenteredText(matrices, textRenderer, text, centerX, y, color);
|
||||
}
|
||||
}
|
||||
}
|
@ -34,7 +34,7 @@ public class LightningSpell extends Spell {
|
||||
assert lightningEntity != null;
|
||||
lightningEntity.updatePosition(pos.x, pos.y, pos.z);
|
||||
if (attacker instanceof ServerPlayerEntity) {
|
||||
lightningEntity.setChanneller((ServerPlayerEntity) attacker);
|
||||
lightningEntity.setChanneler((ServerPlayerEntity) attacker);
|
||||
}
|
||||
serverWorld.spawnEntity(lightningEntity);
|
||||
}
|
||||
|
@ -3,8 +3,9 @@
|
||||
"package": "com.thebrokenrail.sorcerycraft.mixin",
|
||||
"compatibilityLevel": "JAVA_8",
|
||||
"client": [
|
||||
"MixinClientPlayerEntity",
|
||||
"MixinClientPlayNetworkHandler",
|
||||
"MixinClientPlayerEntity"
|
||||
"MixinAbstractButtonWidget"
|
||||
],
|
||||
"mixins": [
|
||||
"CriteriaRegistryHook",
|
||||
|
Reference in New Issue
Block a user