Skip to content

Commit 14eae6d

Browse files
committed
figured out how to do items, kinda
1 parent e98a714 commit 14eae6d

File tree

5 files changed

+59
-11
lines changed

5 files changed

+59
-11
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package net.hex_chalkcircles.blocks;
2+
3+
import at.petrak.hexcasting.common.blocks.circles.BlockSlate;
4+
5+
public class BlockDustRune extends BlockSlate {
6+
7+
public BlockDustRune(Properties p_53182_) {
8+
super(p_53182_);
9+
// TODO Auto-generated constructor stub
10+
}
11+
12+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
package net.hex_chalkcircles.item;
2+
3+
import at.petrak.hexcasting.common.items.ItemStaff;
4+
import at.petrak.hexcasting.common.items.magic.ItemMediaHolder;
5+
import at.petrak.hexcasting.common.items.magic.ItemPackagedHex;
6+
import net.minecraft.world.item.ItemStack;
7+
import net.minecraft.world.entity.Entity;
8+
9+
public class ItemChalkStick extends ItemMediaHolder {
10+
11+
public ItemChalkStick(Properties pProperties) {
12+
super(pProperties);
13+
// TODO Auto-generated constructor stub
14+
}
15+
16+
@Override
17+
public boolean canProvideMedia(ItemStack stack) {
18+
// TODO Auto-generated method stub
19+
return false;
20+
}
21+
22+
@Override
23+
public boolean canRecharge(ItemStack stack) {
24+
// TODO Auto-generated method stub
25+
return false;
26+
}
27+
28+
29+
30+
31+
}
Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,32 @@
11
package net.hex_chalkcircles.registry;
22

3+
import static net.hex_chalkcircles.Hex_chalkcircles.id;
4+
35
import dev.architectury.registry.CreativeTabRegistry;
46
import dev.architectury.registry.registries.DeferredRegister;
57
import dev.architectury.registry.registries.RegistrySupplier;
68
import net.hex_chalkcircles.Hex_chalkcircles;
7-
import net.minecraft.world.item.Item;
9+
import net.hex_chalkcircles.item.*;
10+
import net.minecraft.core.Registry;
811
import net.minecraft.world.item.CreativeModeTab;
12+
import net.minecraft.world.item.Item;
913
import net.minecraft.world.item.ItemStack;
10-
import net.minecraft.core.Registry;
11-
12-
import static net.hex_chalkcircles.Hex_chalkcircles.id;
1314

1415
public class Hex_chalkcirclesItemRegistry {
1516
// Register items through this
1617
public static final DeferredRegister<Item> ITEMS = DeferredRegister.create(Hex_chalkcircles.MOD_ID, Registry.ITEM_REGISTRY);
18+
private static final Item.Properties CHALKCIRCLES_UNSTACKABLE = new Item.Properties().stacksTo(1);
19+
1720

1821
public static void init() {
1922
ITEMS.register();
2023
}
2124

2225
// A new creative tab. Notice how it is one of the few things that are not deferred
23-
public static final CreativeModeTab DUMMY_GROUP = CreativeTabRegistry.create(id("dummy_group"), () -> new ItemStack(Hex_chalkcirclesItemRegistry.DUMMY_ITEM.get()));
26+
public static final CreativeModeTab CHALKCIRCLES_GROUP = CreativeTabRegistry.create(id("chalk_circles"), () -> new ItemStack(Hex_chalkcirclesItemRegistry.CHALKSTICK_ITEM.get()));
2427

2528
// During the loading phase, refrain from accessing suppliers' items (e.g. EXAMPLE_ITEM.get()), they will not be available
26-
public static final RegistrySupplier<Item> DUMMY_ITEM = ITEMS.register("dummy_item", () -> new Item(new Item.Properties().tab(DUMMY_GROUP)));
29+
public static final RegistrySupplier<Item> CHALKSTICK_ITEM = ITEMS.register("amethyst_chalk", () -> new ItemChalkStick(CHALKCIRCLES_UNSTACKABLE));
2730

2831

2932
}

common/src/main/java/net/hex_chalkcircles/registry/Hex_chalkcirclesPatternRegistry.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
package net.hex_chalkcircles.registry;
22

3+
import static net.hex_chalkcircles.Hex_chalkcircles.id;
4+
5+
import java.util.ArrayList;
6+
import java.util.List;
7+
38
import at.petrak.hexcasting.api.PatternRegistry;
49
import at.petrak.hexcasting.api.spell.Action;
510
import at.petrak.hexcasting.api.spell.math.HexDir;
@@ -9,11 +14,6 @@
914
import net.hex_chalkcircles.casting.patterns.spells.OpCongrats;
1015
import net.minecraft.resources.ResourceLocation;
1116

12-
import java.util.ArrayList;
13-
import java.util.List;
14-
15-
import static net.hex_chalkcircles.Hex_chalkcircles.id;
16-
1717
public class Hex_chalkcirclesPatternRegistry {
1818
public static List<Triple<HexPattern, ResourceLocation, Action>> PATTERNS = new ArrayList<>();
1919
public static List<Triple<HexPattern, ResourceLocation, Action>> PER_WORLD_PATTERNS = new ArrayList<>();
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# This directory is auto-generated by hexdoc.
2+
# Do not edit or commit these files.

0 commit comments

Comments
 (0)