Skip to content

Commit 015b142

Browse files
committed
Implement enlightened splicing table
1 parent c176d21 commit 015b142

File tree

43 files changed

+673
-72
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+673
-72
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"variants": {
3+
"facing=east": {
4+
"model": "hexdebug:block/enlightened_splicing_table",
5+
"y": 90
6+
},
7+
"facing=north": {
8+
"model": "hexdebug:block/enlightened_splicing_table"
9+
},
10+
"facing=south": {
11+
"model": "hexdebug:block/enlightened_splicing_table",
12+
"y": 180
13+
},
14+
"facing=west": {
15+
"model": "hexdebug:block/enlightened_splicing_table",
16+
"y": 270
17+
}
18+
}
19+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"parent": "minecraft:block/cube",
3+
"textures": {
4+
"down": "hexcasting:block/slate",
5+
"east": "hexdebug:block/splicing_table/right",
6+
"north": "hexcasting:block/circle/impetus/rightclick/front_lit",
7+
"particle": "hexcasting:block/slate",
8+
"south": "hexdebug:block/splicing_table/back",
9+
"up": "hexdebug:block/splicing_table/top",
10+
"west": "hexdebug:block/splicing_table/left"
11+
}
12+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"parent": "hexdebug:block/enlightened_splicing_table"
3+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"parent": "minecraft:recipes/root",
3+
"criteria": {
4+
"enlightenment": {
5+
"conditions": {
6+
"health_used": {
7+
"min": 0.8
8+
},
9+
"mojang_i_am_begging_and_crying_please_add_an_entity_health_criterion": {
10+
"max": 1.0,
11+
"min": 2.2250738585072014E-308
12+
}
13+
},
14+
"trigger": "hexcasting:overcast"
15+
},
16+
"has_the_recipe": {
17+
"conditions": {
18+
"recipe": "hexdebug:brainsweep/enlightened_splicing_table"
19+
},
20+
"trigger": "minecraft:recipe_unlocked"
21+
}
22+
},
23+
"requirements": [
24+
[
25+
"enlightenment",
26+
"has_the_recipe"
27+
]
28+
],
29+
"rewards": {
30+
"recipes": [
31+
"hexdebug:brainsweep/enlightened_splicing_table"
32+
]
33+
},
34+
"sends_telemetry_event": true
35+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"type": "minecraft:block",
3+
"pools": [
4+
{
5+
"bonus_rolls": 0.0,
6+
"conditions": [
7+
{
8+
"condition": "minecraft:survives_explosion"
9+
}
10+
],
11+
"entries": [
12+
{
13+
"type": "minecraft:item",
14+
"name": "hexdebug:enlightened_splicing_table"
15+
}
16+
],
17+
"rolls": 1.0
18+
}
19+
],
20+
"random_sequence": "hexdebug:blocks/enlightened_splicing_table"
21+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"type": "hexcasting:brainsweep",
3+
"blockIn": {
4+
"type": "block",
5+
"block": "hexdebug:splicing_table"
6+
},
7+
"cost": 1000000,
8+
"entityIn": {
9+
"type": "villager",
10+
"minLevel": 2,
11+
"profession": "toolsmith"
12+
},
13+
"result": {
14+
"name": "hexdebug:enlightened_splicing_table",
15+
"properties": {
16+
"facing": "north"
17+
}
18+
}
19+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"values": [
33
"hexdebug:splicing_table",
4+
"hexdebug:enlightened_splicing_table",
45
"hexdebug:focus_holder"
56
]
67
}

Forge/src/main/java/gay/object/hexdebug/forge/mixin/ForgeHexDebugMixinConfigPlugin.java renamed to Common/src/main/java/gay/object/hexdebug/mixin/HexDebugMixinConfigPlugin.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package gay.object.hexdebug.forge.mixin;
1+
package gay.object.hexdebug.mixin;
22

