Skip to content

Instantly share code, notes, and snippets.

package net.neoforged.neoforge.items;
import net.minecraft.world.item.ItemStack;
import org.jetbrains.annotations.Nullable;
public class SlotItemHandlerImmutable extends SlotItemHandler {
// Vanilla MC code modifies the stack returned by `getItem()` directly, but it
// calls `setChanged()` when that happens, so we just cache the returned stack,
// and set it when `setChanged()` is called.
@Nullable
@will-y
will-y / gist:5232562
Created March 24, 2013 16:31
Math equation game
package videogaming;
import javax.swing.*;
public class Game_NumberCruncher {
private static class MathProblem {
private String question;
private int answer;