Skip to content

Commit 1540674

Browse files
Fix (#14)
* Loot and Recipe * Transfer
1 parent e5525b4 commit 1540674

25 files changed

+1183
-719
lines changed
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+
"has_crafting_terminal": {
5+
"conditions": {
6+
"items": [
7+
{
8+
"items": [
9+
"ae2:crafting_terminal"
10+
]
11+
}
12+
]
13+
},
14+
"trigger": "minecraft:inventory_changed"
15+
},
16+
"has_the_recipe": {
17+
"conditions": {
18+
"recipe": "aea:advanced_terminal"
19+
},
20+
"trigger": "minecraft:recipe_unlocked"
21+
}
22+
},
23+
"requirements": [
24+
[
25+
"has_crafting_terminal",
26+
"has_the_recipe"
27+
]
28+
],
29+
"rewards": {
30+
"recipes": [
31+
"aea:advanced_terminal"
32+
]
33+
},
34+
"sends_telemetry_event": false
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": "aea:advanced_wireless_connection_provider"
15+
}
16+
],
17+
"rolls": 1.0
18+
}
19+
],
20+
"random_sequence": "aea:blocks/advanced_wireless_connection_provider"
21+
}
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": "aea:extended_wireless_connection_provider"
15+
}
16+
],
17+
"rolls": 1.0
18+
}
19+
],
20+
"random_sequence": "aea:blocks/extended_wireless_connection_provider"
21+
}
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": "aea:mirror_adv_pattern_provider"
15+
}
16+
],
17+
"rolls": 1.0
18+
}
19+
],
20+
"random_sequence": "aea:blocks/mirror_adv_pattern_provider"
21+
}
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": "aea:mirror_ex_adv_pattern_provider"
15+
}
16+
],
17+
"rolls": 1.0
18+
}
19+
],
20+
"random_sequence": "aea:blocks/mirror_ex_adv_pattern_provider"
21+
}
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": "aea:mirror_ex_pattern_provider"
15+
}
16+
],
17+
"rolls": 1.0
18+
}
19+
],
20+
"random_sequence": "aea:blocks/mirror_ex_pattern_provider"
21+
}
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": "aea:mirror_pattern_provider"
15+
}
16+
],
17+
"rolls": 1.0
18+
}
19+
],
20+
"random_sequence": "aea:blocks/mirror_pattern_provider"
21+
}
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": "aea:wireless_connection_provider"
15+
}
16+
],
17+
"rolls": 1.0
18+
}
19+
],
20+
"random_sequence": "aea:blocks/wireless_connection_provider"
21+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"type": "minecraft:crafting_shapeless",
3+
"category": "misc",
4+
"ingredients": [
5+
{
6+
"item": "ae2:crafting_terminal"
7+
},
8+
{
9+
"item": "ae2:calculation_processor"
10+
}
11+
],
12+
"result": {
13+
"item": "aea:advanced_terminal"
14+
}
15+
}

src/main/java/com/ref/aea/core/definitions/AEABlocks.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import appeng.block.AEBaseBlockItem;
55
import com.ref.aea.AEA;
66
import com.ref.aea.data.AEALangProvider;
7+
import com.ref.aea.data.loot.AEABlocksLoot;
78
import java.util.function.Function;
89
import java.util.function.Supplier;
910
import net.minecraft.world.item.BlockItem;
@@ -21,19 +22,23 @@ public class AEABlocks {
2122

2223
public static <T extends Block> RegistryObject<T> block(
2324
String id, String englishName, Supplier<T> blockSupplier) {
24-
return block(id, englishName, blockSupplier, null, true);
25+
return block(id, englishName, blockSupplier, null, true, false);
2526
}
2627

2728
public static <T extends Block> RegistryObject<T> block(
2829
String id,
2930
String englishName,
3031
Supplier<T> blockSupplier,
3132
@Nullable Function<Block, BlockItem> itemFactory,
32-
boolean isCreativeModeTab) {
33+
boolean isCreativeModeTab,
34+
boolean isCustomLoot) {
3335
var deferredBlock = DR.register(id, blockSupplier);
3436
AEAItems.blockItem(
3537
id, englishName, () -> getBlockItem(id, itemFactory, deferredBlock), isCreativeModeTab);
3638
AEALangProvider.Blocks.put(deferredBlock, englishName);
39+
if (!isCustomLoot) {
40+
AEABlocksLoot.DROP_SELF.add(deferredBlock);
41+
}
3742
return deferredBlock;
3843
}
3944

0 commit comments

Comments
 (0)