From cad5ce7f5866d488fc3a0e97a7f249073e0011a8 Mon Sep 17 00:00:00 2001 From: AzureZhen <7415711+AzureDoom@users.noreply.github.com> Date: Mon, 5 Sep 2022 14:11:02 -0400 Subject: [PATCH] v3.1.18 --- changelog.txt | 5 +++-- core | 2 +- gradle.properties | 2 +- src/main/java/software/bernie/example/ClientListener.java | 2 -- .../example/client/model/entity/ExampleEntityModel.java | 1 - .../example/client/model/entity/ReplacedCreeperModel.java | 1 - .../bernie/example/client/renderer/entity/LERenderer.java | 1 - .../client/renderer/entity/ReplacedCreeperRenderer.java | 1 - .../client/renderer/entity/layer/GeoExampleLayer.java | 3 --- .../software/bernie/example/entity/GeoExampleEntity.java | 1 - .../java/software/bernie/example/item/JackInTheBoxItem.java | 4 ---- src/main/java/software/bernie/example/item/PistolItem.java | 1 - .../java/software/bernie/example/item/PotatoArmorItem.java | 1 - .../bernie/example/registry/EntityRegistryBuilder.java | 1 - .../software/bernie/geckolib3/compat/PatchouliCompat.java | 1 - .../software/bernie/geckolib3/file/AnimationFileLoader.java | 1 - .../geckolib3/mixins/fabric/MixinArmorFeatureRenderer.java | 2 -- .../software/bernie/geckolib3/model/AnimatedGeoModel.java | 5 ----- .../bernie/geckolib3/model/AnimatedTickingGeoModel.java | 1 - .../geckolib3/renderers/geo/ExtendedGeoEntityRenderer.java | 1 - .../bernie/geckolib3/renderers/geo/GeoArmorRenderer.java | 1 - .../bernie/geckolib3/renderers/geo/GeoBlockRenderer.java | 1 - .../bernie/geckolib3/renderers/geo/GeoEntityRenderer.java | 2 -- .../bernie/geckolib3/renderers/geo/GeoItemRenderer.java | 1 - .../bernie/geckolib3/renderers/geo/GeoLayerRenderer.java | 1 - .../geckolib3/renderers/geo/GeoProjectilesRenderer.java | 1 - .../geckolib3/renderers/geo/GeoReplacedEntityRenderer.java | 2 -- .../bernie/geckolib3/renderers/geo/IGeoRenderer.java | 1 - .../java/software/bernie/geckolib3/util/AnimationUtils.java | 2 -- .../java/software/bernie/geckolib3/util/GeckoLibUtil.java | 2 -- .../bernie/geckolib3/util/json/JsonAnimationUtils.java | 6 ------ .../bernie/geckolib3/util/json/JsonKeyFrameUtils.java | 2 -- 32 files changed, 5 insertions(+), 54 deletions(-) diff --git a/changelog.txt b/changelog.txt index c4fc8c53f..9b7971070 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,4 @@ -3.1.17 +3.1.18 -- Fixed Extended Entity Render of armor - DerToaster \ No newline at end of file +- Cleaned up Habitat placment check and proper placement. +- Code Clean up \ No newline at end of file diff --git a/core b/core index 18004fb80..a37122fe2 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit 18004fb80514fbc8859cd7fde37b030cbae94227 +Subproject commit a37122fe23868aba1aabbea01744bf47f85af796 diff --git a/gradle.properties b/gradle.properties index 63e007848..5699a98fd 100644 --- a/gradle.properties +++ b/gradle.properties @@ -11,7 +11,7 @@ loader_version=0.14.9 fabric_version=0.60.0+1.19.2 # Mod Properties -mod_version=3.1.17 +mod_version=3.1.18 maven_group=software.bernie.geckolib archives_base_name=geckolib-fabric-1.19 repsyUrl=https://repo.repsy.io/mvn/gandiber/geckolib \ No newline at end of file diff --git a/src/main/java/software/bernie/example/ClientListener.java b/src/main/java/software/bernie/example/ClientListener.java index cef6f5e54..911f8aa5c 100644 --- a/src/main/java/software/bernie/example/ClientListener.java +++ b/src/main/java/software/bernie/example/ClientListener.java @@ -49,7 +49,6 @@ public class ClientListener implements ClientModInitializer { - @SuppressWarnings({ "unchecked" }) @Override public void onInitializeClient() { if (FabricLoader.getInstance().isDevelopmentEnvironment() && !GeckoLibMod.DISABLE_IN_DEV) { @@ -89,7 +88,6 @@ public static void onPacket(MinecraftClient context, PacketByteBuf byteBuf) { float pitch = (byteBuf.readByte() * 360) / 256.0F; float yaw = (byteBuf.readByte() * 360) / 256.0F; context.execute(() -> { - @SuppressWarnings("resource") ClientWorld world = MinecraftClient.getInstance().world; Entity entity = type.create(world); if (entity != null) { diff --git a/src/main/java/software/bernie/example/client/model/entity/ExampleEntityModel.java b/src/main/java/software/bernie/example/client/model/entity/ExampleEntityModel.java index 167d9b0e0..1c3573e0d 100644 --- a/src/main/java/software/bernie/example/client/model/entity/ExampleEntityModel.java +++ b/src/main/java/software/bernie/example/client/model/entity/ExampleEntityModel.java @@ -24,7 +24,6 @@ public Identifier getTextureResource(GeoExampleEntity entity) { return new Identifier(GeckoLib.ModID, "textures/model/entity/bat.png"); } - @SuppressWarnings({ "unchecked", "rawtypes" }) @Override public void setLivingAnimations(GeoExampleEntity entity, Integer uniqueID, AnimationEvent customPredicate) { super.setLivingAnimations(entity, uniqueID, customPredicate); diff --git a/src/main/java/software/bernie/example/client/model/entity/ReplacedCreeperModel.java b/src/main/java/software/bernie/example/client/model/entity/ReplacedCreeperModel.java index ef88c3818..261084ae4 100644 --- a/src/main/java/software/bernie/example/client/model/entity/ReplacedCreeperModel.java +++ b/src/main/java/software/bernie/example/client/model/entity/ReplacedCreeperModel.java @@ -4,7 +4,6 @@ import software.bernie.geckolib3.GeckoLib; import software.bernie.geckolib3.model.AnimatedGeoModel; -@SuppressWarnings("rawtypes") public class ReplacedCreeperModel extends AnimatedGeoModel { @Override public Identifier getModelResource(Object object) { diff --git a/src/main/java/software/bernie/example/client/renderer/entity/LERenderer.java b/src/main/java/software/bernie/example/client/renderer/entity/LERenderer.java index db45da330..ad187d338 100644 --- a/src/main/java/software/bernie/example/client/renderer/entity/LERenderer.java +++ b/src/main/java/software/bernie/example/client/renderer/entity/LERenderer.java @@ -8,7 +8,6 @@ public class LERenderer extends GeoEntityRenderer { - @SuppressWarnings("unchecked") public LERenderer(EntityRendererFactory.Context renderManager) { super(renderManager, new LEModel()); this.addLayer(new GeoExampleLayer(this)); diff --git a/src/main/java/software/bernie/example/client/renderer/entity/ReplacedCreeperRenderer.java b/src/main/java/software/bernie/example/client/renderer/entity/ReplacedCreeperRenderer.java index 3b31f880b..4e7be5338 100644 --- a/src/main/java/software/bernie/example/client/renderer/entity/ReplacedCreeperRenderer.java +++ b/src/main/java/software/bernie/example/client/renderer/entity/ReplacedCreeperRenderer.java @@ -11,7 +11,6 @@ public class ReplacedCreeperRenderer extends GeoReplacedEntityRenderer { - @SuppressWarnings("unchecked") public ReplacedCreeperRenderer(EntityRendererFactory.Context ctx) { super(ctx, new ReplacedCreeperModel(), new ReplacedCreeperEntity()); GeoReplacedEntityRenderer.registerReplacedEntity(ReplacedCreeperEntity.class, this); diff --git a/src/main/java/software/bernie/example/client/renderer/entity/layer/GeoExampleLayer.java b/src/main/java/software/bernie/example/client/renderer/entity/layer/GeoExampleLayer.java index 66f4e992e..30ebf43cf 100644 --- a/src/main/java/software/bernie/example/client/renderer/entity/layer/GeoExampleLayer.java +++ b/src/main/java/software/bernie/example/client/renderer/entity/layer/GeoExampleLayer.java @@ -10,19 +10,16 @@ import software.bernie.geckolib3.renderers.geo.GeoLayerRenderer; import software.bernie.geckolib3.renderers.geo.IGeoRenderer; -@SuppressWarnings("rawtypes") public class GeoExampleLayer extends GeoLayerRenderer { // A resource location for the texture of the layer. This will be applied onto pre-existing cubes on the model private static final Identifier LAYER = new Identifier(GeckoLib.ModID, "textures/entity/le_glasses.png"); // A resource location for the model of the entity. This model is put on top of the normal one, which is then given the texture private static final Identifier MODEL = new Identifier(GeckoLib.ModID, "geo/le.geo.json"); - @SuppressWarnings("unchecked") public GeoExampleLayer(IGeoRenderer entityRendererIn) { super(entityRendererIn); } - @SuppressWarnings("unchecked") @Override public void render(MatrixStack matrixStackIn, VertexConsumerProvider bufferIn, int packedLightIn, Entity entityLivingBaseIn, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch) { RenderLayer cameo = RenderLayer.getArmorCutoutNoCull(LAYER); diff --git a/src/main/java/software/bernie/example/entity/GeoExampleEntity.java b/src/main/java/software/bernie/example/entity/GeoExampleEntity.java index e085d5bce..6ff56769b 100644 --- a/src/main/java/software/bernie/example/entity/GeoExampleEntity.java +++ b/src/main/java/software/bernie/example/entity/GeoExampleEntity.java @@ -55,7 +55,6 @@ public void registerControllers(AnimationData data) { data.addAnimationController(controller); } - @SuppressWarnings("resource") private void customListener(CustomInstructionKeyframeEvent event) { final ClientPlayerEntity player = MinecraftClient.getInstance().player; if (player != null) { diff --git a/src/main/java/software/bernie/example/item/JackInTheBoxItem.java b/src/main/java/software/bernie/example/item/JackInTheBoxItem.java index 5258e2b73..65ae5cd1c 100644 --- a/src/main/java/software/bernie/example/item/JackInTheBoxItem.java +++ b/src/main/java/software/bernie/example/item/JackInTheBoxItem.java @@ -41,7 +41,6 @@ private

