From 4c81f509d0bf80cb6ca7621ce532bcfd4e14f3b3 Mon Sep 17 00:00:00 2001 From: AzureZhen <7415711+AzureDoom@users.noreply.github.com> Date: Mon, 5 Sep 2022 14:11:13 -0400 Subject: [PATCH] v3.0.24 --- changelog.txt | 4 +-- core | 2 +- gradle.properties | 4 +-- .../bernie/example/ClientListener.java | 5 +-- .../block/tile/BotariumTileEntity.java | 1 - .../model/entity/ExampleEntityModel.java | 1 - .../model/entity/ReplacedCreeperModel.java | 1 - .../client/renderer/entity/LERenderer.java | 1 - .../entity/ReplacedCreeperRenderer.java | 1 - .../entity/layer/GeoExampleLayer.java | 3 -- .../example/entity/GeoExampleEntity.java | 1 - .../bernie/example/item/JackInTheBoxItem.java | 8 ++--- .../bernie/example/item/PistolItem.java | 5 ++- .../bernie/example/item/PotatoArmorItem.java | 1 - .../registry/EntityRegistryBuilder.java | 1 - .../bernie/example/registry/ItemRegistry.java | 8 ++--- .../software/bernie/geckolib3q/GeckoLib.java | 32 +++++++++---------- .../geckolib3q/compat/PatchouliCompat.java | 1 - .../geckolib3q/file/AnimationFileLoader.java | 1 - .../fabric/MixinArmorFeatureRenderer.java | 2 -- .../geckolib3q/model/AnimatedGeoModel.java | 5 --- .../model/AnimatedTickingGeoModel.java | 1 - .../geckolib3q/network/ClientPackets.java | 5 ++- .../geckolib3q/network/GeckoLibNetwork.java | 4 +-- .../geo/ExtendedGeoEntityRenderer.java | 1 - .../renderers/geo/GeoArmorRenderer.java | 1 - .../renderers/geo/GeoBlockRenderer.java | 1 - .../renderers/geo/GeoEntityRenderer.java | 4 +-- .../renderers/geo/GeoItemRenderer.java | 1 - .../renderers/geo/GeoLayerRenderer.java | 1 - .../renderers/geo/GeoProjectilesRenderer.java | 1 - .../geo/GeoReplacedEntityRenderer.java | 2 -- .../renderers/geo/IGeoRenderer.java | 1 - .../geckolib3q/util/AnimationTicker.java | 1 - .../geckolib3q/util/AnimationUtils.java | 2 -- .../bernie/geckolib3q/util/GeckoLibUtil.java | 2 -- .../util/json/JsonAnimationUtils.java | 7 ---- .../util/json/JsonKeyFrameUtils.java | 3 +- 38 files changed, 35 insertions(+), 91 deletions(-) diff --git a/changelog.txt b/changelog.txt index ba1861eec..58d6ce0b6 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,3 @@ -v3.0.23 +v3.0.24 -- Fixed Extended Entity Render of armor - DerToaster \ No newline at end of file +- 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 568a3618e..655c9489d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,11 +8,11 @@ geckolib_core_version=1.0.4a # Quilt quilt_mappings=24 -loader_version=0.17.3 +loader_version=0.17.5-beta.1 qsl_version=1.1.0-beta.26+1.18.2 quilted_fapi_version=1.0.0-beta.24+0.58.0 # Mod Properties -mod_version=3.0.23 +mod_version=3.0.24 maven_group=software.bernie.geckolib archives_base_name=geckolib-quilt-1.18 \ 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 37a42c0be..05afcf170 100644 --- a/src/main/java/software/bernie/example/ClientListener.java +++ b/src/main/java/software/bernie/example/ClientListener.java @@ -10,6 +10,7 @@ import org.quiltmc.loader.api.ModContainer; import org.quiltmc.loader.api.QuiltLoader; import org.quiltmc.qsl.base.api.entrypoint.client.ClientModInitializer; +import org.quiltmc.qsl.networking.api.ServerPlayNetworking; import org.quiltmc.qsl.networking.api.client.ClientPlayNetworking; import io.netty.buffer.Unpooled; @@ -17,7 +18,6 @@ import net.fabricmc.api.Environment; import net.fabricmc.fabric.api.client.rendering.v1.BlockEntityRendererRegistry; import net.fabricmc.fabric.api.client.rendering.v1.EntityRendererRegistry; -import net.fabricmc.fabric.api.networking.v1.ServerPlayNetworking; import net.fabricmc.fabric.impl.blockrenderlayer.BlockRenderLayerMapImpl; import net.minecraft.client.MinecraftClient; import net.minecraft.client.render.RenderLayer; @@ -49,10 +49,8 @@ import software.bernie.geckolib3q.renderers.geo.GeoArmorRenderer; import software.bernie.geckolib3q.renderers.geo.GeoItemRenderer; -@SuppressWarnings("deprecation") public class ClientListener implements ClientModInitializer { - @SuppressWarnings({ "unchecked" }) @Override public void onInitializeClient(ModContainer mod) { if (QuiltLoader.isDevelopmentEnvironment() && !GeckoLibMod.DISABLE_IN_DEV) { @@ -92,7 +90,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/block/tile/BotariumTileEntity.java b/src/main/java/software/bernie/example/block/tile/BotariumTileEntity.java index 2c2ff421d..fde1406e8 100644 --- a/src/main/java/software/bernie/example/block/tile/BotariumTileEntity.java +++ b/src/main/java/software/bernie/example/block/tile/BotariumTileEntity.java @@ -19,7 +19,6 @@ public BotariumTileEntity(BlockPos pos, BlockState state) { super(TileRegistry.BOTARIUM_TILE, pos, state); } - @SuppressWarnings("unchecked") private PlayState predicate(AnimationEvent event) { event.getController().transitionLengthTicks = 0; event.getController().setAnimation(new AnimationBuilder().addAnimation("Botarium.anim.deploy", true)); 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 8cc93bcb0..efe0b4e42 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 c200616d4..771d54af0 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.geckolib3q.GeckoLib; import software.bernie.geckolib3q.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 782b43196..935769f92 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 12d7c94da..0322fd262 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 f7a61fb3a..f966ef22e 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,7 +10,6 @@ import software.bernie.geckolib3q.renderers.geo.GeoLayerRenderer; import software.bernie.geckolib3q.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 @@ -19,12 +18,10 @@ public class GeoExampleLayer extends GeoLayerRenderer { // 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, diff --git a/src/main/java/software/bernie/example/entity/GeoExampleEntity.java b/src/main/java/software/bernie/example/entity/GeoExampleEntity.java index d4a186781..20a0433d3 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 b4ea823ba..b536009fd 100644 --- a/src/main/java/software/bernie/example/item/JackInTheBoxItem.java +++ b/src/main/java/software/bernie/example/item/JackInTheBoxItem.java @@ -1,6 +1,7 @@ package software.bernie.example.item; -import net.fabricmc.fabric.api.networking.v1.PlayerLookup; +import org.quiltmc.qsl.networking.api.PlayerLookup; + import net.minecraft.client.MinecraftClient; import net.minecraft.client.network.ClientPlayerEntity; import net.minecraft.entity.player.PlayerEntity; @@ -25,7 +26,6 @@ import software.bernie.geckolib3q.network.ISyncable; import software.bernie.geckolib3q.util.GeckoLibUtil; -@SuppressWarnings("deprecation") public class JackInTheBoxItem extends Item implements IAnimatable, ISyncable { public AnimationFactory factory = new AnimationFactory(this); private static final String controllerName = "popupController"; @@ -42,7 +42,6 @@ private