33
import gay.object.hexdebug.HexDebug;
44
import org.objectweb.asm.tree.ClassNode;
@@ -9,7 +9,7 @@
99
import java.util.Set;
1010

1111
// disables MixinDatagenMain if we're not running the datagen task, since it's not necessary at any other time
12-
public class ForgeHexDebugMixinConfigPlugin implements IMixinConfigPlugin {
12+
public class HexDebugMixinConfigPlugin implements IMixinConfigPlugin {
1313
@Override
1414
public void onLoad(String mixinPackage) {}
1515

@@ -20,7 +20,7 @@ public String getRefMapperConfig() {
2020

2121
@Override
2222
public boolean shouldApplyMixin(String targetClassName, String mixinClassName) {
23-
if (mixinClassName.equals("gay.object.hexdebug.forge.mixin.MixinDatagenMain")) {
23+
if (mixinClassName.equals("gay.object.hexdebug.mixin.MixinDatagenMain")) {
2424
var shouldApply = System.getProperty("hexdebug.apply-datagen-mixin", "false").equals("true");
2525
if (shouldApply) {
2626
HexDebug.LOGGER.warn("Applying scuffed datagen mixin. This should not happen if not running datagen!");

Forge/src/main/java/gay/object/hexdebug/forge/mixin/MixinDatagenMain.java renamed to Common/src/main/java/gay/object/hexdebug/mixin/MixinDatagenMain.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
package gay.object.hexdebug.forge.mixin;
1+
package gay.object.hexdebug.mixin;
22

33
import com.llamalad7.mixinextras.injector.wrapmethod.WrapMethod;
44
import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
55
import gay.object.hexdebug.HexDebug;
66
import org.spongepowered.asm.mixin.Mixin;
7-
import org.spongepowered.asm.mixin.injection.At;
8-
import org.spongepowered.asm.mixin.injection.Inject;
9-
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
107

118
// scuffed workaround for https://github.com/architectury/architectury-loom/issues/189
12-
@Mixin(net.minecraft.data.Main.class)
9+
@Mixin({
10+
net.minecraft.data.Main.class,
11+
net.minecraft.server.Main.class,
12+
})
1313
public class MixinDatagenMain {
1414
@WrapMethod(method = "main", remap = false)
15-
private static void hexdummyexample$systemExitAfterDatagenFinishes(String[] strings, Operation<Void> original) {
15+
private static void hexdebug$systemExitAfterDatagenFinishes(String[] strings, Operation<Void> original) {
1616
try {
1717
original.call((Object) strings);
1818
} catch (Throwable throwable) {

Common/src/main/kotlin/gay/object/hexdebug/blocks/splicing/ClientSplicingTableContainer.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package gay.`object`.hexdebug.blocks.splicing
33
import at.petrak.hexcasting.api.casting.eval.ResolvedPatternType
44
import at.petrak.hexcasting.api.casting.math.HexPattern
55
import gay.`object`.hexdebug.networking.msg.MsgSplicingTableActionC2S
6+
import gay.`object`.hexdebug.networking.msg.MsgSplicingTableCastHexC2S
67
import gay.`object`.hexdebug.networking.msg.MsgSplicingTableNewStaffPatternC2S
78
import gay.`object`.hexdebug.networking.msg.MsgSplicingTableSelectIndexC2S
89
import gay.`object`.hexdebug.splicing.ISplicingTable
@@ -26,4 +27,8 @@ class ClientSplicingTableContainer : SimpleContainer(SplicingTableItemSlot.conta
2627
override fun selectIndex(player: ServerPlayer?, index: Int, hasShiftDown: Boolean, isIota: Boolean) {
2728
MsgSplicingTableSelectIndexC2S(index, hasShiftDown = hasShiftDown, isIota = isIota).sendToServer()
2829
}
30+
31+
override fun castHex(player: ServerPlayer?) {
32+
MsgSplicingTableCastHexC2S().sendToServer()
33+
}
2934
}

0 commit comments

Comments
 (0)