Skip to content

Commit

Permalink
fixed rei issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Globox1997 committed Jan 11, 2024
1 parent 703581b commit d12e3e3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 65 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
- Added spawner mob xp config option
### Fixed:
- Fixed armor switching
- Fixed rei tooltip issue
### Changed:
-
65 changes: 0 additions & 65 deletions src/main/java/net/levelz/compat/LevelzReiPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,69 +29,4 @@ public void registerDisplays(DisplayRegistry registry) {
registry.add(new DefaultBrewingDisplay(EntryIngredients.of(Items.DRAGON_BREATH), EntryIngredients.of(Items.NETHER_STAR), EntryStacks.of(new ItemStack(ItemInit.STRANGE_POTION))));
}

@Override
public void registerScreens(ScreenRegistry registry) {
registry.registerDecider(new DisplayBoundsProvider<SkillScreen>() {

@Override
public <R extends Screen> ActionResult shouldScreenBeOverlaid(R screen) {
return ActionResult.SUCCESS;
}

@Override
public @Nullable Rectangle getScreenBounds(SkillScreen screen) {
return new Rectangle(screen.width / 2 - (screen.getWidth() / 2), screen.height / 2 - (screen.getHeight() / 2), screen.getWidth(), screen.getHeight());
}

@Override
public <R extends Screen> boolean isHandingScreen(Class<R> screen) {
if (screen.equals(SkillScreen.class))
return true;
return false;
}

});

registry.registerDecider(new DisplayBoundsProvider<SkillInfoScreen>() {

@Override
public <R extends Screen> ActionResult shouldScreenBeOverlaid(R screen) {
return ActionResult.SUCCESS;
}

@Override
public @Nullable Rectangle getScreenBounds(SkillInfoScreen screen) {
return new Rectangle(screen.width / 2 - (screen.getWidth() / 2), screen.height / 2 - (screen.getHeight() / 2), screen.getWidth(), screen.getHeight());
}

@Override
public <R extends Screen> boolean isHandingScreen(Class<R> screen) {
if (screen.equals(SkillInfoScreen.class))
return true;
return false;
}

});

registry.registerDecider(new DisplayBoundsProvider<SkillListScreen>() {

@Override
public <R extends Screen> ActionResult shouldScreenBeOverlaid(R screen) {
return ActionResult.SUCCESS;
}

@Override
public @Nullable Rectangle getScreenBounds(SkillListScreen screen) {
return new Rectangle(screen.width / 2 - (screen.getWidth() / 2), screen.height / 2 - (screen.getHeight() / 2), screen.getWidth(), screen.getHeight());
}

@Override
public <R extends Screen> boolean isHandingScreen(Class<R> screen) {
if (screen.equals(SkillListScreen.class))
return true;
return false;
}

});
}
}

0 comments on commit d12e3e3

Please sign in to comment.