Skip to content

Instantly share code, notes, and snippets.

View TheYule's full-sized avatar

The Yule TheYule

View GitHub Profile
@Softwave
Softwave / README.md
Last active November 27, 2025 14:05
Fibonacci Program

Fib

Simple fibonacci number calculator.

Usage: fib nth Fibonacci number

@TheYule
TheYule / ClientEvents.java
Last active August 7, 2023 13:59
Custom arrow for Minecraft Forge
@Mod.EventBusSubscriber(modid = "modid goes here", bus = Mod.EventBusSubscriber.Bus.MOD, value = Dist.CLIENT)
public class ClientEvents {
@SubscribeEvent
public static void onRegisterEntityRenderers(EntityRenderersEvent.RegisterRenderers event) {
// Register the arrow renderer
event.registerEntityRenderer(EntityInit.CUSTOM_ARROW_ENTITY.get(), CustomArrowEntityRenderer::new);
}
}
@GizmoTheMoonPig
GizmoTheMoonPig / Materials.md
Last active July 23, 2024 03:47
Materials: where did they go?

Starting in 1.20, the Material class has completely disappeared and has been replaced with a series of properties that are chained to BlockBehavior.Properties.of. This list exists so you can easily figure out which propeties to use to replace the old materials.

Every Material here gives its default MapColor (previously known as MaterialColor), regardless of if it had one or not. It also defines which properties to use to replicate the exact behavior used previously.

The very bottom of this file defines the more complicated replacements to certain material properties.

  • AIR - No MapColor, replaceable
  • STRUCTURAL_AIR - No MapColor, replaceable
  • PORTAL - No MapColor, PushReaction.BLOCK
  • CLOTH_DECORATION - MapColor.WOOL, ignitedByLava
@ChampionAsh5357
ChampionAsh5357 / 1194-120-primer.md
Last active June 22, 2025 13:23
Minecraft 1.19.4 -> 1.20 Mod Migration Primer

Minecraft 1.19.4 -> 1.20 Mod Migration Primer

This is a high level, non-exhaustive overview on how to migrate your mod from 1.19.4 to 1.20 using Forge.

This primer is licensed under the Creative Commons Attribution 4.0 International, so feel free to use it as a reference and leave a link so that other readers can consume the primer.

If there's any incorrect or missing information, please leave a comment below. Thanks!

Pack Changes

@GentlemanRevvnar
GentlemanRevvnar / 1.19-custom_structures_with_jigsaws.md
Last active February 27, 2026 23:08
Simple guide for using jigsaws in custom structures in 1.19

Custom data pack structures with jigsaws in 1.19

(Last updated: 1.19)

This is a direct conversion for 1.19, of my original guide for 1.18.2.
For the sake of continuity i will show everything from groundup again. I would show the new 1.19 sections in different colour, but github doesn't allow that 😐

This is technically a shameless rip/edit of Misode's guide (go give that beautiful man a heart under his guides) that shows the traditional use of newly implemented custom structure system. I myself want to tackle the jigsaw aspect a bit, hence i'm making my own guice based on his. I will show how to create a data pack that adds custom structures to the world that also utilize jigsaw blocks. So treat this as a basic jigsaw guide in world generation. There is a download for the datapack at the end of this guide.

**Always leave the world and rejoin to apply the new changes! Because traditional /reload or `/datapack disable & enabl

<!DOCTYPE html>
<html lang="en">
<head>
<link rel="icon" type="image/x-icon" href="/favicon.ico">
<title>Rebane's Discord Colored Text Generator</title>
<meta charset="UTF-8">
<meta name="description" content="Rebane's Discord Colored Text Generator">
<meta name="author" content="rebane2001">
<style>
/*
@munrocket
munrocket / wgsl_noise.md
Last active February 24, 2026 22:02
WGSL Noise Algorithms

WGSL Noise Algorithms

Good and fast integer hash

// https://www.pcg-random.org/
fn pcg(n: u32) -> u32 {
    var h = n * 747796405u + 2891336453u;
    h = ((h >> ((h >> 28u) + 4u)) ^ h) * 277803737u;
    return (h >> 22u) ^ h;
}
@gigaherz
gigaherz / 00ExampleRender.java
Last active July 27, 2024 19:47
Animated Gif for Minecraft -- Public Domain, or the closest to it, see CC0 at https://creativecommons.org/share-your-work/public-domain/cc0/
package gigaherz.eyes.client;
import gigaherz.eyes.EyesInTheDarkness;
import gigaherz.eyes.entity.EyesEntity;
import net.minecraft.client.Minecraft;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.client.event.ModelRegistryEvent;
import net.minecraftforge.client.event.RenderGameOverlayEvent;
import net.minecraftforge.event.TickEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
@Obydux
Obydux / Fabric-Quilt-Server-Optimization.md
Last active February 19, 2026 12:14
Fabric/Quilt Server Optimization

Fabric/Quilt Server Optimization

This has updated for 1.20.4, all of the optimization mods mentioned here are compatible with each other and don't affect vanilla behaviour by default.

Mods

package gigaherz.signbutton;
import com.mojang.blaze3d.vertex.IVertexBuilder;
import net.minecraft.client.renderer.IRenderTypeBuffer;
import net.minecraft.client.renderer.RenderType;
public class MultiplyAlphaRenderTypeBuffer implements IRenderTypeBuffer
{
private final IRenderTypeBuffer inner;
private final float constantAlpha;