Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Klemmbaustein committed Aug 26, 2024
2 parents 06d44a0 + b1c70df commit ef8fb25
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/client/java/com/luna/jetoverlay/client/HudOverlay.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class HudOverlay implements HudRenderCallback {
@Override
public void onHudRender(GuiGraphics drawContext, float tickDelta) {
if (JetOverlayClient.shouldRenderOutline) {
drawContext.blit(leftElement, 0, 90, 0, 0, 0,8 ,200 , 8, 200);
// drawContext.blit(leftElement, 0, 90, 0, 0, 0,8 ,200 , 8, 200);
}
}
}
14 changes: 7 additions & 7 deletions src/client/java/com/luna/jetoverlay/client/JetOverlayHud.java
Original file line number Diff line number Diff line change
Expand Up @@ -126,13 +126,13 @@ private void renderOverlay(GuiGraphics __drawContext, float __tickDelta) {
@Override
public void onHudRender(GuiGraphics __drawContext, float __tickDelta) {

CameraRotationDirection rotationDirection = detectCameraRotation(Minecraft.getInstance().gameRenderer.getMainCamera());
if (rotationDirection == CameraRotationDirection.LEFT || rotationDirection == CameraRotationDirection.RIGHT) {
__drawContext.drawString(Minecraft.getInstance().font, rotationDirection.toString(), 0, 10, 0x00FF00);
}
if (rotationDirection == CameraRotationDirection.DOWN || rotationDirection == CameraRotationDirection.UP) {
__drawContext.drawString(Minecraft.getInstance().font, rotationDirection.toString(), 0, 20, 0x00FF00);
}
// CameraRotationDirection rotationDirection = detectCameraRotation(Minecraft.getInstance().gameRenderer.getMainCamera());
// if (rotationDirection == CameraRotationDirection.LEFT || rotationDirection == CameraRotationDirection.RIGHT) {
// __drawContext.drawString(Minecraft.getInstance().font, rotationDirection.toString(), 0, 10, 0x00FF00);
// }
// if (rotationDirection == CameraRotationDirection.DOWN || rotationDirection == CameraRotationDirection.UP) {
// __drawContext.drawString(Minecraft.getInstance().font, rotationDirection.toString(), 0, 20, 0x00FF00);
// }

if (JetOverlayClient.shouldRenderOutline) {
renderOverlay(__drawContext, __tickDelta);
Expand Down
5 changes: 4 additions & 1 deletion src/main/java/com/luna/jetoverlay/ModItems.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,16 @@
import net.minecraft.core.Registry;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.flag.FeatureFlags;
import net.minecraft.world.item.*;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.entity.BlockEntityType;

public class ModItems {

public static final Item JET_GOGGLES = registerItem(new ArmorItem(JetGoggles.INSTANCE, ArmorItem.Type.HELMET, new Item.Properties()), "jet_goggles");
public static final Item JET_GOGGLES = registerItem(new ArmorItem(JetGoggles.INSTANCE, ArmorItem.Type.HELMET,
new Item.Properties().requiredFeatures(FeatureFlags.VANILLA)),
"jet_goggles");
public static final Block JET_GOGGLES_RECEIVER = Registry.register(
BuiltInRegistries.BLOCK,
new ResourceLocation("jetoverlay", "redstoneoutputter"),
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/luna/jetoverlay/armor/JetGoggles.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public int getDurabilityForType(ArmorItem.Type type) {

@Override
public int getDefenseForType(ArmorItem.Type type) {
return 0;
return 1;
}

@Override
Expand Down

0 comments on commit ef8fb25

Please sign in to comment.