Skip to content

Commit

Permalink
Fix some Java compile warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaming32 committed Jun 30, 2023
1 parent f278383 commit 0b543f7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ public abstract class GameRendererMixin implements GameRendererExt {
method = {"getFov", "bobViewWhenHurt"},
at = @At(
value = "INVOKE",
target = "Ljava/lang/Math;min(FF)F"
target = "Ljava/lang/Math;min(FF)F",
remap = false
)
)
private float noDeathEffects(float a, float b, Operation<Float> original) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ private RenderShape fixSpecialHiddenCrash(BlockState blockState, Operation<Rende
method = "<clinit>",
at = @At(
value = "INVOKE",
target = "Lcom/google/common/collect/ImmutableList;of(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Lcom/google/common/collect/ImmutableList;"
target = "Lcom/google/common/collect/ImmutableList;of(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Lcom/google/common/collect/ImmutableList;",
remap = false
)
)
private static ImmutableList<?> addCustomRenderType(
Expand Down
4 changes: 1 addition & 3 deletions src/main/java/com/fusionflux/portalcubed/util/NbtHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import net.minecraft.core.BlockPos;
import net.minecraft.nbt.*;
import net.minecraft.world.phys.Vec3;

import org.jetbrains.annotations.Nullable;
import org.joml.Quaternionf;

Expand Down Expand Up @@ -62,8 +61,7 @@ public static <T extends Enum<T>> T readEnum(CompoundTag tag, String key, T fall
if (!tag.contains(key, Tag.TAG_STRING))
return fallback;
String name = tag.getString(key);
//noinspection unchecked
Class<T> clazz = (Class<T>) fallback.getClass();
@SuppressWarnings("unchecked") Class<T> clazz = (Class<T>) fallback.getClass();
for (T entry : clazz.getEnumConstants()) {
if (entry.name().equals(name))
return entry;
Expand Down

0 comments on commit 0b543f7

Please sign in to comment.