Skip to content

Commit 3b5f7d4

Browse files
committed
refactored chalk stick
started on rewriting chalk stick place() to call the hex grid beforehand. also cleaned up the chalk square json so texture connection will be easier later
1 parent b7a0992 commit 3b5f7d4

File tree

3 files changed

+27
-94
lines changed

3 files changed

+27
-94
lines changed

common/src/main/java/net/hex_chalkcircles/blocks/BlockDustRune.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ public BlockDustRune(Properties p_53182_) {
88
super(p_53182_);
99

1010
}
11+
12+
1113

1214

1315
}

common/src/main/java/net/hex_chalkcircles/item/ItemChalkStick.java

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,41 @@
11
package net.hex_chalkcircles.item;
22

33
import at.petrak.hexcasting.common.items.ItemStaff;
4+
45
import at.petrak.hexcasting.common.lib.HexSounds;
56
import at.petrak.hexcasting.common.network.MsgOpenSpellGuiAck;
67
import at.petrak.hexcasting.xplat.IXplatAbstractions;
78
import net.minecraft.server.level.ServerPlayer;
89
import net.minecraft.stats.Stats;
910
import net.minecraft.world.InteractionHand;
11+
import net.minecraft.world.InteractionResult;
1012
import net.minecraft.world.InteractionResultHolder;
1113
import net.minecraft.world.entity.player.Player;
1214
import net.minecraft.world.item.ItemStack;
15+
import net.minecraft.world.item.context.BlockPlaceContext;
1316
import net.minecraft.world.level.Level;
17+
import net.minecraft.world.level.block.Block;
18+
19+
import net.hex_chalkcircles.registry.Hex_chalkcirclesBlockRegistry;
1420

1521

16-
public class ItemChalkStick extends ItemStaff {
22+
public class ItemChalkStick extends AbstractChalkBlockItem {
23+
24+
private static final Block BLOCK_DUST_RUNE= Hex_chalkcirclesBlockRegistry.CHALK_RUNE.get();
25+
1726

1827
public ItemChalkStick(Properties pProperties) {
19-
super(pProperties);
28+
super(BLOCK_DUST_RUNE, pProperties);
2029
}
2130

31+
@Override
32+
public InteractionResult place(BlockPlaceContext blockplacecontext) {
33+
//TODO call the casting grid and wait until an iota is passed
34+
return super.place(blockplacecontext);
35+
36+
37+
}
38+
2239

2340
@Override
2441
public InteractionResultHolder<ItemStack> use(Level world, Player player, InteractionHand hand) {

common/src/main/resources/assets/hex_chalkcircles/blockstates/chalk_square_block.json

Lines changed: 6 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -1,118 +1,32 @@
11
{
22
"variants": {
3-
"energized=false,face=ceiling,facing=east": {
3+
"face=ceiling": {
44
"model": "hex_chalkcircles:block/chalk_square_block",
55
"uvlock": true,
66
"x": 180
77
},
8-
"energized=false,face=ceiling,facing=north": {
9-
"model": "hex_chalkcircles:block/chalk_square_block",
10-
"uvlock": true,
11-
"x": 180
12-
},
13-
"energized=false,face=ceiling,facing=south": {
14-
"model": "hex_chalkcircles:block/chalk_square_block",
15-
"uvlock": true,
16-
"x": 180
17-
},
18-
"energized=false,face=ceiling,facing=west": {
19-
"model": "hex_chalkcircles:block/chalk_square_block",
20-
"uvlock": true,
21-
"x": 180
22-
},
23-
"energized=false,face=floor,facing=east": {
24-
"model": "hex_chalkcircles:block/chalk_square_block",
25-
"uvlock": true
26-
},
27-
"energized=false,face=floor,facing=north": {
28-
"model": "hex_chalkcircles:block/chalk_square_block",
29-
"uvlock": true
30-
},
31-
"energized=false,face=floor,facing=south": {
32-
"model": "hex_chalkcircles:block/chalk_square_block",
33-
"uvlock": true
34-
},
35-
"energized=false,face=floor,facing=west": {
36-
"model": "hex_chalkcircles:block/chalk_square_block",
37-
"uvlock": true
38-
},
39-
"energized=false,face=wall,facing=east": {
40-
"model": "hex_chalkcircles:block/chalk_square_block",
41-
"uvlock": true,
42-
"x": 90,
43-
"y": 90
44-
},
45-
"energized=false,face=wall,facing=north": {
46-
"model": "hex_chalkcircles:block/chalk_square_block",
47-
"uvlock": true,
48-
"x": 90
49-
},
50-
"energized=false,face=wall,facing=south": {
51-
"model": "hex_chalkcircles:block/chalk_square_block",
52-
"uvlock": true,
53-
"x": 90,
54-
"y": 180
55-
},
56-
"energized=false,face=wall,facing=west": {
57-
"model": "hex_chalkcircles:block/chalk_square_block",
58-
"uvlock": true,
59-
"x": 90,
60-
"y": 270
61-
},
62-
"energized=true,face=ceiling,facing=east": {
63-
"model": "hex_chalkcircles:block/chalk_square_block",
64-
"uvlock": true,
65-
"x": 180
66-
},
67-
"energized=true,face=ceiling,facing=north": {
68-
"model": "hex_chalkcircles:block/chalk_square_block",
69-
"uvlock": true,
70-
"x": 180
71-
},
72-
"energized=true,face=ceiling,facing=south": {
73-
"model": "hex_chalkcircles:block/chalk_square_block",
74-
"uvlock": true,
75-
"x": 180
76-
},
77-
"energized=true,face=ceiling,facing=west": {
78-
"model": "hex_chalkcircles:block/chalk_square_block",
79-
"uvlock": true,
80-
"x": 180
81-
},
82-
"energized=true,face=floor,facing=east": {
83-
"model": "hex_chalkcircles:block/chalk_square_block",
84-
"uvlock": true
85-
},
86-
"energized=true,face=floor,facing=north": {
87-
"model": "hex_chalkcircles:block/chalk_square_block",
88-
"uvlock": true
89-
},
90-
"energized=true,face=floor,facing=south": {
91-
"model": "hex_chalkcircles:block/chalk_square_block",
92-
"uvlock": true
93-
},
94-
"energized=true,face=floor,facing=west": {
8+
"face=floor": {
959
"model": "hex_chalkcircles:block/chalk_square_block",
9610
"uvlock": true
9711
},
98-
"energized=true,face=wall,facing=east": {
12+
"face=wall,facing=east": {
9913
"model": "hex_chalkcircles:block/chalk_square_block",
10014
"uvlock": true,
10115
"x": 90,
10216
"y": 90
10317
},
104-
"energized=true,face=wall,facing=north": {
18+
"face=wall,facing=north": {
10519
"model": "hex_chalkcircles:block/chalk_square_block",
10620
"uvlock": true,
10721
"x": 90
10822
},
109-
"energized=true,face=wall,facing=south": {
23+
"face=wall,facing=south": {
11024
"model": "hex_chalkcircles:block/chalk_square_block",
11125
"uvlock": true,
11226
"x": 90,
11327
"y": 180
11428
},
115-
"energized=true,face=wall,facing=west": {
29+
"face=wall,facing=west": {
11630
"model": "hex_chalkcircles:block/chalk_square_block",
11731
"uvlock": true,
11832
"x": 90,

0 commit comments

Comments
 (0)