Skip to content

Commit

Permalink
Update to 1.21
Browse files Browse the repository at this point in the history
  • Loading branch information
coltonk9043 committed Jun 14, 2024
1 parent ac013c5 commit 79a0528
Show file tree
Hide file tree
Showing 27 changed files with 271 additions and 313 deletions.
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ org.gradle.parallel=true

# Fabric Properties
# check these on https://fabricmc.net/develop
minecraft_version=1.20.6
yarn_mappings=1.20.6+build.1
minecraft_version=1.21
yarn_mappings=1.21+build.1
loader_version=0.15.11

# Mod Properties
Expand All @@ -14,4 +14,4 @@ maven_group=net.aoba
archives_base_name=Aoba

# Dependencies
fabric_version=0.97.8+1.20.6
fabric_version=0.100.1+1.21
4 changes: 2 additions & 2 deletions src/main/java/net/aoba/cmd/commands/CmdXRay.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public void runCommand(String[] parameters) throws InvalidSyntaxException {
String block1 = parameters[2].toLowerCase();
Block tempBlock1;
try {
tempBlock1 = Registries.BLOCK.get(new Identifier(block1));
tempBlock1 = Registries.BLOCK.get(Identifier.of(block1));
} catch (InvalidIdentifierException e) {
CommandManager.sendChatMessage("Block " + parameters[2] + " could not be found.");
return;
Expand All @@ -76,7 +76,7 @@ public void runCommand(String[] parameters) throws InvalidSyntaxException {
String block2 = parameters[2].toLowerCase();
Block tempBlock2;
try {
tempBlock2 = Registries.BLOCK.get(new Identifier(block2));
tempBlock2 = Registries.BLOCK.get(Identifier.of(block2));
} catch (InvalidIdentifierException e) {
CommandManager.sendChatMessage("Block " + parameters[2] + " could not be found.");
return;
Expand Down
13 changes: 0 additions & 13 deletions src/main/java/net/aoba/gui/GuiManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -217,19 +217,6 @@ public void OnUpdate(TickEvent event) {
this.toggleMouse();
}
}

/**
* Updates the Color.
* TODO: Remove this and move to event-based.
*/
//if(this.rainbow.getValue()) {
// rainbowColor.update(this.effectSpeed.getValue().floatValue());
// this.currentColor = rainbowColor.getColor();
//}else {
// this.currentColor = foregroundColor.getValue();
//}

//Aoba.getInstance().eventManager.Fire(new MouseScrollEvent(5.0f, 5.0f));
}

public void draw(DrawContext drawContext, float tickDelta) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/aoba/gui/font/FontManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public boolean accept(File dir, String name) {
e.printStackTrace();
}

try (FontStorage storage = new FontStorage(MC.getTextureManager(), new Identifier("aoba:" + file.getName()))) {
try (FontStorage storage = new FontStorage(MC.getTextureManager(), Identifier.of("aoba:" + file.getName()))) {
storage.setFonts(list, Set.of());
fontRenderers.put(file.getName().replace(".ttf", ""), new TextRenderer(id -> storage, true));
}
Expand Down
7 changes: 0 additions & 7 deletions src/main/java/net/aoba/gui/screens/DirectLoginAltScreen.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,6 @@ public void init() {
.dimensions(this.width / 2 - 100, this.height / 2 + 46, 200, 20).build());
}

@Override
public void tick() {
// TODO:
// this.textFieldAltUsername.tick();
//this.textFieldAltPassword.tick();
}

private void onButtonLoginPressed() {
boolean loggedIn = false;
if(this.textFieldAltPassword.getText().isEmpty()) {
Expand Down
7 changes: 0 additions & 7 deletions src/main/java/net/aoba/gui/screens/EditAltScreen.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,6 @@ public void init() {
.dimensions(this.width / 2 - 100, this.height / 2 + 46, 200, 20).build());
}

@Override
public void tick() {
// TODO:
//this.textFieldAltUsername.tick();
//this.textFieldAltPassword.tick();
}

@Override
public void render(DrawContext drawContext, int mouseX, int mouseY, float partialTicks) {
this.renderBackground(drawContext, mouseX, mouseY, partialTicks);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/aoba/gui/tabs/ClickGuiTab.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public ClickGuiTab(String title, int x, int y, boolean pinnable, String iconName

isPinned = new BooleanSetting(title + "_pinned", "IS PINNED", false);
SettingManager.registerSetting(isPinned, Aoba.getInstance().settingManager.hidden_category);
icon = new Identifier("aoba", "/textures/" + iconName.trim().toLowerCase() + ".png");
icon = Identifier.of("aoba", "/textures/" + iconName.trim().toLowerCase() + ".png");
}

public final String getTitle() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public class ModuleComponent extends Component implements LeftMouseDownListener
public ModuleComponent(String text, IGuiElement parent, Module module) {
super(parent);

gear = new Identifier("aoba", "/textures/gear.png");
gear = Identifier.of("aoba", "/textures/gear.png");
this.text = text;
this.module = module;

Expand Down
5 changes: 3 additions & 2 deletions src/main/java/net/aoba/misc/FakePlayerEntity.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,10 @@ public class FakePlayerEntity extends AbstractClientPlayerEntity {
public FakePlayerEntity() {
super(MinecraftClient.getInstance().world, MinecraftClient.getInstance().player.getGameProfile());
ClientPlayerEntity player = MinecraftClient.getInstance().player;

float tickDelta = MinecraftClient.getInstance().getRenderTickCounter().getTickDelta(false);
this.setPos(player.getPos().x, player.getPos().y, player.getPos().z);
this.setRotation(player.getYaw(MinecraftClient.getInstance().getTickDelta()),
player.getPitch(MinecraftClient.getInstance().getTickDelta()));
this.setRotation(player.getYaw(tickDelta), player.getPitch(tickDelta));
//this.inventory = player.getInventory();
}

Expand Down
Loading

0 comments on commit 79a0528

Please sign in to comment.