SimpleContainerData .java

net.minecraft.world.inventory.SimpleContainerData (class, 25 lines): implements ContainerData. members: ints, getCount, set, get.

net.minecraft.world.inventoryclass25 linescommon454 B

Implements

API Surface (3)

int get(final int dataId)
void set(final int dataId, final int value)
int getCount()

Fields & Constants (1)

ints

Code Graph: Dependencies (1)

Edges (calls / imports / inherits / references) resolved by graphify from the AST. Every chip opens the class source.

Full Source

SimpleContainerData.java25 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.world.inventory;
2
3
public class SimpleContainerData implements ContainerData {
4
	private final int[] ints;
5
6
	public SimpleContainerData(final int count) {
7
		this.ints = new int[count];
8
	}
9
10
	@Override
11
	public int get(final int dataId) {
12
		return this.ints[dataId];
13
	}
14
15
	@Override
16
	public void set(final int dataId, final int value) {
17
		this.ints[dataId] = value;
18
	}
19
20
	@Override
21
	public int getCount() {
22
		return this.ints.length;
23
	}
24
}
25

Decompiled Minecraft 26.3 source of SimpleContainerData (net/minecraft/world/inventory/SimpleContainerData.java) with Mojang official mappings, stored verbatim on the site.