This repository has been archived by the owner on Feb 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Painting roller and Painted glowstone blocks now available in generat…
…ed chests
- Loading branch information
1 parent
4760ff4
commit d52fcc8
Showing
17 changed files
with
435 additions
and
0 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
src/generated/resources/data/forge/loot_modifiers/global_loot_modifiers.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"entries": [ | ||
"paintedglowstone:additions_nether_bridge", | ||
"paintedglowstone:additions_bastion_other", | ||
"paintedglowstone:additions_bastion_treasure", | ||
"paintedglowstone:additions_abandoned_mineshaft", | ||
"paintedglowstone:additions_bastion_hoglin_stable", | ||
"paintedglowstone:additions_bastion_bridge", | ||
"paintedglowstone:additions_simple_dungeon", | ||
"paintedglowstone:additions_ruined_portal" | ||
], | ||
"replace": false | ||
} |
10 changes: 10 additions & 0 deletions
10
...nerated/resources/data/paintedglowstone/loot_modifiers/additions_abandoned_mineshaft.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"type": "paintedglowstone:addition", | ||
"conditions": [ | ||
{ | ||
"condition": "forge:loot_table_id", | ||
"loot_table_id": "minecraft:chests/abandoned_mineshaft" | ||
} | ||
], | ||
"loot_table": "paintedglowstone:chests/additions_abandoned_mineshaft" | ||
} |
10 changes: 10 additions & 0 deletions
10
src/generated/resources/data/paintedglowstone/loot_modifiers/additions_bastion_bridge.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"type": "paintedglowstone:addition", | ||
"conditions": [ | ||
{ | ||
"condition": "forge:loot_table_id", | ||
"loot_table_id": "minecraft:chests/bastion_bridge" | ||
} | ||
], | ||
"loot_table": "paintedglowstone:chests/additions_nether" | ||
} |
10 changes: 10 additions & 0 deletions
10
...rated/resources/data/paintedglowstone/loot_modifiers/additions_bastion_hoglin_stable.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"type": "paintedglowstone:addition", | ||
"conditions": [ | ||
{ | ||
"condition": "forge:loot_table_id", | ||
"loot_table_id": "minecraft:chests/bastion_hoglin_stable" | ||
} | ||
], | ||
"loot_table": "paintedglowstone:chests/additions_nether" | ||
} |
10 changes: 10 additions & 0 deletions
10
src/generated/resources/data/paintedglowstone/loot_modifiers/additions_bastion_other.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"type": "paintedglowstone:addition", | ||
"conditions": [ | ||
{ | ||
"condition": "forge:loot_table_id", | ||
"loot_table_id": "minecraft:chests/bastion_other" | ||
} | ||
], | ||
"loot_table": "paintedglowstone:chests/additions_nether" | ||
} |
10 changes: 10 additions & 0 deletions
10
src/generated/resources/data/paintedglowstone/loot_modifiers/additions_bastion_treasure.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"type": "paintedglowstone:addition", | ||
"conditions": [ | ||
{ | ||
"condition": "forge:loot_table_id", | ||
"loot_table_id": "minecraft:chests/bastion_treasure" | ||
} | ||
], | ||
"loot_table": "paintedglowstone:chests/additions_nether" | ||
} |
10 changes: 10 additions & 0 deletions
10
src/generated/resources/data/paintedglowstone/loot_modifiers/additions_nether_bridge.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"type": "paintedglowstone:addition", | ||
"conditions": [ | ||
{ | ||
"condition": "forge:loot_table_id", | ||
"loot_table_id": "minecraft:chests/nether_bridge" | ||
} | ||
], | ||
"loot_table": "paintedglowstone:chests/additions_nether" | ||
} |
10 changes: 10 additions & 0 deletions
10
src/generated/resources/data/paintedglowstone/loot_modifiers/additions_ruined_portal.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"type": "paintedglowstone:addition", | ||
"conditions": [ | ||
{ | ||
"condition": "forge:loot_table_id", | ||
"loot_table_id": "minecraft:chests/ruined_portal" | ||
} | ||
], | ||
"loot_table": "paintedglowstone:chests/additions_ruined_portal" | ||
} |
10 changes: 10 additions & 0 deletions
10
src/generated/resources/data/paintedglowstone/loot_modifiers/additions_simple_dungeon.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"type": "paintedglowstone:addition", | ||
"conditions": [ | ||
{ | ||
"condition": "forge:loot_table_id", | ||
"loot_table_id": "minecraft:chests/simple_dungeon" | ||
} | ||
], | ||
"loot_table": "paintedglowstone:chests/additions_abandoned_mineshaft" | ||
} |
48 changes: 48 additions & 0 deletions
48
...ted/resources/data/paintedglowstone/loot_tables/chests/additions_abandoned_mineshaft.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{ | ||
"type": "minecraft:chest", | ||
"pools": [ | ||
{ | ||
"bonus_rolls": 0.0, | ||
"entries": [ | ||
{ | ||
"type": "libx:all", | ||
"children": [ | ||
{ | ||
"type": "minecraft:item", | ||
"conditions": [ | ||
{ | ||
"chance": 0.3, | ||
"condition": "minecraft:random_chance" | ||
} | ||
], | ||
"name": "paintedglowstone:painting_roll" | ||
}, | ||
{ | ||
"type": "minecraft:item", | ||
"conditions": [ | ||
{ | ||
"chance": 0.03, | ||
"condition": "minecraft:random_chance" | ||
} | ||
], | ||
"functions": [ | ||
{ | ||
"add": false, | ||
"count": { | ||
"type": "minecraft:uniform", | ||
"max": 3.0, | ||
"min": 1.0 | ||
}, | ||
"function": "minecraft:set_count" | ||
} | ||
], | ||
"name": "paintedglowstone:painted_glowstone" | ||
} | ||
] | ||
} | ||
], | ||
"name": "main", | ||
"rolls": 1.0 | ||
} | ||
] | ||
} |
48 changes: 48 additions & 0 deletions
48
src/generated/resources/data/paintedglowstone/loot_tables/chests/additions_nether.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{ | ||
"type": "minecraft:chest", | ||
"pools": [ | ||
{ | ||
"bonus_rolls": 0.0, | ||
"entries": [ | ||
{ | ||
"type": "libx:all", | ||
"children": [ | ||
{ | ||
"type": "minecraft:item", | ||
"conditions": [ | ||
{ | ||
"chance": 0.5, | ||
"condition": "minecraft:random_chance" | ||
} | ||
], | ||
"name": "paintedglowstone:painting_roll" | ||
}, | ||
{ | ||
"type": "minecraft:item", | ||
"conditions": [ | ||
{ | ||
"chance": 0.6, | ||
"condition": "minecraft:random_chance" | ||
} | ||
], | ||
"functions": [ | ||
{ | ||
"add": false, | ||
"count": { | ||
"type": "minecraft:uniform", | ||
"max": 8.0, | ||
"min": 1.0 | ||
}, | ||
"function": "minecraft:set_count" | ||
} | ||
], | ||
"name": "paintedglowstone:painted_glowstone" | ||
} | ||
] | ||
} | ||
], | ||
"name": "main", | ||
"rolls": 1.0 | ||
} | ||
] | ||
} |
48 changes: 48 additions & 0 deletions
48
...generated/resources/data/paintedglowstone/loot_tables/chests/additions_ruined_portal.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{ | ||
"type": "minecraft:chest", | ||
"pools": [ | ||
{ | ||
"bonus_rolls": 0.0, | ||
"entries": [ | ||
{ | ||
"type": "libx:all", | ||
"children": [ | ||
{ | ||
"type": "minecraft:item", | ||
"conditions": [ | ||
{ | ||
"chance": 0.3, | ||
"condition": "minecraft:random_chance" | ||
} | ||
], | ||
"name": "paintedglowstone:painting_roll" | ||
}, | ||
{ | ||
"type": "minecraft:item", | ||
"conditions": [ | ||
{ | ||
"chance": 0.03, | ||
"condition": "minecraft:random_chance" | ||
} | ||
], | ||
"functions": [ | ||
{ | ||
"add": false, | ||
"count": { | ||
"type": "minecraft:uniform", | ||
"max": 3.0, | ||
"min": 1.0 | ||
}, | ||
"function": "minecraft:set_count" | ||
} | ||
], | ||
"name": "paintedglowstone:painted_glowstone" | ||
} | ||
] | ||
} | ||
], | ||
"name": "main", | ||
"rolls": 1.0 | ||
} | ||
] | ||
} |
62 changes: 62 additions & 0 deletions
62
src/main/java/biz/berger_media/paintedglowstone/data/LootModifierProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
package biz.berger_media.paintedglowstone.data; | ||
|
||
import biz.berger_media.paintedglowstone.loot.AdditionalLootModifier; | ||
import net.minecraft.data.DataGenerator; | ||
import net.minecraft.resources.ResourceLocation; | ||
import net.minecraftforge.common.data.GlobalLootModifierProvider; | ||
import net.minecraftforge.common.loot.LootTableIdCondition; | ||
import org.moddingx.libx.annotation.data.Datagen; | ||
import org.moddingx.libx.mod.ModX; | ||
|
||
@Datagen | ||
public class LootModifierProvider extends GlobalLootModifierProvider { | ||
private final ModX mod; | ||
|
||
public LootModifierProvider(ModX mod, DataGenerator generator) { | ||
super(generator, mod.modid); | ||
this.mod = mod; | ||
} | ||
|
||
@Override | ||
protected void start() { | ||
this.add("additions_abandoned_mineshaft", new AdditionalLootModifier( | ||
this.mod.resource("chests/additions_abandoned_mineshaft"), | ||
new LootTableIdCondition.Builder(new ResourceLocation("minecraft", "chests/abandoned_mineshaft")).build() | ||
)); | ||
|
||
this.add("additions_simple_dungeon", new AdditionalLootModifier( | ||
this.mod.resource("chests/additions_abandoned_mineshaft"), | ||
new LootTableIdCondition.Builder(new ResourceLocation("minecraft", "chests/simple_dungeon")).build() | ||
)); | ||
|
||
this.add("additions_bastion_bridge", new AdditionalLootModifier( | ||
this.mod.resource("chests/additions_nether"), | ||
new LootTableIdCondition.Builder(new ResourceLocation("minecraft", "chests/bastion_bridge")).build() | ||
)); | ||
|
||
this.add("additions_bastion_hoglin_stable", new AdditionalLootModifier( | ||
this.mod.resource("chests/additions_nether"), | ||
new LootTableIdCondition.Builder(new ResourceLocation("minecraft", "chests/bastion_hoglin_stable")).build() | ||
)); | ||
|
||
this.add("additions_bastion_other", new AdditionalLootModifier( | ||
this.mod.resource("chests/additions_nether"), | ||
new LootTableIdCondition.Builder(new ResourceLocation("minecraft", "chests/bastion_other")).build() | ||
)); | ||
|
||
this.add("additions_bastion_treasure", new AdditionalLootModifier( | ||
this.mod.resource("chests/additions_nether"), | ||
new LootTableIdCondition.Builder(new ResourceLocation("minecraft", "chests/bastion_treasure")).build() | ||
)); | ||
|
||
this.add("additions_nether_bridge", new AdditionalLootModifier( | ||
this.mod.resource("chests/additions_nether"), | ||
new LootTableIdCondition.Builder(new ResourceLocation("minecraft", "chests/nether_bridge")).build() | ||
)); | ||
|
||
this.add("additions_ruined_portal", new AdditionalLootModifier( | ||
this.mod.resource("chests/additions_ruined_portal"), | ||
new LootTableIdCondition.Builder(new ResourceLocation("minecraft", "chests/ruined_portal")).build() | ||
)); | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
src/main/java/biz/berger_media/paintedglowstone/data/LootTableProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package biz.berger_media.paintedglowstone.data; | ||
|
||
import biz.berger_media.paintedglowstone.ModBlocks; | ||
import biz.berger_media.paintedglowstone.ModItems; | ||
import net.minecraft.data.DataGenerator; | ||
import org.moddingx.libx.annotation.data.Datagen; | ||
import org.moddingx.libx.datagen.provider.loot.ChestLootProviderBase; | ||
import org.moddingx.libx.mod.ModX; | ||
|
||
@Datagen | ||
public class LootTableProvider extends ChestLootProviderBase { | ||
public LootTableProvider(ModX mod, DataGenerator generator) { | ||
super(mod, generator); | ||
} | ||
|
||
@Override | ||
@SuppressWarnings("unchecked") | ||
protected void setup() { | ||
this.drops("additions_abandoned_mineshaft", | ||
this.stack(ModItems.paintingRoll).with(this.random(0.3F)), | ||
this.stack(ModBlocks.paintedGlowstone).with(this.random(0.03F)).with(this.count(1, 3)) | ||
); | ||
|
||
this.drops("additions_nether", | ||
this.stack(ModItems.paintingRoll).with(this.random(0.5F)), | ||
this.stack(ModBlocks.paintedGlowstone).with(this.random(0.6F)).with(this.count(1, 8)) | ||
); | ||
|
||
this.drops("additions_ruined_portal", | ||
this.stack(ModItems.paintingRoll).with(this.random(0.3F)), | ||
this.stack(ModBlocks.paintedGlowstone).with(this.random(0.03F)).with(this.count(1, 3)) | ||
); | ||
} | ||
} |
Oops, something went wrong.