PlayState predicate(AnimationEvent

eve @Override public void registerControllers(AnimationData data) { - @SuppressWarnings({ "unchecked", "rawtypes" }) AnimationController controller = new AnimationController(this, controllerName, 20, this::predicate); @@ -55,7 +54,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 @@ -83,13 +81,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 d78d6db55..4246e8856 100644 --- a/src/main/java/software/bernie/example/item/PistolItem.java +++ b/src/main/java/software/bernie/example/item/PistolItem.java @@ -2,7 +2,8 @@ import java.util.List; -import net.fabricmc.fabric.api.networking.v1.PlayerLookup; +import org.quiltmc.qsl.networking.api.PlayerLookup; + import net.minecraft.client.item.TooltipContext; import net.minecraft.entity.LivingEntity; import net.minecraft.entity.player.PlayerEntity; @@ -30,7 +31,6 @@ import software.bernie.geckolib3q.network.ISyncable; import software.bernie.geckolib3q.util.GeckoLibUtil; -@SuppressWarnings("deprecation") public class PistolItem extends Item implements IAnimatable, ISyncable { public AnimationFactory factory = new AnimationFactory(this); @@ -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/example/registry/ItemRegistry.java b/src/main/java/software/bernie/example/registry/ItemRegistry.java index e694008b1..38d4a8333 100644 --- a/src/main/java/software/bernie/example/registry/ItemRegistry.java +++ b/src/main/java/software/bernie/example/registry/ItemRegistry.java @@ -1,6 +1,7 @@ package software.bernie.example.registry; -import net.fabricmc.fabric.api.client.itemgroup.FabricItemGroupBuilder; +import org.quiltmc.qsl.item.group.api.QuiltItemGroup; + import net.minecraft.entity.EquipmentSlot; import net.minecraft.item.ArmorMaterials; import net.minecraft.item.BlockItem; @@ -13,11 +14,10 @@ import software.bernie.example.item.PotatoArmorItem; import software.bernie.geckolib3q.GeckoLib; -@SuppressWarnings("deprecation") public class ItemRegistry { - public static ItemGroup geckolibItemGroup = FabricItemGroupBuilder - .create(new Identifier(GeckoLib.ModID, "geckolib_examples")) + public static ItemGroup geckolibItemGroup = QuiltItemGroup + .builder(new Identifier(GeckoLib.ModID, "geckolib_examples")) .icon(() -> new ItemStack(ItemRegistry.JACK_IN_THE_BOX)).build(); public static final JackInTheBoxItem JACK_IN_THE_BOX = RegistryUtils.registerItem("jackintheboxitem", diff --git a/src/main/java/software/bernie/geckolib3q/GeckoLib.java b/src/main/java/software/bernie/geckolib3q/GeckoLib.java index 605a69342..818bdb631 100644 --- a/src/main/java/software/bernie/geckolib3q/GeckoLib.java +++ b/src/main/java/software/bernie/geckolib3q/GeckoLib.java @@ -10,16 +10,15 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.quiltmc.qsl.resource.loader.api.ResourceLoader; +import org.quiltmc.qsl.resource.loader.api.reloader.IdentifiableResourceReloader; -import net.fabricmc.fabric.api.resource.IdentifiableResourceReloadListener; -import net.fabricmc.fabric.api.resource.ResourceManagerHelper; import net.minecraft.resource.ResourceManager; import net.minecraft.resource.ResourceType; import net.minecraft.util.Identifier; import net.minecraft.util.profiler.Profiler; import software.bernie.geckolib3q.resource.GeckoLibCache; -@SuppressWarnings("deprecation") public class GeckoLib { public static final Logger LOGGER = LogManager.getLogger(); public static final String ModID = "geckolib3q"; @@ -27,21 +26,20 @@ public class GeckoLib { public static void initialize() { if (!hasInitialized) { - ResourceManagerHelper.get(ResourceType.CLIENT_RESOURCES) - .registerReloadListener(new IdentifiableResourceReloadListener() { - @Override - public Identifier getFabricId() { - return new Identifier(GeckoLib.ModID, "models"); - } + ResourceLoader.get(ResourceType.CLIENT_RESOURCES).registerReloader(new IdentifiableResourceReloader() { + @Override + public Identifier getQuiltId() { + return new Identifier(GeckoLib.ModID, "models"); + } - @Override - public CompletableFuture reload(Synchronizer synchronizer, ResourceManager manager, - Profiler prepareProfiler, Profiler applyProfiler, Executor prepareExecutor, - Executor applyExecutor) { - return GeckoLibCache.getInstance().reload(synchronizer, manager, prepareProfiler, - applyProfiler, prepareExecutor, applyExecutor); - } - }); + @Override + public CompletableFuture reload(Synchronizer synchronizer, ResourceManager manager, + Profiler prepareProfiler, Profiler applyProfiler, Executor prepareExecutor, + Executor applyExecutor) { + return GeckoLibCache.getInstance().reload(synchronizer, manager, prepareProfiler, applyProfiler, + prepareExecutor, applyExecutor); + } + }); } hasInitialized = true; } diff --git a/src/main/java/software/bernie/geckolib3q/compat/PatchouliCompat.java b/src/main/java/software/bernie/geckolib3q/compat/PatchouliCompat.java index 34cdfbf75..e7672ee2c 100644 --- a/src/main/java/software/bernie/geckolib3q/compat/PatchouliCompat.java +++ b/src/main/java/software/bernie/geckolib3q/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/geckolib3q/file/AnimationFileLoader.java b/src/main/java/software/bernie/geckolib3q/file/AnimationFileLoader.java index 4a3b670d7..bbe121240 100644 --- a/src/main/java/software/bernie/geckolib3q/file/AnimationFileLoader.java +++ b/src/main/java/software/bernie/geckolib3q/file/AnimationFileLoader.java @@ -50,7 +50,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.getResource(location).getInputStream()) { return IOUtils.toString(inputStream); diff --git a/src/main/java/software/bernie/geckolib3q/mixins/fabric/MixinArmorFeatureRenderer.java b/src/main/java/software/bernie/geckolib3q/mixins/fabric/MixinArmorFeatureRenderer.java index a8b40019c..58890f5f5 100644 --- a/src/main/java/software/bernie/geckolib3q/mixins/fabric/MixinArmorFeatureRenderer.java +++ b/src/main/java/software/bernie/geckolib3q/mixins/fabric/MixinArmorFeatureRenderer.java @@ -28,7 +28,6 @@ import net.minecraft.util.Identifier; import software.bernie.geckolib3q.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/geckolib3q/model/AnimatedGeoModel.java b/src/main/java/software/bernie/geckolib3q/model/AnimatedGeoModel.java index 591a80e84..b8f69ac66 100644 --- a/src/main/java/software/bernie/geckolib3q/model/AnimatedGeoModel.java +++ b/src/main/java/software/bernie/geckolib3q/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/geckolib3q/model/AnimatedTickingGeoModel.java b/src/main/java/software/bernie/geckolib3q/model/AnimatedTickingGeoModel.java index 565b0b9ef..b8108bc95 100644 --- a/src/main/java/software/bernie/geckolib3q/model/AnimatedTickingGeoModel.java +++ b/src/main/java/software/bernie/geckolib3q/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/geckolib3q/network/ClientPackets.java b/src/main/java/software/bernie/geckolib3q/network/ClientPackets.java index 9a39afa73..1c7b297aa 100644 --- a/src/main/java/software/bernie/geckolib3q/network/ClientPackets.java +++ b/src/main/java/software/bernie/geckolib3q/network/ClientPackets.java @@ -2,15 +2,14 @@ import org.quiltmc.loader.api.ModContainer; import org.quiltmc.qsl.base.api.entrypoint.client.ClientModInitializer; +import org.quiltmc.qsl.networking.api.PacketSender; +import org.quiltmc.qsl.networking.api.client.ClientPlayNetworking; -import net.fabricmc.fabric.api.client.networking.v1.ClientPlayNetworking; -import net.fabricmc.fabric.api.networking.v1.PacketSender; import net.minecraft.client.MinecraftClient; import net.minecraft.client.network.ClientPlayNetworkHandler; import net.minecraft.network.PacketByteBuf; import software.bernie.geckolib3q.GeckoLib; -@SuppressWarnings("deprecation") public class ClientPackets implements ClientModInitializer { public static void registerClientPackets() { diff --git a/src/main/java/software/bernie/geckolib3q/network/GeckoLibNetwork.java b/src/main/java/software/bernie/geckolib3q/network/GeckoLibNetwork.java index 2f43c77a0..a6b9df93c 100644 --- a/src/main/java/software/bernie/geckolib3q/network/GeckoLibNetwork.java +++ b/src/main/java/software/bernie/geckolib3q/network/GeckoLibNetwork.java @@ -4,15 +4,15 @@ import java.util.Map; import java.util.function.Supplier; +import org.quiltmc.qsl.networking.api.ServerPlayNetworking; + import io.netty.buffer.Unpooled; -import net.fabricmc.fabric.api.networking.v1.ServerPlayNetworking; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.network.PacketByteBuf; import net.minecraft.server.network.ServerPlayerEntity; import net.minecraft.util.Identifier; import software.bernie.geckolib3q.GeckoLib; -@SuppressWarnings("deprecation") public class GeckoLibNetwork { private static final Map> SYNCABLES = new HashMap<>(); public static final Identifier SYNCABLE = new Identifier(GeckoLib.ModID, "syncable"); diff --git a/src/main/java/software/bernie/geckolib3q/renderers/geo/ExtendedGeoEntityRenderer.java b/src/main/java/software/bernie/geckolib3q/renderers/geo/ExtendedGeoEntityRenderer.java index 9887f833b..9df6ad409 100644 --- a/src/main/java/software/bernie/geckolib3q/renderers/geo/ExtendedGeoEntityRenderer.java +++ b/src/main/java/software/bernie/geckolib3q/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/geckolib3q/renderers/geo/GeoArmorRenderer.java b/src/main/java/software/bernie/geckolib3q/renderers/geo/GeoArmorRenderer.java index dbaec0be4..14b70b1bb 100644 --- a/src/main/java/software/bernie/geckolib3q/renderers/geo/GeoArmorRenderer.java +++ b/src/main/java/software/bernie/geckolib3q/renderers/geo/GeoArmorRenderer.java @@ -32,7 +32,6 @@ import software.bernie.geckolib3q.model.AnimatedGeoModel; import software.bernie.geckolib3q.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/geckolib3q/renderers/geo/GeoBlockRenderer.java b/src/main/java/software/bernie/geckolib3q/renderers/geo/GeoBlockRenderer.java index f209b4e0e..5313d2248 100644 --- a/src/main/java/software/bernie/geckolib3q/renderers/geo/GeoBlockRenderer.java +++ b/src/main/java/software/bernie/geckolib3q/renderers/geo/GeoBlockRenderer.java @@ -20,7 +20,6 @@ import software.bernie.geckolib3q.geo.render.built.GeoModel; import software.bernie.geckolib3q.model.AnimatedGeoModel; -@SuppressWarnings({ "rawtypes", "unchecked" }) public abstract class GeoBlockRenderer implements IGeoRenderer, BlockEntityRenderer { static { diff --git a/src/main/java/software/bernie/geckolib3q/renderers/geo/GeoEntityRenderer.java b/src/main/java/software/bernie/geckolib3q/renderers/geo/GeoEntityRenderer.java index 19161bb9d..861796b67 100644 --- a/src/main/java/software/bernie/geckolib3q/renderers/geo/GeoEntityRenderer.java +++ b/src/main/java/software/bernie/geckolib3q/renderers/geo/GeoEntityRenderer.java @@ -51,7 +51,6 @@ import software.bernie.geckolib3q.util.AnimationUtils; import software.bernie.geckolib3q.util.RenderUtils; -@SuppressWarnings("unchecked") public abstract class GeoEntityRenderer extends EntityRenderer implements IGeoRenderer { static { @@ -99,8 +98,7 @@ private static float getFacingAngle(Direction facingIn) { return 0.0F; } } - - @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/geckolib3q/renderers/geo/GeoItemRenderer.java b/src/main/java/software/bernie/geckolib3q/renderers/geo/GeoItemRenderer.java index e96bb4054..389564a02 100644 --- a/src/main/java/software/bernie/geckolib3q/renderers/geo/GeoItemRenderer.java +++ b/src/main/java/software/bernie/geckolib3q/renderers/geo/GeoItemRenderer.java @@ -22,7 +22,6 @@ import software.bernie.geckolib3q.model.AnimatedGeoModel; import software.bernie.geckolib3q.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/geckolib3q/renderers/geo/GeoLayerRenderer.java b/src/main/java/software/bernie/geckolib3q/renderers/geo/GeoLayerRenderer.java index f2f9fed2f..94638d283 100644 --- a/src/main/java/software/bernie/geckolib3q/renderers/geo/GeoLayerRenderer.java +++ b/src/main/java/software/bernie/geckolib3q/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/geckolib3q/renderers/geo/GeoProjectilesRenderer.java b/src/main/java/software/bernie/geckolib3q/renderers/geo/GeoProjectilesRenderer.java index ccf39b355..7c93ba7aa 100644 --- a/src/main/java/software/bernie/geckolib3q/renderers/geo/GeoProjectilesRenderer.java +++ b/src/main/java/software/bernie/geckolib3q/renderers/geo/GeoProjectilesRenderer.java @@ -24,7 +24,6 @@ import software.bernie.geckolib3q.model.provider.data.EntityModelData; import software.bernie.geckolib3q.util.AnimationUtils; -@SuppressWarnings("unchecked") public class GeoProjectilesRenderer extends EntityRenderer implements IGeoRenderer { diff --git a/src/main/java/software/bernie/geckolib3q/renderers/geo/GeoReplacedEntityRenderer.java b/src/main/java/software/bernie/geckolib3q/renderers/geo/GeoReplacedEntityRenderer.java index 8206077a3..eb691454a 100644 --- a/src/main/java/software/bernie/geckolib3q/renderers/geo/GeoReplacedEntityRenderer.java +++ b/src/main/java/software/bernie/geckolib3q/renderers/geo/GeoReplacedEntityRenderer.java @@ -44,7 +44,6 @@ import software.bernie.geckolib3q.model.AnimatedGeoModel; import software.bernie.geckolib3q.model.provider.data.EntityModelData; -@SuppressWarnings({ "rawtypes", "unchecked" }) public abstract class GeoReplacedEntityRenderer extends EntityRenderer implements IGeoRenderer { private final AnimatedGeoModel modelProvider; private final T animatable; @@ -81,7 +80,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/geckolib3q/renderers/geo/IGeoRenderer.java b/src/main/java/software/bernie/geckolib3q/renderers/geo/IGeoRenderer.java index 919de671b..2d8b8b8d5 100644 --- a/src/main/java/software/bernie/geckolib3q/renderers/geo/IGeoRenderer.java +++ b/src/main/java/software/bernie/geckolib3q/renderers/geo/IGeoRenderer.java @@ -100,7 +100,6 @@ default void renderCube(GeoCube cube, MatrixStack stack, VertexConsumer bufferIn } } - @SuppressWarnings("rawtypes") GeoModelProvider getGeoModelProvider(); Identifier getTextureLocation(T instance); diff --git a/src/main/java/software/bernie/geckolib3q/util/AnimationTicker.java b/src/main/java/software/bernie/geckolib3q/util/AnimationTicker.java index 35cff26b1..f9e5637da 100644 --- a/src/main/java/software/bernie/geckolib3q/util/AnimationTicker.java +++ b/src/main/java/software/bernie/geckolib3q/util/AnimationTicker.java @@ -4,7 +4,6 @@ import net.minecraft.client.MinecraftClient; import software.bernie.geckolib3.core.manager.AnimationData; -@SuppressWarnings("deprecation") public class AnimationTicker { private AnimationData manager; diff --git a/src/main/java/software/bernie/geckolib3q/util/AnimationUtils.java b/src/main/java/software/bernie/geckolib3q/util/AnimationUtils.java index 0d671b299..3e183956c 100644 --- a/src/main/java/software/bernie/geckolib3q/util/AnimationUtils.java +++ b/src/main/java/software/bernie/geckolib3q/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/geckolib3q/util/GeckoLibUtil.java b/src/main/java/software/bernie/geckolib3q/util/GeckoLibUtil.java index 6abc83e4e..b7be63c13 100644 --- a/src/main/java/software/bernie/geckolib3q/util/GeckoLibUtil.java +++ b/src/main/java/software/bernie/geckolib3q/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/geckolib3q/util/json/JsonAnimationUtils.java b/src/main/java/software/bernie/geckolib3q/util/json/JsonAnimationUtils.java index 372d266c2..4f8703e1e 100644 --- a/src/main/java/software/bernie/geckolib3q/util/json/JsonAnimationUtils.java +++ b/src/main/java/software/bernie/geckolib3q/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(); @@ -315,8 +310,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/geckolib3q/util/json/JsonKeyFrameUtils.java b/src/main/java/software/bernie/geckolib3q/util/json/JsonKeyFrameUtils.java index dbfcb12a6..2ef544ee1 100644 --- a/src/main/java/software/bernie/geckolib3q/util/json/JsonKeyFrameUtils.java +++ b/src/main/java/software/bernie/geckolib3q/util/json/JsonKeyFrameUtils.java @@ -29,7 +29,7 @@ * 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; @@ -169,7 +169,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 {