Skip to content

Fixed Issues & Extra details#1576

Merged
LtxProgrammer merged 25 commits intoLtxProgrammer:0.15-featuresfrom
Foxyas:0.15-features
Jan 16, 2026
Merged

Fixed Issues & Extra details#1576
LtxProgrammer merged 25 commits intoLtxProgrammer:0.15-featuresfrom
Foxyas:0.15-features

Conversation

@Foxyas
Copy link
Contributor

@Foxyas Foxyas commented Jan 5, 2026

Proposed Changes

  • Added a fail-safe to ensure a grabbed entity is always released before a new grab is applied
  • A grabber will only be able to "steal" a grabbed entity if it "current grabber" is not in suit mode
  • fixed Infuser Screen not rendering the "maleFemaleButton"
  • fixed infuser Screen labels being with a odd position
  • now a latex cover state will die when stricken by lightning
  • now grabbed entities have they dimension synced with the grabber

Foxyas added 4 commits January 4, 2026 20:34
Separated client-side and server-side logic in the grab entity ability to ensure correct packet handling and entity interaction. Updated packet sending to use PacketDistributor on the server side and fixed conditional checks for entity grabbing.
@Foxyas
Copy link
Contributor Author

Foxyas commented Jan 5, 2026

i'm testing in a various contexts, and I'm trying to put together the most acceptable solution.

For now, I'll try to implement a "steal grab" solution, but it's easy to create a simple "no grabbed rule" if you don't like that feature.

@Foxyas
Copy link
Contributor Author

Foxyas commented Jan 5, 2026

there's a function that is not used but works.. i have almost sure that you will probably added but 10 times better tbh..

@Foxyas
Copy link
Contributor Author

Foxyas commented Jan 5, 2026

Possible Solutions for a "steal the grabber", please select one for me to follow

  • idleTick state update
    if the grabber of the grabbed entity isn't the same as the user just release the entity;
    code for this
    GrabEntityAbilityInstance.java

  • update the state of the grabber from entity
    if the grabber of the grabbed entity isn't null try to release the entity from the old grabber and then grabbing them.
    GrabEntityAbilityInstance.java

i really would love to see this feature in the mod, logically speaking nothing really stop a player to do that right?

@Foxyas
Copy link
Contributor Author

Foxyas commented Jan 5, 2026

i follow the first option because i my opnion is the most okay to have.

@Foxyas Foxyas changed the title 0.15 features Grab Ability improvements Jan 5, 2026
@Foxyas
Copy link
Contributor Author

Foxyas commented Jan 5, 2026

i'm thinking in make a "keyStrength" by more modular, maybe making into a method or getting a attribute for the player or just use the thorns enchantment applied into the math.

Foxyas and others added 4 commits January 6, 2026 15:34
Introduces LightingBoltMixin to clear latex cover state when a lightning bolt strikes a block. Updates changed.mixins.json to include the new mixin, ensuring latex is removed due to shock vulnerability.
@Foxyas Foxyas changed the title Grab Ability improvements Grab Ability improvements & Fix Issues Jan 6, 2026
@Foxyas
Copy link
Contributor Author

Foxyas commented Jan 6, 2026

fixed infuser screen small issues and added a simple detail for when a latex cover state is stricken by lightning

@Foxyas Foxyas changed the title Grab Ability improvements & Fix Issues Grab Ability improvements, Fixed Issues & Extra details Jan 6, 2026
RenderSystem.enableDepthTest();
Font font = minecraft.font;
graphics.setColor(1.0F, 1.0F, 1.0F, this.alpha);
graphics.setColor(1.0F, 1.0F, 1.0F, 1.0f);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i change that to use a preset alpha because for some reason it was affecting the render, it may is because of my device soo idk

}

