Skip to content

Instantly share code, notes, and snippets.

View isXander's full-sized avatar

Xander isXander

View GitHub Profile
package dev.isxander.controlify.platform.client.fabric.hudapi;
import net.minecraft.resources.ResourceLocation;
public interface HudLayerRegistry {
void renderFirst(ResourceLocation thisElement, HudLayerRenderer renderer);
void renderLast(ResourceLocation thisElement, HudLayerRenderer renderer);
@isXander
isXander / minecraft-data-gui.json5
Created May 13, 2025 19:37
This is an example of how Minecraft Java might implement data-driven GUI screens.
```json
// minecraft/gui/components/server_list.json
{
"params": {
"servers": { // `Type`
"type": "minecraft:list", // `Type`
"item_type": { // `Type`
"type": "minecraft:compound",
"components": { // `map<name, Type>`
"name": "minecraft:component",

The calculation you’re using is essentially a 2D cross product (or the out‑of‑plane component of a 3D cross product) that’s being applied in a torque context. In physics, torque (τ) is defined as the cross product of the moment arm (r) and the applied force (F):

\tau = \mathbf{r} \times \mathbf{F}.

For planar problems (here using x and z as the axes), the scalar torque is usually given by:

\tau_y = r_x F_z - r_z F_x.

Your expression,

blueprint:
name: Update notifications
description: Send notifications for new updates and install or skip on action
homeassistant:
min_version: 2022.4.0
domain: automation
input:
update_entities:
name: Update entities
description:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007ffba6a077af, pid=233636, tid=235788
#
# JRE version: OpenJDK Runtime Environment Temurin-21.0.3+9 (21.0.3+9) (build 21.0.3+9-LTS)
# Java VM: OpenJDK 64-Bit Server VM Temurin-21.0.3+9 (21.0.3+9-LTS, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, windows-amd64)
# Problematic frame:
# C [jna648304010373265569.dll+0x77af]
#
package nl.enjarai.doabarrelroll;
import net.minecraft.entity.LivingEntity;
import net.minecraft.fluid.Fluids;
import net.minecraft.particle.ParticleEffect;
import net.minecraft.particle.ParticleTypes;
import net.minecraft.util.hit.BlockHitResult;
import net.minecraft.util.math.Vec3d;
import net.minecraft.world.BlockStateRaycastContext;
import net.minecraft.world.RaycastContext;
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
`java-library`
kotlin("jvm") version "1.9.22"
id(/*"dev.architectury.loom"*/"fabric-loom") version "1.6.+"
id("me.modmuss50.mod-publish-plugin") version "0.5.+"
`maven-publish`
import de.undercouch.gradle.tasks.download.Download
plugins {
java
id("fabric-loom") version "1.6.+"
id("me.modmuss50.mod-publish-plugin") version "0.5.+"
`maven-publish`
pub fn receive_generated_chunks(&mut self, texture_atlas: &Arc<TextureAtlas>) {
while let Ok((coords, state)) = self.chunkgen_thread_receiver.try_recv() {
let (x, z) = Self::unpack_coordinates(coords);
println!("Generated chunk at {},{}", x, z);
self.chunks.insert(coords, state);
let state = self.chunks.get(&coords).unwrap();
if let ChunkState::Loaded(LoadedChunk::Stored { chunk }) = state {