PlayState predicate(AnimationEvent

eve @Override public void registerControllers(AnimationData data) { - @SuppressWarnings({ "unchecked", "rawtypes" }) AnimationController controller = new AnimationController(this, controllerName, 20, this::predicate); @@ -54,7 +53,6 @@ public void registerControllers(AnimationData data) { data.addAnimationController(controller); } - @SuppressWarnings("resource") private void soundListener(SoundKeyframeEvent event) { // The animation for the jackinthebox has a sound keyframe at time 0:00. // As soon as that keyframe gets hit this method fires and it starts playing the @@ -82,13 +80,11 @@ public TypedActionResult use(World world, PlayerEntity user, Hand han return super.use(world, user, hand); } - @SuppressWarnings("resource") @Override public void onAnimationSync(int id, int state) { if (state == ANIM_OPEN) { // Always use GeckoLibUtil to get AnimationControllers when you don't have // access to an AnimationEvent - @SuppressWarnings("rawtypes") final AnimationController controller = GeckoLibUtil.getControllerForID(this.factory, id, controllerName); if (controller.getAnimationState() == AnimationState.Stopped) { diff --git a/src/main/java/software/bernie/example/item/PistolItem.java b/src/main/java/software/bernie/example/item/PistolItem.java index d997a8702..a499e7bf8 100644 --- a/src/main/java/software/bernie/example/item/PistolItem.java +++ b/src/main/java/software/bernie/example/item/PistolItem.java @@ -99,7 +99,6 @@ public

PlayState predicate(AnimationEvent

even return PlayState.CONTINUE; } - @SuppressWarnings({ "unchecked", "rawtypes" }) @Override public void registerControllers(AnimationData data) { data.addAnimationController(new AnimationController(this, controllerName, 1, this::predicate)); diff --git a/src/main/java/software/bernie/example/item/PotatoArmorItem.java b/src/main/java/software/bernie/example/item/PotatoArmorItem.java index 4fb3dc194..443967785 100644 --- a/src/main/java/software/bernie/example/item/PotatoArmorItem.java +++ b/src/main/java/software/bernie/example/item/PotatoArmorItem.java @@ -63,7 +63,6 @@ private

PlayState predicate(AnimationEvent

event) { // All you need to do here is add your animation controllers to the // AnimationData - @SuppressWarnings({ "rawtypes", "unchecked" }) @Override public void registerControllers(AnimationData data) { data.addAnimationController(new AnimationController(this, "controller", 20, this::predicate)); diff --git a/src/main/java/software/bernie/example/registry/EntityRegistryBuilder.java b/src/main/java/software/bernie/example/registry/EntityRegistryBuilder.java index df1adf16f..1ab5486d1 100644 --- a/src/main/java/software/bernie/example/registry/EntityRegistryBuilder.java +++ b/src/main/java/software/bernie/example/registry/EntityRegistryBuilder.java @@ -78,7 +78,6 @@ public EntityRegistryBuilder dimensions(EntityDimensions size) { return this; } - @SuppressWarnings({ "unchecked" }) public EntityType build() { EntityType.Builder entityBuilder = EntityType.Builder.create(this.entityFactory, this.category) .setDimensions(this.dimensions.width, this.dimensions.height); diff --git a/src/main/java/software/bernie/geckolib3/compat/PatchouliCompat.java b/src/main/java/software/bernie/geckolib3/compat/PatchouliCompat.java index 42b457286..0d6e5c8bd 100644 --- a/src/main/java/software/bernie/geckolib3/compat/PatchouliCompat.java +++ b/src/main/java/software/bernie/geckolib3/compat/PatchouliCompat.java @@ -10,7 +10,6 @@ public class PatchouliCompat { - @SuppressWarnings({ "resource", "unlikely-arg-type" }) public static void patchouliLoaded(MatrixStack matrixStackIn) { Class patchouli = GuiBook.class; boolean screen = MinecraftClient.getInstance().inGameHud.equals(patchouli); diff --git a/src/main/java/software/bernie/geckolib3/file/AnimationFileLoader.java b/src/main/java/software/bernie/geckolib3/file/AnimationFileLoader.java index a9c06c513..de71e1cd2 100644 --- a/src/main/java/software/bernie/geckolib3/file/AnimationFileLoader.java +++ b/src/main/java/software/bernie/geckolib3/file/AnimationFileLoader.java @@ -48,7 +48,6 @@ private JsonObject loadFile(Identifier location, ResourceManager manager) { return JsonHelper.deserialize(GSON, content, JsonObject.class); } - @SuppressWarnings("deprecation") public static String getResourceAsString(Identifier location, ResourceManager manager) { try (InputStream inputStream = manager.getResourceOrThrow(location).getInputStream()) { return IOUtils.toString(inputStream); diff --git a/src/main/java/software/bernie/geckolib3/mixins/fabric/MixinArmorFeatureRenderer.java b/src/main/java/software/bernie/geckolib3/mixins/fabric/MixinArmorFeatureRenderer.java index 58137473e..dc53c953b 100644 --- a/src/main/java/software/bernie/geckolib3/mixins/fabric/MixinArmorFeatureRenderer.java +++ b/src/main/java/software/bernie/geckolib3/mixins/fabric/MixinArmorFeatureRenderer.java @@ -28,7 +28,6 @@ import net.minecraft.util.Identifier; import software.bernie.geckolib3.ArmorRenderingRegistryImpl; -@SuppressWarnings("rawtypes") @Mixin({ ArmorFeatureRenderer.class }) @Environment(EnvType.CLIENT) public abstract class MixinArmorFeatureRenderer extends FeatureRenderer { @@ -40,7 +39,6 @@ public abstract class MixinArmorFeatureRenderer extends FeatureRenderer { @Unique private EquipmentSlot gl_storedSlot; - @SuppressWarnings({ "unchecked" }) public MixinArmorFeatureRenderer(FeatureRendererContext context) { super(context); } diff --git a/src/main/java/software/bernie/geckolib3/model/AnimatedGeoModel.java b/src/main/java/software/bernie/geckolib3/model/AnimatedGeoModel.java index 784b4ff02..8fa5f6deb 100644 --- a/src/main/java/software/bernie/geckolib3/model/AnimatedGeoModel.java +++ b/src/main/java/software/bernie/geckolib3/model/AnimatedGeoModel.java @@ -29,11 +29,9 @@ public abstract class AnimatedGeoModel extends GeoModelProvider implements IAnimatableModel, IAnimatableModelProvider { - @SuppressWarnings("rawtypes") private final AnimationProcessor animationProcessor; private GeoModel currentModel; - @SuppressWarnings("rawtypes") protected AnimatedGeoModel() { this.animationProcessor = new AnimationProcessor(this); } @@ -46,7 +44,6 @@ public void registerBone(GeoBone bone) { } } - @SuppressWarnings({ "rawtypes", "unchecked" }) @Override public void setLivingAnimations(T entity, Integer uniqueID, AnimationEvent customPredicate) { // Each animation has it's own collection of animations (called the @@ -78,7 +75,6 @@ public void setLivingAnimations(T entity, Integer uniqueID, AnimationEvent custo } } - @SuppressWarnings("rawtypes") @Override public AnimationProcessor getAnimationProcessor() { return this.animationProcessor; @@ -88,7 +84,6 @@ public void registerModelRenderer(IBone modelRenderer) { animationProcessor.registerModelRenderer(modelRenderer); } - @SuppressWarnings("unchecked") @Override public Animation getAnimation(String name, IAnimatable animatable) { AnimationFile animation = GeckoLibCache.getInstance().getAnimations() diff --git a/src/main/java/software/bernie/geckolib3/model/AnimatedTickingGeoModel.java b/src/main/java/software/bernie/geckolib3/model/AnimatedTickingGeoModel.java index c345d0fb0..8c6b7f79b 100644 --- a/src/main/java/software/bernie/geckolib3/model/AnimatedTickingGeoModel.java +++ b/src/main/java/software/bernie/geckolib3/model/AnimatedTickingGeoModel.java @@ -19,7 +19,6 @@ public boolean isInitialized() { return !this.getAnimationProcessor().getModelRendererList().isEmpty(); } - @SuppressWarnings({ "rawtypes", "unchecked" }) @Override public void setLivingAnimations(T entity, Integer uniqueID, @Nullable AnimationEvent customPredicate) { // Each animation has it's own collection of animations (called the diff --git a/src/main/java/software/bernie/geckolib3/renderers/geo/ExtendedGeoEntityRenderer.java b/src/main/java/software/bernie/geckolib3/renderers/geo/ExtendedGeoEntityRenderer.java index 44249ff34..4d54bd5d8 100644 --- a/src/main/java/software/bernie/geckolib3/renderers/geo/ExtendedGeoEntityRenderer.java +++ b/src/main/java/software/bernie/geckolib3/renderers/geo/ExtendedGeoEntityRenderer.java @@ -243,7 +243,6 @@ protected void moveAndRotateMatrixToMatchBone(MatrixStack stack, GeoBone bone) { stack.multiply(Vec3f.POSITIVE_Z.getDegreesQuaternion(bone.getRotationZ())); } - @SuppressWarnings("unchecked") protected void handleArmorRenderingForBone(GeoBone bone, MatrixStack stack, VertexConsumer bufferIn, int packedLightIn, int packedOverlayIn, Identifier currentTexture) { final ItemStack armorForBone = this.getArmorForBone(bone.getName(), currentEntityBeingRendered); diff --git a/src/main/java/software/bernie/geckolib3/renderers/geo/GeoArmorRenderer.java b/src/main/java/software/bernie/geckolib3/renderers/geo/GeoArmorRenderer.java index ae158aee6..150eef5de 100644 --- a/src/main/java/software/bernie/geckolib3/renderers/geo/GeoArmorRenderer.java +++ b/src/main/java/software/bernie/geckolib3/renderers/geo/GeoArmorRenderer.java @@ -31,7 +31,6 @@ import software.bernie.geckolib3.model.AnimatedGeoModel; import software.bernie.geckolib3.util.GeoUtils; -@SuppressWarnings({ "rawtypes", "unchecked" }) public class GeoArmorRenderer implements IGeoRenderer, ArmorRenderer { public static final Map, GeoArmorRenderer> renderers = new ConcurrentHashMap<>(); diff --git a/src/main/java/software/bernie/geckolib3/renderers/geo/GeoBlockRenderer.java b/src/main/java/software/bernie/geckolib3/renderers/geo/GeoBlockRenderer.java index ef2578234..21bcf779a 100644 --- a/src/main/java/software/bernie/geckolib3/renderers/geo/GeoBlockRenderer.java +++ b/src/main/java/software/bernie/geckolib3/renderers/geo/GeoBlockRenderer.java @@ -20,7 +20,6 @@ import software.bernie.geckolib3.geo.render.built.GeoModel; import software.bernie.geckolib3.model.AnimatedGeoModel; -@SuppressWarnings({ "rawtypes", "unchecked" }) public abstract class GeoBlockRenderer implements IGeoRenderer, BlockEntityRenderer { static { diff --git a/src/main/java/software/bernie/geckolib3/renderers/geo/GeoEntityRenderer.java b/src/main/java/software/bernie/geckolib3/renderers/geo/GeoEntityRenderer.java index c78795d47..57492d91f 100644 --- a/src/main/java/software/bernie/geckolib3/renderers/geo/GeoEntityRenderer.java +++ b/src/main/java/software/bernie/geckolib3/renderers/geo/GeoEntityRenderer.java @@ -50,7 +50,6 @@ import software.bernie.geckolib3.util.AnimationUtils; import software.bernie.geckolib3.util.RenderUtils; -@SuppressWarnings("unchecked") public abstract class GeoEntityRenderer extends EntityRenderer implements IGeoRenderer { static { @@ -99,7 +98,6 @@ private static float getFacingAngle(Direction facingIn) { } } - @SuppressWarnings("resource") @Override public void render(T entity, float entityYaw, float partialTicks, MatrixStack stack, VertexConsumerProvider bufferIn, int packedLightIn) { diff --git a/src/main/java/software/bernie/geckolib3/renderers/geo/GeoItemRenderer.java b/src/main/java/software/bernie/geckolib3/renderers/geo/GeoItemRenderer.java index b3b21aadc..169726f30 100644 --- a/src/main/java/software/bernie/geckolib3/renderers/geo/GeoItemRenderer.java +++ b/src/main/java/software/bernie/geckolib3/renderers/geo/GeoItemRenderer.java @@ -22,7 +22,6 @@ import software.bernie.geckolib3.model.AnimatedGeoModel; import software.bernie.geckolib3.util.GeckoLibUtil; -@SuppressWarnings({ "rawtypes", "unchecked" }) public class GeoItemRenderer implements IGeoRenderer, BuiltinItemRendererRegistry.DynamicItemRenderer { private static final Map, GeoItemRenderer> renderers = new ConcurrentHashMap<>(); diff --git a/src/main/java/software/bernie/geckolib3/renderers/geo/GeoLayerRenderer.java b/src/main/java/software/bernie/geckolib3/renderers/geo/GeoLayerRenderer.java index 3642d97ff..b65dd55c8 100644 --- a/src/main/java/software/bernie/geckolib3/renderers/geo/GeoLayerRenderer.java +++ b/src/main/java/software/bernie/geckolib3/renderers/geo/GeoLayerRenderer.java @@ -43,7 +43,6 @@ public RenderLayer getRenderType(Identifier textureLocation) { return RenderLayer.getEntityCutout(textureLocation); } - @SuppressWarnings("unchecked") public GeoModelProvider getEntityModel() { return this.entityRenderer.getGeoModelProvider(); } diff --git a/src/main/java/software/bernie/geckolib3/renderers/geo/GeoProjectilesRenderer.java b/src/main/java/software/bernie/geckolib3/renderers/geo/GeoProjectilesRenderer.java index 6e45b9965..96015aa2b 100644 --- a/src/main/java/software/bernie/geckolib3/renderers/geo/GeoProjectilesRenderer.java +++ b/src/main/java/software/bernie/geckolib3/renderers/geo/GeoProjectilesRenderer.java @@ -24,7 +24,6 @@ import software.bernie.geckolib3.model.provider.data.EntityModelData; import software.bernie.geckolib3.util.AnimationUtils; -@SuppressWarnings("unchecked") public class GeoProjectilesRenderer extends EntityRenderer implements IGeoRenderer { diff --git a/src/main/java/software/bernie/geckolib3/renderers/geo/GeoReplacedEntityRenderer.java b/src/main/java/software/bernie/geckolib3/renderers/geo/GeoReplacedEntityRenderer.java index 91a09288d..a17fba31b 100644 --- a/src/main/java/software/bernie/geckolib3/renderers/geo/GeoReplacedEntityRenderer.java +++ b/src/main/java/software/bernie/geckolib3/renderers/geo/GeoReplacedEntityRenderer.java @@ -43,7 +43,6 @@ import software.bernie.geckolib3.model.AnimatedGeoModel; import software.bernie.geckolib3.model.provider.data.EntityModelData; -@SuppressWarnings({ "rawtypes", "unchecked" }) public abstract class GeoReplacedEntityRenderer extends EntityRenderer implements IGeoRenderer { private final AnimatedGeoModel modelProvider; private final T animatable; @@ -80,7 +79,6 @@ public void render(Entity entityIn, float entityYaw, float partialTicks, MatrixS this.render(entityIn, this.animatable, entityYaw, partialTicks, matrixStackIn, bufferIn, packedLightIn); } - @SuppressWarnings({ "resource" }) public void render(Entity entity, IAnimatable animatable, float entityYaw, float partialTicks, MatrixStack stack, VertexConsumerProvider bufferIn, int packedLightIn) { this.currentAnimatable = animatable; diff --git a/src/main/java/software/bernie/geckolib3/renderers/geo/IGeoRenderer.java b/src/main/java/software/bernie/geckolib3/renderers/geo/IGeoRenderer.java index 293050e25..d8e55ee8f 100644 --- a/src/main/java/software/bernie/geckolib3/renderers/geo/IGeoRenderer.java +++ b/src/main/java/software/bernie/geckolib3/renderers/geo/IGeoRenderer.java @@ -100,7 +100,6 @@ default void renderCube(GeoCube cube, MatrixStack stack, VertexConsumer bufferIn } } - @SuppressWarnings("rawtypes") GeoModelProvider getGeoModelProvider(); Identifier getTextureResource(T instance); diff --git a/src/main/java/software/bernie/geckolib3/util/AnimationUtils.java b/src/main/java/software/bernie/geckolib3/util/AnimationUtils.java index e47a380b2..52cb959fd 100644 --- a/src/main/java/software/bernie/geckolib3/util/AnimationUtils.java +++ b/src/main/java/software/bernie/geckolib3/util/AnimationUtils.java @@ -24,13 +24,11 @@ public static double convertSecondsToTicks(double seconds) { /** * Gets the renderer for an entity */ - @SuppressWarnings("unchecked") public static EntityRenderer getRenderer(T entity) { EntityRenderDispatcher renderManager = MinecraftClient.getInstance().getEntityRenderDispatcher(); return (EntityRenderer) renderManager.getRenderer(entity); } - @SuppressWarnings("rawtypes") public static GeoModelProvider getGeoModelForEntity(T entity) { EntityRenderer entityRenderer = getRenderer(entity); diff --git a/src/main/java/software/bernie/geckolib3/util/GeckoLibUtil.java b/src/main/java/software/bernie/geckolib3/util/GeckoLibUtil.java index 1898d9098..3d900492c 100644 --- a/src/main/java/software/bernie/geckolib3/util/GeckoLibUtil.java +++ b/src/main/java/software/bernie/geckolib3/util/GeckoLibUtil.java @@ -72,13 +72,11 @@ public static boolean stackHasIDTag(ItemStack stack) { return stack.hasNbt() && stack.getNbt().contains(GECKO_LIB_ID_NBT, 3); } - @SuppressWarnings("rawtypes") public static AnimationController getControllerForStack(AnimationFactory factory, ItemStack stack, String controllerName) { return getControllerForID(factory, getIDFromStack(stack), controllerName); } - @SuppressWarnings("rawtypes") public static AnimationController getControllerForID(AnimationFactory factory, Integer id, String controllerName) { return factory.getOrCreateAnimationData(id).getAnimationControllers().get(controllerName); } diff --git a/src/main/java/software/bernie/geckolib3/util/json/JsonAnimationUtils.java b/src/main/java/software/bernie/geckolib3/util/json/JsonAnimationUtils.java index 7a041871e..dd9271a00 100644 --- a/src/main/java/software/bernie/geckolib3/util/json/JsonAnimationUtils.java +++ b/src/main/java/software/bernie/geckolib3/util/json/JsonAnimationUtils.java @@ -67,7 +67,6 @@ public static List> getBones(JsonObject json) { * sure why the format stores the times as a string) and the JsonElement * is the object, which has all the rotation keyframes. */ - @SuppressWarnings({ "unchecked", "rawtypes" }) public static Set> getRotationKeyFrames(JsonObject json) { JsonElement rotationObject = json.get("rotation"); if (rotationObject.isJsonArray()) { @@ -90,7 +89,6 @@ public static Set> getRotationKeyFrames(JsonObjec * sure why the format stores the times as a string) and the JsonElement * is the object, which has all the position keyframes. */ - @SuppressWarnings({ "unchecked", "rawtypes" }) public static Set> getPositionKeyFrames(JsonObject json) { JsonElement positionObject = json.get("position"); if (positionObject.isJsonArray()) { @@ -113,7 +111,6 @@ public static Set> getPositionKeyFrames(JsonObjec * sure why the format stores the times as a string) and the JsonElement * is the object, which has all the scale keyframes. */ - @SuppressWarnings({ "unchecked", "rawtypes" }) public static Set> getScaleKeyFrames(JsonObject json) { JsonElement scaleObject = json.get("scale"); if (scaleObject.isJsonArray()) { @@ -182,7 +179,6 @@ private static JsonElement getObjectByKey(Set> js * @return the animation * @throws ShaderParseException the json exception */ - @SuppressWarnings({ "rawtypes", "unchecked" }) public static Map.Entry getAnimation(JsonObject animationFile, String animationName) throws ShaderParseException { return new AbstractMap.SimpleEntry(animationName, getObjectByKey(getAnimations(animationFile), animationName)); @@ -213,7 +209,6 @@ public static Set> getObjectListAsArray(JsonObjec * @throws IllegalStateException Throws this exception if the JSON is formatted * incorrectly */ - @SuppressWarnings({ "unchecked", "rawtypes" }) public static Animation deserializeJsonToAnimation(Map.Entry element, MolangParser parser) throws ClassCastException, IllegalStateException { Animation animation = new Animation(); @@ -316,7 +311,6 @@ private static double calculateLength(List boneAnimations) { return longestLength == 0 ? Double.MAX_VALUE : longestLength; } - @SuppressWarnings({ "unchecked" }) static List convertJsonArrayToList(JsonArray array) { return new Gson().fromJson(array, ArrayList.class); } diff --git a/src/main/java/software/bernie/geckolib3/util/json/JsonKeyFrameUtils.java b/src/main/java/software/bernie/geckolib3/util/json/JsonKeyFrameUtils.java index 99845cca4..d2f6df578 100644 --- a/src/main/java/software/bernie/geckolib3/util/json/JsonKeyFrameUtils.java +++ b/src/main/java/software/bernie/geckolib3/util/json/JsonKeyFrameUtils.java @@ -27,7 +27,6 @@ * Helper class to convert json to keyframes */ public class JsonKeyFrameUtils { - @SuppressWarnings({ "unchecked", "rawtypes" }) private static VectorKeyFrameList> convertJson(List> element, boolean isRotation, MolangParser parser) throws NumberFormatException, MolangException { IValue previousXValue = null; @@ -167,7 +166,6 @@ public static VectorKeyFrameList> convertJsonToKeyFrames( * @return the vector key frame list * @throws NumberFormatException */ - @SuppressWarnings({ "rawtypes", "unchecked" }) public static VectorKeyFrameList> convertJsonToRotationKeyFrames( List> element, MolangParser parser) throws NumberFormatException, MolangException {