#Technical blocks

4210 messages ยท Page 5 of 5 (latest)

dire blade
#

end_portal.png as a texture could use the end portal thing

woven nest
#

That would mean the end portal would be static, but I guess there could be a way you could render the end portal into a static texture through a native image, bind it to an identifier, and render it in a model

dire blade
#

I guess the shader approach would work then

#

hopefully it doesn't conflict with stuff

woven nest
#

Idk how that works

#

I was saying you could render the texture from the block once, and copy the output pixels into a new texture, then use that texture

dire blade
#

generate and freeze basically

woven nest
#

Yeah

#

Although mcmeta might let you animate a bit

charred pasture
#

so shaders or mcmeta

woven nest
#

Probably both

#

But whatever works works

dire blade
#

I think shaders would work better

charred pasture
#

alright so im gonna move the main branch

#

to version 1.21.6

#

there could be changes

#

enough to warrant a tiny code base change

#

from 1.21.5 to 1.21.6

#

for the shader thing

#

(i have no idea what i am doing)

woven nest
charred pasture
#

diving into it blindfolded

charred pasture
#

yeah souhh

#

got me some cave vines

#

well it doesnt actually animate in the gui

#
package com.github.cargocats.illicitblocks.client.mixin;

import com.github.cargocats.illicitblocks.IllicitBlocks;
import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation;
import net.minecraft.client.render.RenderLayer;
import net.minecraft.client.render.VertexConsumer;
import net.minecraft.client.render.VertexConsumerProvider;
import net.minecraft.client.render.item.ItemRenderState;
import net.minecraft.client.render.item.ItemRenderer;
import net.minecraft.client.render.model.BakedQuad;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.item.ItemDisplayContext;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;

import java.util.List;

@Mixin(ItemRenderer.class)
public class ItemRendererMixin {
    @WrapOperation(
            method = "renderItem(Lnet/minecraft/item/ItemDisplayContext;Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider;II[ILjava/util/List;Lnet/minecraft/client/render/RenderLayer;Lnet/minecraft/client/render/item/ItemRenderState$Glint;)V",
            at = @At(
                    value = "INVOKE",
                    target = "Lnet/minecraft/client/render/item/ItemRenderer;getItemGlintConsumer(Lnet/minecraft/client/render/VertexConsumerProvider;Lnet/minecraft/client/render/RenderLayer;ZZ)Lnet/minecraft/client/render/VertexConsumer;"
            )
    )
    private static VertexConsumer modifyRenderLayer(
            VertexConsumerProvider provider,
            RenderLayer originalLayer,
            boolean solid,
            boolean glint,
            Operation<VertexConsumer> original
    ) {
        return original.call(provider, RenderLayer.getEndPortal(), solid, glint);
    }
}

#

idk how to actually like

#

target a singular item

#

it has this but

#

    public static void renderItem(
        ItemDisplayContext displayContext,
        MatrixStack matrices,
        VertexConsumerProvider vertexConsumers,
        int light,
        int overlay,
        int[] tints,
        List<BakedQuad> quads,
        RenderLayer layer,
        ItemRenderState.Glint glint
    ) {
#

the item display context is only for

#

the context of where the item is

#

it all comes back to here

#

damn i dont really want to mixin into all those places

woven nest
#

Beds look to be exempt from it, what do they do differently?

charred pasture
#

    public static void renderItem(
        ItemDisplayContext displayContext,
        MatrixStack matrices,
        VertexConsumerProvider vertexConsumers,
        int light,
        int overlay,
        int[] tints,
        List<BakedQuad> quads,
        RenderLayer layer,
        ItemRenderState.Glint glint
    ) {
        VertexConsumer vertexConsumer;
        if (glint == ItemRenderState.Glint.SPECIAL) {
            MatrixStack.Entry entry = matrices.peek().copy();
            if (displayContext == ItemDisplayContext.GUI) {
                MatrixUtil.scale(entry.getPositionMatrix(), 0.5F);
            } else if (displayContext.isFirstPerson()) {
                MatrixUtil.scale(entry.getPositionMatrix(), 0.75F);
            }

            vertexConsumer = getSpecialItemGlintConsumer(vertexConsumers, layer, entry);
        } else {
            vertexConsumer = getItemGlintConsumer(vertexConsumers, layer, true, glint != ItemRenderState.Glint.NONE);
        }
#

i only wrap op here

#
            vertexConsumer = getItemGlintConsumer(vertexConsumers, layer, true, glint != ItemRenderState.Glint.NONE);
#

so their glint

#

is set to special

dire blade
#

in #rendering-fails whoops

dire blade
woven nest
#

-# I know what they do differently. Just trying to let cat figure it out lol

dire blade
#

how did that webm thing happen

dire blade
#

so with the end stuff

#

does it sorta work

charred pasture
#

no

#

i didn't try to make it only work

#

for the end portal yet

dire blade
#

I see

#

I think like

#

all we really need is just a solid rendered texture

dire blade
#

@charred pasture I know it has been a while with this

#

but remember the compatibility thing

charred pasture
charred pasture
dire blade
#

24w14a - 24w45a, and 1.21.4 - 25w03a

charred pasture
#

okay

dire blade
#

would you be fine with porting it to those ranges

charred pasture
#

okay

dire blade
#

wait

#

did you release the end portal thing yet

charred pasture
#

erm no

dire blade
#

I think just

charred pasture
#

cause i have no idea

#

how to do it

dire blade
#

that'll do it

#

having it be animated isn't very important

charred pasture
#

static texture

#

?

dire blade
charred pasture
#

okay

dire blade
#

maybe have it generate a square texture for the end portal on startup

charred pasture
#

erm

#

wdym

#

by square

#

by end portal you mean the black thing

dire blade
#

yeah

dire blade
charred pasture
#

okay

charred pasture
#

ive just decided

#

to do this

#

this is the end portal

#

end gateway

#

i have pushed the changes; also you might want to let me know of errors

#

in the version ranges that doesnt work

#

do you think developing in the middle of those interval would be fine

#

or developing on the end of the interval

dire blade
#

here's 24w14a - 24w46a

#

and 1.21.4 - 25w03a

charred pasture
#

okay

charred pasture
#

btw why do u need those specific

#

snapshot versions

#

i made a branch for 25w03a

#

and pushed the relevant changes

charred pasture
#

i did the same to 24w46a

dire blade
#

but the crash would be the only thing in theory stopping it from working in those version ranges

charred pasture
#

did you test

#

i tested them for those two versions only in dev

dire blade
#

for some fun stuff

#

it works with sinytra

#

1.20.1 at least

charred pasture
#

huh it works with sinytra for

#

1.20.1

charred pasture
dire blade
#

so I wanted to test illicitblocks on it for fun

charred pasture
#

okay

#

probably

#

it doesn't go into much deep things

dire blade
#

building 24w46a now

#

I am incredibly lazy

#

wtf why is it crashing with 255

#

24w46a works

#

24w44a doesn't

woven nest
#

!yc 10516 24w44a

graceful sequoiaBOT
#

no matches for the given class name, MC version and query namespace

woven nest
#

Fun

dire blade
#

!yc 10521 24w44a

graceful sequoiaBOT
#

no matches for the given class name, MC version and query namespace

dire blade
#

AAAAAAAAAAAAAAAAAAAAAA

woven nest
#

!yc 10516 24w46a

graceful sequoiaBOT
#
24w46a matches

Names

Yarn: net/minecraft/client/render/item/model/special/SpecialModelRenderer$Unbaked

Yarn Access Widener

accessible class net/minecraft/client/render/item/model/special/SpecialModelRenderer$Unbaked
Javadoc

woven nest
#

Ah yeah, that could make sense

dire blade
#

the most unfortunate version choice

#

oh also it crashes with 1.21.4

charred pasture
#

i feel like stonecutter would be really nice

#

instead of having to make a gazillion branches

#

for tiny changes

dire blade
#

yeah

woven nest
#

!yc 2378

graceful sequoiaBOT
#
1.21.7 matches

Names

Yarn: net/minecraft/registry/Registry

Yarn Access Widener

accessible class net/minecraft/registry/Registry
Javadoc

dire blade
woven nest
#

!ym 46765

graceful sequoiaBOT
#
1.21.7 matches

Class Names

Yarn: net/minecraft/registry/RegistryWrapper$Impl

Method Names

Yarn: getKey

Yarn Method Descriptor

()Lnet/minecraft/registry/RegistryKey;
Yarn Access Widener

accessible method net/minecraft/registry/RegistryWrapper$Impl getKey ()Lnet/minecraft/registry/RegistryKey;
Yarn Mixin Target

Lnet/minecraft/registry/RegistryWrapper$Impl;getKey()Lnet/minecraft/registry/RegistryKey;
Javadoc

dire blade
#

I think 24w46a was like the worst version choice possible

charred pasture
#

me when

#

the version i made only works for that version

#

and a release below or above crashes

dire blade
#

does it seriously only work with one version

#

when I found out that it indeed does

#

just concern

#

ok

#

thank god

#

the 25w03a version

#

works with 1.21.4

#

if it didn't I don't know what I would've done

#

AAAAAAAAAAAAAAAAAAAAA

#

it crashes when loading the inventory

charred pasture
#

erm

dire blade
#

what have I done

#

NO

#

it's another snapshot unique version

#

I hate this

woven nest
#

I mean, generally snapshots are tumultuous

charred pasture
#

๐Ÿ‡

charred pasture
#

!ym method_58694 1.21.4

graceful sequoiaBOT
#
1.21.4 matches

Class Names

Official: dua$b
Intermediary: net/minecraft/class_2586$class_9473
Yarn: net/minecraft/block/entity/BlockEntity$ComponentsAccess

Method Names

Official: a
Intermediary: method_58694
Yarn: get

Yarn Method Descriptor

(Lnet/minecraft/component/ComponentType;)Ljava/lang/Object;
Yarn Access Widener

accessible method net/minecraft/block/entity/BlockEntity$ComponentsAccess get (Lnet/minecraft/component/ComponentType;)Ljava/lang/Object;
Yarn Mixin Target

Lnet/minecraft/block/entity/BlockEntity$ComponentsAccess;get(Lnet/minecraft/component/ComponentType;)Ljava/lang/Object;
Javadoc

dire blade
#

1.21.7 works

charred pasture
#

!yc class_1799 1.21.4

graceful sequoiaBOT
#
1.21.4 matches

Names

Official: cwq
Intermediary: net/minecraft/class_1799
Yarn: net/minecraft/item/ItemStack

Yarn Access Widener

accessible class net/minecraft/item/ItemStack
Javadoc

dire blade
#

if it hadn't I

charred pasture
#

erm

dire blade
#

just pure misfortune

charred pasture
#

the code base is probably

#

already very fragmented

#

one version might get changes like the end portal texture change

#

but then i have to also backport these changes to every other single other branch

dire blade
#

yeah

#

with this mod

dire blade
#

where there are small patches

dire blade
#

I think before anything though

#

let's see if 24w14a could work

#

we have a potato version but that's J17

dire blade
#

@charred pasture can you try illicitblocks on 1.21.8/1.21.7

#

sorry about the ping but just the sheer volatility of the mod with snapshots and stuff might make it somehow incompatible

charred pasture
#

okau

woven nest
#

There theoretically shouldn't be any problems

dire blade
woven nest
#

1.21.5 and 1.21.6 were massive updates

dire blade
#

also 24w46a -> 1.21.3 rc1

#

most unlucky port versions ever

dire blade
#

for 1.21.7/8