#Technical blocks
4210 messages ยท Page 5 of 5 (latest)
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
oh yeah mcmeta stuff
I guess the shader approach would work then
hopefully it doesn't conflict with stuff
Oh I wasn't referring to that
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
yeah
generate and freeze basically
so shaders or mcmeta
I think shaders would work better
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)
(don't worry, neither does anyone else)
diving into it blindfolded
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
I don't think you have to, but can't look currently
Beds look to be exempt from it, what do they do differently?
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
that's fine
in #rendering-fails whoops
they're block entities
-# I know what they do differently. Just trying to let cat figure it out lol
how did that webm thing happen
@charred pasture I know it has been a while with this
but remember the compatibility thing

wdym
it crashing in two version ranges
24w14a - 24w45a, and 1.21.4 - 25w03a
okay
would you be fine with porting it to those ranges
okay
erm no
I think just
make it perfectly still
that'll do it
having it be animated isn't very important
yeah I guess
okay
maybe have it generate a square texture for the end portal on startup
yeah
I meant static
okay
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
I had mclo.gs
here's 24w14a - 24w46a
and 1.21.4 - 25w03a
okay
btw why do u need those specific
snapshot versions
i made a branch for 25w03a
and pushed the relevant changes
i did the same to 24w46a
compatibility I guess
but the crash would be the only thing in theory stopping it from working in those version ranges
wdym for some fun stuff
a friend had a server running FML 1.20.1
so I wanted to test illicitblocks on it for fun
building 24w46a now
I am incredibly lazy
wtf why is it crashing with 255
24w46a works
24w44a doesn't
24w14a: https://mclo.gs/rAhw2UL
24w44a: https://mclo.gs/Exkpo2B
!yc 10516 24w44a
no matches for the given class name, MC version and query namespace
Fun
no matches for the given class name, MC version and query namespace
AAAAAAAAAAAAAAAAAAAAAA
!yc 10516 24w46a
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
Ah yeah, that could make sense
i feel like stonecutter would be really nice
instead of having to make a gazillion branches
for tiny changes
yeah
!yc 2378
Names
Yarn: net/minecraft/registry/Registry
Yarn Access Widener
accessible class net/minecraft/registry/Registry
Javadoc
we just need something that works across versions
!ym 46765
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
I think 24w46a was like the worst version choice possible
me when
the version i made only works for that version
and a release below or above crashes

when I was going through everything I was like
does it seriously only work with one version
when I found out that it indeed does
just 
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
erm
I mean, generally snapshots are tumultuous
๐
!ym method_58694 1.21.4
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
1.21.7 works
!yc class_1799 1.21.4
Names
Official: cwq
Intermediary: net/minecraft/class_1799
Yarn: net/minecraft/item/ItemStack
Yarn Access Widener
accessible class net/minecraft/item/ItemStack
Javadoc
if it hadn't I
erm
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
I bet there could be a way to possibly have some multi version thing
where there are small patches
I think before anything though
let's see if 24w14a could work
we have a potato version but that's J17
@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
okau
There theoretically shouldn't be any problems
it somehow crashed on 1.21.5 release candidate so
Yeah, that make sense
1.21.5 and 1.21.6 were massive updates