-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
+ 完善了浸液系统 * 将游戏触发器添加到注册表内 * 优化项目结构
- Loading branch information
Showing
47 changed files
with
993 additions
and
241 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
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
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
38 changes: 38 additions & 0 deletions
38
src/main/java/com/github/winexp/battlegrounds/client/gui/screen/SoakScreen.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,38 @@ | ||
package com.github.winexp.battlegrounds.client.gui.screen; | ||
|
||
import com.github.winexp.battlegrounds.screen.SoakTableScreenHandler; | ||
import net.fabricmc.api.EnvType; | ||
import net.fabricmc.api.Environment; | ||
import net.minecraft.client.gui.DrawContext; | ||
import net.minecraft.client.gui.screen.ingame.HandledScreen; | ||
import net.minecraft.entity.player.PlayerInventory; | ||
import net.minecraft.text.Text; | ||
import net.minecraft.util.Identifier; | ||
|
||
@Environment(EnvType.CLIENT) | ||
public class SoakScreen extends HandledScreen<SoakTableScreenHandler> { | ||
private static final Identifier TEXTURE = new Identifier("textures/gui/container/brewing_stand.png"); | ||
|
||
public SoakScreen(SoakTableScreenHandler handler, PlayerInventory inventory, Text title) { | ||
super(handler, inventory, title); | ||
} | ||
|
||
@Override | ||
protected void init() { | ||
super.init(); | ||
this.titleX = (this.backgroundWidth - this.textRenderer.getWidth(this.title)) / 2; | ||
} | ||
|
||
@Override | ||
public void render(DrawContext context, int mouseX, int mouseY, float delta) { | ||
super.render(context, mouseX, mouseY, delta); | ||
this.drawMouseoverTooltip(context, mouseX, mouseY); | ||
} | ||
|
||
@Override | ||
protected void drawBackground(DrawContext context, float delta, int mouseX, int mouseY) { | ||
int i = (this.width - this.backgroundWidth) / 2; | ||
int j = (this.height - this.backgroundHeight) / 2; | ||
context.drawTexture(TEXTURE, i, j, 0, 0, this.backgroundWidth, this.backgroundHeight); | ||
} | ||
} |
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
Oops, something went wrong.