public void renderWidget(GuiGraphics graphics, int p_93844_, int p_93845_, float p_93846_) {
super.renderWidget(graphics, p_93844_, p_93845_, p_93846_);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the widgets don't go well with stacks... and the "text" of the switch button was going in the way of the button switch
to be safe i just move the render to before the button render


@Override
protected void updateWidgetNarration(NarrationElementOutput p_259858_) {
protected void updateWidgetNarration(@NotNull NarrationElementOutput p_259858_) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

inteliJ auto did that

this.recipeBookComponent.init(this.width, this.height, this.minecraft, this.widthTooNarrow, this.menu);
this.leftPos = this.recipeBookComponent.updateScreenPosition(this.width, this.imageWidth);
this.addRenderableWidget(new ImageButton(this.leftPos + 16, this.height / 2 - 25, 20, 18, 0, 0, 19, RECIPE_BUTTON_LOCATION, (p_98484_) -> {
this.addRenderableWidget(new ImageButton(this.leftPos + 16, this.height / 2 - 30, 20, 18, 0, 0, 19, RECIPE_BUTTON_LOCATION, (p_98484_) -> {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i added a simple offset into the recipe book because it had a very odd position, being inside of the "player inventory label text"

fixed entity dimension not being sync
LtxProgrammer added a commit that referenced this pull request Jan 9, 2026
…d by Foxyas in #1576.

Signed-off-by: LtxPgm <ltxprogrammer@outlook.com>
Comment on lines +27 to +34
@Inject(method = "powerLightningRod", at = @At("TAIL"), cancellable = false)
private void latexCoverIsStruckByLighting(CallbackInfo ci) {
// Latex is Weak to Shock, and a LightingBolt is a very powerful shock soo it die when struck by it
BlockPos strikePosition = this.getStrikePosition();
Level level = level();
LatexCoverState strikePositionCoverState = LatexCoverState.getAt(level, strikePosition);
if (strikePositionCoverState.isAir()) return;
LatexCoverState.setAtAndUpdate(level, strikePosition, ChangedLatexTypes.NONE.get().defaultCoverState());
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this idea as well. Perhaps it could be further developed to electrocute nearby latexes that are standing on (or are submerged within) latex cover.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will make a simple hook method in the LatexCoverState called "whenStuckByLighting" for such event, leaving it be by a single mixin wouldn't be that dynamic :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i did some changes and now the "shock" spreads through the latex because it is technically a fluid and also because the white latexes are almost 100% connected to it "fluid" which would make them feel the shock even when more far away.

Suggestions.
the player could be able to "hit" the latex cover state with a stun weapon to give any white latex nearby the shock effect for some seconds, also it could increase the nearby cover states saturation making it die after some time.
the latex cover state could have higher layer basing on it saturation being mapped with something like this.
higher (15) -> small puddle
lower (0) -> big puddle

@Foxyas
Copy link
Contributor Author

Foxyas commented Jan 10, 2026

Alright! I will resolve the conflict and try to apply a "shock area spread" for nearby white latexes and for players i will make a check to see if they are submerged near to the strike posision.

Idk if it would be necessary much code because the thunder already has a bit hitbox soo i would just make a loop that would go through afew cover stats until find a entity or reach "max depth"

public static void syncEntityPosRotWithEntity(LivingEntity set, LivingEntity get) {
if (get.level() instanceof ServerLevel getServerLevel) {
Level setLevel = set.level();
if (getServerLevel.dimension().equals(setLevel.dimension())) set.changeDimension(getServerLevel);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A dimension Sync with a small check to avoid calling when not necessary

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I forgot to comment on this when I saw it, but the code to change dimensions will only run when the two entities are in the same dimension (getServerLevel.dimension().equals(setLevel.dimension())). Additionally, an ITeleporter can be defined to specify certain teleport info (positioning, teleport sound).

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, you can just do a reference equality check between the two levels: getServerLevel != set.level(). In the context of the server, each dimension has its' own ServerLevel object. Therefor, if two entities are in the same level, then they are in the same dimension.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lastly, there may need to be special case handling code where Minecraft will replace an entity reference with a new entity on .changeDimension(), invalidating the grabbed entity reference. Though this shouldn't happen with grabbed players.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to avoid doing something that may become spaghetti code i will leave that for you.

@Foxyas Foxyas requested a review from LtxProgrammer January 10, 2026 16:48
@Foxyas
Copy link
Contributor Author

Foxyas commented Jan 10, 2026

the re-requesta was a miss click
just ignore for while

@Foxyas
Copy link
Contributor Author

Foxyas commented Jan 10, 2026

check it out now,
i made a record to stone a "latex node" and now any pure white latex entity (Beheremoth and tf'd players too) that has a block position that is connected to the striked latex cover State is supposed to be affected.
and also for players i made a special lag that will always executate if the player is navigating in white latex

@Foxyas
Copy link
Contributor Author

Foxyas commented Jan 10, 2026

i added more range for the entity detection. i think that there's no problem in having a higher hitbox to detect entities. the check to see if they are or not touching the latex cover already take cares of the logic to who will get the damage

@Foxyas
Copy link
Contributor Author

Foxyas commented Jan 10, 2026

https://streamable.com/wk6wbh

funny ahh behavior

Foxyas and others added 6 commits January 10, 2026 15:06
Refactored LatexType to trigger a stun animation when entities are shocked and fixed logic for latex removal on lightning strike. Updated LightingBoltMixin to intercept fire spawning and cancel it if latex cover is present, ensuring correct latex cover behavior when struck by lightning.
removed not used imports
@Foxyas Foxyas changed the title Grab Ability improvements, Fixed Issues & Extra details Fixed Issues & Extra details Jan 16, 2026
Copy link
Owner

@LtxProgrammer LtxProgrammer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll make some adjustments in LatexType and TransfurVariantInstance.

@LtxProgrammer LtxProgrammer merged commit 7ee7b76 into LtxProgrammer:0.15-features Jan 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants