From 23c3f627cd72817cebab53b0e44e0762fb5e1d68 Mon Sep 17 00:00:00 2001 From: UnlikePaladin <36827970+UnlikePaladin@users.noreply.github.com> Date: Thu, 17 Oct 2024 16:17:18 -0600 Subject: [PATCH 1/9] Fix a couple of part related crashes --- .../java/org/figuramc/figura/model/FiguraModelPart.java | 8 ++++++-- .../figura/model/rendering/ImmediateAvatarRenderer.java | 8 +++++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/common/src/main/java/org/figuramc/figura/model/FiguraModelPart.java b/common/src/main/java/org/figuramc/figura/model/FiguraModelPart.java index 510c7bf44..c36567cbf 100644 --- a/common/src/main/java/org/figuramc/figura/model/FiguraModelPart.java +++ b/common/src/main/java/org/figuramc/figura/model/FiguraModelPart.java @@ -1405,6 +1405,9 @@ public Map> getAllVertices() { value = "model_part.move_to" ) public FiguraModelPart moveTo(@LuaNotNil FiguraModelPart part) { + if (part == this) + throw new LuaError("Fractal, cannot parent part to itself"); + if (parent != null) { parent.children.remove(this); parent.childCache.remove(this.name); @@ -1428,12 +1431,13 @@ public FiguraModelPart moveTo(@LuaNotNil FiguraModelPart part) { value = "model_part.add_child" ) public FiguraModelPart addChild(@LuaNotNil FiguraModelPart part) { + if (part == this) + throw new LuaError("Fractal, cannot parent part to itself"); + FiguraModelPart parent = this.parent; while (parent != null) { if (part == parent) throw new LuaError("Cannot add child that's already parent of this part"); - if (part == this) - throw new LuaError("Fractal, cannot parent part to itself"); parent = parent.parent; } diff --git a/common/src/main/java/org/figuramc/figura/model/rendering/ImmediateAvatarRenderer.java b/common/src/main/java/org/figuramc/figura/model/rendering/ImmediateAvatarRenderer.java index 01ae94e6a..12f0c035e 100644 --- a/common/src/main/java/org/figuramc/figura/model/rendering/ImmediateAvatarRenderer.java +++ b/common/src/main/java/org/figuramc/figura/model/rendering/ImmediateAvatarRenderer.java @@ -276,14 +276,20 @@ protected boolean renderPart(FiguraModelPart part, int[] remainingComplexity, bo // recalculate light FiguraMod.popPushProfiler("calculateLight"); Level l; - if (custom.light != null) + if (custom.light != null) { updateLight = false; + pivotOffsetter.light = custom.light; + } else if (updateLight && (l = Minecraft.getInstance().level) != null) { FiguraVec3 pos = part.savedPartToWorldMat.apply(0d, 0d, 0d); int block = l.getBrightness(LightLayer.BLOCK, pos.asBlockPos()); int sky = l.getBrightness(LightLayer.SKY, pos.asBlockPos()); customizationStack.peek().light = LightTexture.pack(block, sky); + pivotOffsetter.light = customizationStack.peek().light; } + + pivotOffsetter.alpha = Objects.requireNonNullElse(custom.alpha, 0.0f); + pivotOffsetter.overlay = Objects.requireNonNullElse(custom.overlay, 1); } // mid render function From a2fbcb50647db80b988eaf8a75b72a87c821d0d7 Mon Sep 17 00:00:00 2001 From: UnlikePaladin <36827970+UnlikePaladin@users.noreply.github.com> Date: Thu, 17 Oct 2024 19:01:28 -0600 Subject: [PATCH 2/9] Fix figura replacing nameplate for non-avatar users Fix duplicate suffix-prefix in the nameplate --- .../mixin/render/renderers/EntityRendererMixin.java | 5 ++++- .../mixin/render/renderers/PlayerRendererMixin.java | 13 +++++++++---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/common/src/main/java/org/figuramc/figura/mixin/render/renderers/EntityRendererMixin.java b/common/src/main/java/org/figuramc/figura/mixin/render/renderers/EntityRendererMixin.java index a9e6884b4..493976653 100644 --- a/common/src/main/java/org/figuramc/figura/mixin/render/renderers/EntityRendererMixin.java +++ b/common/src/main/java/org/figuramc/figura/mixin/render/renderers/EntityRendererMixin.java @@ -59,12 +59,13 @@ private void setupAvatar(T entity, Component text, PoseStack matrices, MultiBuff figura$avatar = AvatarManager.getAvatar(entity); figura$custom = figura$avatar == null || figura$avatar.luaRuntime == null ? null : figura$avatar.luaRuntime.nameplate.ENTITY; figura$hasCustomNameplate = figura$custom != null && figura$avatar.permissions.get(Permissions.NAMEPLATE_EDIT) == 1; - figura$enabled = Configs.ENTITY_NAMEPLATE.value > 0 && !AvatarManager.panic; + figura$enabled = Configs.ENTITY_NAMEPLATE.value > 0 && !AvatarManager.panic && figura$hasCustomNameplate; figura$textList = TextUtils.splitText(text, "\n"); } + // Push pivot transformations when the nametag is being pivoted (set to entity height in vanilla) @WrapOperation(at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/vertex/PoseStack;translate(FFF)V"), method = "renderNameTag") private void modifyPivot(PoseStack instance, float x, float y, float z, Operation original) { FiguraVec3 pivot = FiguraVec3.of(x, y, z); @@ -77,6 +78,7 @@ private void modifyPivot(PoseStack instance, float x, float y, float z, Operatio original.call(instance, (float)pivot.x, (float)pivot.y, (float)pivot.z); } + // Push position transformations after the nametag has been rotated to face the camera @Inject(at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/vertex/PoseStack;mulPose(Lorg/joml/Quaternionf;)V", shift = At.Shift.AFTER), method = "renderNameTag") private void modifyPos(T entity, Component text, PoseStack matrices, MultiBufferSource vertexConsumers, int light, CallbackInfo ci) { if (figura$enabled && figura$avatar != null) { @@ -89,6 +91,7 @@ private void modifyPos(T entity, Component text, PoseStack matrices, MultiBuffer } } + // push the scale when vanilla does so @WrapOperation(at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/vertex/PoseStack;scale(FFF)V"), method = "renderNameTag") private void modifyScale(PoseStack instance, float x, float y, float z, Operation original) { FiguraVec3 scaleVec = FiguraVec3.of(x, y, z); diff --git a/common/src/main/java/org/figuramc/figura/mixin/render/renderers/PlayerRendererMixin.java b/common/src/main/java/org/figuramc/figura/mixin/render/renderers/PlayerRendererMixin.java index 5897a4d41..08d49025b 100644 --- a/common/src/main/java/org/figuramc/figura/mixin/render/renderers/PlayerRendererMixin.java +++ b/common/src/main/java/org/figuramc/figura/mixin/render/renderers/PlayerRendererMixin.java @@ -96,7 +96,7 @@ private Component modifyPlayerNameText(Component text, @Local(argsOnly = true) A // customization boolean, which also is the permission check boolean hasCustom = custom != null && avatar.permissions.get(Permissions.NAMEPLATE_EDIT) == 1; - Component name = Component.literal(text.getString()); + Component name = Component.literal(player.getName().getString()); FiguraMod.popPushProfiler("text"); Component replacement = hasCustom && custom.getJson() != null ? custom.getJson().copy() : name; @@ -114,12 +114,14 @@ private Component modifyPlayerNameText(Component text, @Local(argsOnly = true) A return text; } + // Push for scoreboard rendering @Inject(method = "renderNameTag(Lnet/minecraft/client/player/AbstractClientPlayer;Lnet/minecraft/network/chat/Component;Lcom/mojang/blaze3d/vertex/PoseStack;Lnet/minecraft/client/renderer/MultiBufferSource;I)V", at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/vertex/PoseStack;pushPose()V")) private void pushProfilerForRender(AbstractClientPlayer player, Component text, PoseStack stack, MultiBufferSource multiBufferSource, int light, CallbackInfo ci) { FiguraMod.popPushProfiler("render"); FiguraMod.pushProfiler("scoreboard"); } + // Pop the profiler after everything's done @Inject(method = "renderNameTag(Lnet/minecraft/client/player/AbstractClientPlayer;Lnet/minecraft/network/chat/Component;Lcom/mojang/blaze3d/vertex/PoseStack;Lnet/minecraft/client/renderer/MultiBufferSource;I)V", at = @At(value = "TAIL")) private void popProfiler(AbstractClientPlayer player, Component text, PoseStack stack, MultiBufferSource multiBufferSource, int light, CallbackInfo ci) { FiguraMod.popProfiler(5); @@ -150,9 +152,12 @@ private void renderNameTag(AbstractClientPlayer player, Component text, PoseStac return; } - FiguraMod.pushProfiler(FiguraMod.MOD_ID); - FiguraMod.pushProfiler(player.getName().getString()); - FiguraMod.pushProfiler("nameplate"); + // If the user has an avatar equipped, figura nameplate rendering will be enabled so the profiler is pushed + if (hasCustom) { + FiguraMod.pushProfiler(FiguraMod.MOD_ID); + FiguraMod.pushProfiler(player.getName().getString()); + FiguraMod.pushProfiler("nameplate"); + } } From cac700e585f228f94f3cdd8103362d81ad0e6c55 Mon Sep 17 00:00:00 2001 From: UnlikePaladin <36827970+UnlikePaladin@users.noreply.github.com> Date: Thu, 17 Oct 2024 19:22:03 -0600 Subject: [PATCH 3/9] Fix armor pivots not being disabled if the user had no permission --- .../compat/GeckolibGeoRendererMixin.java | 7 ++++++- .../layers/HumanoidArmorLayerMixin.java | 19 +++++++++++-------- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/common/src/main/java/org/figuramc/figura/mixin/compat/GeckolibGeoRendererMixin.java b/common/src/main/java/org/figuramc/figura/mixin/compat/GeckolibGeoRendererMixin.java index 0c2f278f6..90513dce9 100644 --- a/common/src/main/java/org/figuramc/figura/mixin/compat/GeckolibGeoRendererMixin.java +++ b/common/src/main/java/org/figuramc/figura/mixin/compat/GeckolibGeoRendererMixin.java @@ -111,11 +111,16 @@ default void actuallyRender(PoseStack poseStack, T animatable, BakedGeoModel mod if (geoBone == null) return true; + int armorEditPermission = avatar.permissions.get(Permissions.VANILLA_MODEL_EDIT); // Returns successfully but skips rendering if the part is hidden VanillaPart part = RenderUtils.pivotToPart(avatar, parentType); - if (avatar.permissions.get(Permissions.VANILLA_MODEL_EDIT) == 1 && part != null && !part.checkVisible()) + if (armorEditPermission == 1 && part != null && !part.checkVisible()) return false; + // If the user has no permission disable pivots + if (armorEditPermission != 1) + return true; + return !avatar.pivotPartRender(parentType, stack -> { geoBone.setRotX(0); geoBone.setRotY(0); diff --git a/common/src/main/java/org/figuramc/figura/mixin/render/layers/HumanoidArmorLayerMixin.java b/common/src/main/java/org/figuramc/figura/mixin/render/layers/HumanoidArmorLayerMixin.java index 1b343d26e..faf6cc3d8 100644 --- a/common/src/main/java/org/figuramc/figura/mixin/render/layers/HumanoidArmorLayerMixin.java +++ b/common/src/main/java/org/figuramc/figura/mixin/render/layers/HumanoidArmorLayerMixin.java @@ -133,7 +133,8 @@ public void postRenderArmorPiece(PoseStack poseStack, MultiBufferSource multiBuf boolean allFailed = true; VanillaPart mainPart = RenderUtils.partFromSlot(figura$avatar, slot); - if (figura$avatar.permissions.get(Permissions.VANILLA_MODEL_EDIT) == 1 && mainPart != null && !mainPart.checkVisible()) return; + int armorEditPermission = figura$avatar.permissions.get(Permissions.VANILLA_MODEL_EDIT); + if (armorEditPermission == 1 && mainPart != null && !mainPart.checkVisible()) return; // Don't render armor if GeckoLib is already doing the rendering if (!GeckoLibCompat.armorHasCustomModel(itemStack)) { @@ -141,20 +142,22 @@ public void postRenderArmorPiece(PoseStack poseStack, MultiBufferSource multiBuf for (ParentType parentType : parentTypes) { // Skip the part if it's hidden VanillaPart part = RenderUtils.pivotToPart(figura$avatar, parentType); - if (figura$avatar.permissions.get(Permissions.VANILLA_MODEL_EDIT) == 1 && part != null && !part.checkVisible()) continue; - + if (armorEditPermission == 1 && part != null && !part.checkVisible()) continue; + boolean renderedPivot = false; + // If the user has no permission disable pivot + if (armorEditPermission == 1) { // Try to render the pivot part - boolean renderedPivot = figura$avatar.pivotPartRender(parentType, stack -> { + renderedPivot = figura$avatar.pivotPartRender(parentType, stack -> { stack.pushPose(); figura$prepareArmorRender(stack); renderer.renderArmorPart(stack, vertexConsumers, light, armorModel, entity, itemStack, slot, armorItem, parentType); stack.popPose(); }); - - if (renderedPivot) { - allFailed = false; - } } + if (renderedPivot) { + allFailed = false; + } + } } // As a fallback, render armor the vanilla way if (allFailed) { From 6536898a121779daf5ada7fee06e0b0adb4ba297 Mon Sep 17 00:00:00 2001 From: UnlikePaladin <36827970+UnlikePaladin@users.noreply.github.com> Date: Thu, 17 Oct 2024 19:29:26 -0600 Subject: [PATCH 4/9] Add missing description for trident render event --- common/src/main/resources/assets/figura/lang/en_us.json | 1 + 1 file changed, 1 insertion(+) diff --git a/common/src/main/resources/assets/figura/lang/en_us.json b/common/src/main/resources/assets/figura/lang/en_us.json index e4b27a47b..6eb28a8ab 100644 --- a/common/src/main/resources/assets/figura/lang/en_us.json +++ b/common/src/main/resources/assets/figura/lang/en_us.json @@ -1060,6 +1060,7 @@ "figura.docs.events.char_typed": "The CHAR_TYPED event runs every time a character is inputted\nTakes three parameters, the resulting \"string\" after converting the code point, the \"modifier\", which is a bitmask number detecting if you have any modifier keys being pressed (like shift or alt, for example), and the \"codepoint\" of the inputted char", "figura.docs.events.use_item": "The USE_ITEM event is run every time the entity uses an item\nThe item, action and amount of particles this item would produce is given as argument\nIf returned true, the event cancels its vanilla function", "figura.docs.events.arrow_render": "The ARROW_RENDER event is run for every arrow entity shot by the Avatar owner\nIt takes two arguments, the tick delta, and the arrow entity\nReturning \"true\" stops this arrow from rendering, including the Arrow parent parts\nRequires the \"Vanilla Model Change\" permission", + "figura.docs.events.trident_render": "The TRIDENT_RENDER event is run for every trident thrown by the Avatar owner\nIt takes two arguments, the tick delta, and the trident entity\nReturning \"true\" stops this trident from rendering, including the Trident parent parts\nRequires the \"Vanilla Model Change\" permission", "figura.docs.events.item_render": "Called on every one of your items that is being rendered\nIt takes six arguments: the item being rendered, the rendering mode, the position, rotation, and scale that would be applied to the item, and if it's being rendered in the left hand\nReturning a ModelPart parented to Item stops the rendering of this item and will render the returned part instead", "figura.docs.events.on_play_sound": "Called every time a new sound is played\nTakes the following as arguments: the sound's ID, its world position, volume, pitch, if the sound should loop, the sound's category, and the sound's file path\nReturn true to prevent this sound from playing", "figura.docs.events.resource_reload": "Called every time that the client resources are reloaded, allowing you to re-create or update resource texture references", From fc9cd820d7e55c170214d602af207c156bd0b619 Mon Sep 17 00:00:00 2001 From: UnlikePaladin <36827970+UnlikePaladin@users.noreply.github.com> Date: Mon, 11 Nov 2024 15:36:32 -0600 Subject: [PATCH 5/9] Fix entity and sprite tasks rendering red --- .../figura/model/rendering/ImmediateAvatarRenderer.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/common/src/main/java/org/figuramc/figura/model/rendering/ImmediateAvatarRenderer.java b/common/src/main/java/org/figuramc/figura/model/rendering/ImmediateAvatarRenderer.java index 12f0c035e..25806ade0 100644 --- a/common/src/main/java/org/figuramc/figura/model/rendering/ImmediateAvatarRenderer.java +++ b/common/src/main/java/org/figuramc/figura/model/rendering/ImmediateAvatarRenderer.java @@ -288,8 +288,10 @@ else if (updateLight && (l = Minecraft.getInstance().level) != null) { pivotOffsetter.light = customizationStack.peek().light; } - pivotOffsetter.alpha = Objects.requireNonNullElse(custom.alpha, 0.0f); - pivotOffsetter.overlay = Objects.requireNonNullElse(custom.overlay, 1); + if (custom.alpha != null) + pivotOffsetter.alpha = custom.alpha; + if (custom.overlay != null) + pivotOffsetter.overlay = custom.overlay; } // mid render function From 277d8b91314cb0ff0fcdf2c6654b1f7a39146008 Mon Sep 17 00:00:00 2001 From: UnlikePaladin <36827970+UnlikePaladin@users.noreply.github.com> Date: Wed, 20 Nov 2024 00:15:51 -0600 Subject: [PATCH 6/9] Fix the avatar wizard incorrectly generating Elytra Pivots --- .../main/java/org/figuramc/figura/wizards/AvatarWizard.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/src/main/java/org/figuramc/figura/wizards/AvatarWizard.java b/common/src/main/java/org/figuramc/figura/wizards/AvatarWizard.java index 90ed43d48..1e1e93e64 100644 --- a/common/src/main/java/org/figuramc/figura/wizards/AvatarWizard.java +++ b/common/src/main/java/org/figuramc/figura/wizards/AvatarWizard.java @@ -314,8 +314,8 @@ else if (hasCapeOrElytra) if (hasArmor) { model.addGroup(HelmetPivot, FiguraVec3.of(0, 24, 0), head); model.addGroup(ChestplatePivot, FiguraVec3.of(0, 24, 0), body); - model.addGroup(LeftElytra, FiguraVec3.of(0, 24, 0), body); - model.addGroup(RightElytra, FiguraVec3.of(0, 24, 0), body); + model.addGroup(LeftElytraPivot, FiguraVec3.of(0, 24, 0), body); + model.addGroup(RightElytraPivot, FiguraVec3.of(0, 24, 0), body); model.addGroup(LeftShoulderPivot, FiguraVec3.of(-6, 24, 0), leftArm); model.addGroup(RightShoulderPivot, FiguraVec3.of(6, 24, 0), rightArm); model.addGroup(LeggingsPivot, FiguraVec3.of(0, 12, 0), body); From 926b125009e2f30fd7d0585684b6a4d5255a264c Mon Sep 17 00:00:00 2001 From: UnlikePaladin <36827970+UnlikePaladin@users.noreply.github.com> Date: Wed, 20 Nov 2024 01:57:51 -0600 Subject: [PATCH 7/9] API additions and improvements --- .../org/figuramc/figura/entries/FiguraVanillaPart.java | 10 ++++++++++ .../figura/lua/api/vanilla_model/VanillaModelAPI.java | 6 ++++++ 2 files changed, 16 insertions(+) diff --git a/common/src/main/java/org/figuramc/figura/entries/FiguraVanillaPart.java b/common/src/main/java/org/figuramc/figura/entries/FiguraVanillaPart.java index 50de707b5..dff3cb964 100644 --- a/common/src/main/java/org/figuramc/figura/entries/FiguraVanillaPart.java +++ b/common/src/main/java/org/figuramc/figura/entries/FiguraVanillaPart.java @@ -3,6 +3,7 @@ import com.mojang.datafixers.util.Pair; import net.minecraft.client.model.EntityModel; import net.minecraft.client.model.geom.ModelPart; +import org.figuramc.figura.model.ParentType; import java.util.Collection; import java.util.function.Function; @@ -22,4 +23,13 @@ public interface FiguraVanillaPart { * the string is the parts name, case-insensitive, where the mod ID will be added into the final part name, as "ID_NAME" */ Collection, ModelPart>>> getParts(); + + /** + * @return returns a collection of a pair of the part name and a function to get its model part + * the function consists about giving the current Entity Model and getting a Model Part for that Entity + * the string is the parts name, case-insensitive, where the mod ID will be added into the final part name, as "ID_NAME", + * this version supports Parent Types, you can use either. + */ + + Collection, ModelPart>, ParentType>>> getPartsWithParent(); } diff --git a/common/src/main/java/org/figuramc/figura/lua/api/vanilla_model/VanillaModelAPI.java b/common/src/main/java/org/figuramc/figura/lua/api/vanilla_model/VanillaModelAPI.java index 1cccfc883..efa318353 100644 --- a/common/src/main/java/org/figuramc/figura/lua/api/vanilla_model/VanillaModelAPI.java +++ b/common/src/main/java/org/figuramc/figura/lua/api/vanilla_model/VanillaModelAPI.java @@ -293,6 +293,12 @@ public VanillaModelAPI(Avatar owner) { allParts.put(name, model); parts.add(model); } + for (Pair, ModelPart>, ParentType>> part : entrypoint.getPartsWithParent()) { + String name = ID + "_" + part.getFirst().toUpperCase(Locale.US); + VanillaModelPart model = new VanillaModelPart(owner, name, part.getSecond().getSecond(), part.getSecond().getFirst()); + allParts.put(name, model); + parts.add(model); + } // add to group list VanillaGroupPart group = new VanillaGroupPart(owner, ID, parts.toArray(new VanillaModelPart[0])); From c18f497aa0d96ce8b89b9d92e9580f9f049266de Mon Sep 17 00:00:00 2001 From: UnlikePaladin <36827970+UnlikePaladin@users.noreply.github.com> Date: Wed, 20 Nov 2024 02:24:15 -0600 Subject: [PATCH 8/9] Actually add custom permissions to avatar --- .../src/main/java/org/figuramc/figura/avatar/Avatar.java | 7 +++++++ .../src/main/java/org/figuramc/figura/config/Configs.java | 2 ++ .../org/figuramc/figura/entries/EntryPointManager.java | 4 ++++ 3 files changed, 13 insertions(+) diff --git a/common/src/main/java/org/figuramc/figura/avatar/Avatar.java b/common/src/main/java/org/figuramc/figura/avatar/Avatar.java index 66b5f3a9f..fbad4a74e 100644 --- a/common/src/main/java/org/figuramc/figura/avatar/Avatar.java +++ b/common/src/main/java/org/figuramc/figura/avatar/Avatar.java @@ -130,6 +130,7 @@ public class Avatar { public int animationComplexity; public final Instructions complexity; public final Instructions init, render, worldRender, tick, worldTick, animation; + public final Map customInstructions = new HashMap<>(); public final RefilledNumber particlesRemaining, soundsRemaining; private Avatar(UUID owner, EntityType type, String name) { this.owner = owner; @@ -146,6 +147,12 @@ private Avatar(UUID owner, EntityType type, String name) { this.particlesRemaining = new RefilledNumber(permissions.get(Permissions.PARTICLES)); this.soundsRemaining = new RefilledNumber(permissions.get(Permissions.SOUNDS)); this.entityName = name == null ? "" : name; + + for (Collection pluginPermissions : PermissionManager.CUSTOM_PERMISSIONS.values()) { + for (Permissions customPermission : pluginPermissions) { + customInstructions.putIfAbsent(customPermission.name, new Instructions(permissions.get(customPermission))); + } + } } public Avatar(UUID owner) { diff --git a/common/src/main/java/org/figuramc/figura/config/Configs.java b/common/src/main/java/org/figuramc/figura/config/Configs.java index e9b9769a4..2de5d5e2f 100644 --- a/common/src/main/java/org/figuramc/figura/config/Configs.java +++ b/common/src/main/java/org/figuramc/figura/config/Configs.java @@ -8,6 +8,7 @@ import org.figuramc.figura.avatar.local.CacheAvatarLoader; import org.figuramc.figura.avatar.local.LocalAvatarFetcher; import org.figuramc.figura.backend2.NetworkStuff; +import org.figuramc.figura.entries.EntryPointManager; import org.figuramc.figura.gui.FiguraToast; import org.figuramc.figura.gui.screens.ConfigScreen; import org.figuramc.figura.lua.FiguraLuaPrinter; @@ -270,6 +271,7 @@ public void onChange() { super.onChange(); PermissionManager.reinit(); LocalAvatarFetcher.reinit(); + EntryPointManager.reinit(); } }; public static final ConfigType.IPConfig diff --git a/common/src/main/java/org/figuramc/figura/entries/EntryPointManager.java b/common/src/main/java/org/figuramc/figura/entries/EntryPointManager.java index b32b54ff8..05cc383a6 100644 --- a/common/src/main/java/org/figuramc/figura/entries/EntryPointManager.java +++ b/common/src/main/java/org/figuramc/figura/entries/EntryPointManager.java @@ -25,6 +25,10 @@ public static void init() { EventsAPI.initEntryPoints(load("figura_event", FiguraEvent.class)); } + public static void reinit() { + PermissionManager.initEntryPoints(load("figura_permissions", FiguraPermissions.class)); + } + @ExpectPlatform private static Set load(String name, Class clazz) { throw new AssertionError(); From cae56efefeb693ee9303b5a2d05e6fe1742f3b95 Mon Sep 17 00:00:00 2001 From: UnlikePaladin <36827970+UnlikePaladin@users.noreply.github.com> Date: Wed, 20 Nov 2024 14:13:47 -0600 Subject: [PATCH 9/9] Rc.4 --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 652f9b8d2..77f828b90 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,7 +9,7 @@ mappings = 1 enabled_platforms = fabric,forge # Mod Properties -mod_version = 0.1.5-rc.3 +mod_version = 0.1.5-rc.4 maven_group = org.figuramc archives_base_name = figura assets_version = v2