Skip to content

Commit

Permalink
Always Show Guides + LANG Update
Browse files Browse the repository at this point in the history
  • Loading branch information
hammy275 committed Jun 24, 2022
1 parent 489851c commit 91e03f1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public AbstractImmersive(int maxImmersives) {
* @param info Info instance that had a hitbox click
*/
public void onAnyRightClick(AbstractImmersiveInfo info) {
info.ticksSinceLastClick = 0;

}

public abstract void handleRightClick(AbstractImmersiveInfo info, PlayerEntity player, int closest,
Expand Down Expand Up @@ -126,7 +126,6 @@ protected void doTick(I info, boolean isInVR) {
info.changeTicksLeft(-1);
}
info.ticksActive++;
info.ticksSinceLastClick++;
}

// Below this line are utility functions. Everything above MUST be overwritten, and have super() called!
Expand All @@ -140,16 +139,14 @@ public void doRender(I info, MatrixStack stack, boolean isInVR) {
if (shouldRender(info, isInVR)) {
try {
render(info, stack, isInVR);
if (ActiveConfig.showPlacementGuide && info.ticksSinceLastClick > 100) {
if (ActiveConfig.showPlacementGuide) {
// Add from -1 because we're adding lengths, so we subtract one to have valid indexes
for (int i = 0; i < info.getInputSlots().length; i++) {
if (slotShouldRenderHelpHitbox(info, i)) {
AxisAlignedBB itemBox = info.getInputSlots()[i];
AxisAlignedBB toShow = itemBox
.move(0, itemBox.getYsize() / 2, 0);
renderItemGuide(stack, toShow,
Math.min(0.2f, (info.ticksSinceLastClick - 100) * 0.05f));
// Alpha value starts at 0.05f and climbs up to 0.2f
renderItemGuide(stack, toShow, 0.2f);
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/assets/immersivemc/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"config.immersivemc.right_click_chest.desc": "When enabled, the immersive chest is opened/closed through a right click, rather than a hand motion.",
"config.immersivemc.clear_table_on_unstackable": "Clear Crafting Tables On Tool Craft",
"config.immersivemc.clear_table_on_unstackable.desc": "When enabled, crafting tables are cleared when an unstackable item is crafted.",
"config.immersivemc.show_placement_guide": "Show Particles to Guide in ImmersiveMC",
"config.immersivemc.show_placement_guide.desc": "When enabled, uses blue particles to show where immersives can be interacted with."
"config.immersivemc.show_placement_guide": "Show Aqua Boxes to Guide in ImmersiveMC",
"config.immersivemc.show_placement_guide.desc": "When enabled, uses aqua-colored boxes to show where immersives can be interacted with."

}

0 comments on commit 91e03f1

Please sign in to comment.