Skip to content

Commit

Permalink
Add enlightened bush loot provider
Browse files Browse the repository at this point in the history
  • Loading branch information
TeamSpen210 committed Dec 25, 2019
1 parent 7fb4c32 commit 974a5c6
Showing 1 changed file with 19 additions and 5 deletions.
Expand Up @@ -53,7 +53,7 @@ private void addIf(String pulseID, Runnable registrar) {
}
}

private static LootTable.Builder droppingWithNameAndTexture(Block block) {
private LootTable.Builder droppingWithNameAndTexture(Block block) {
return LootTable.builder()
.addLootPool(withSurvivesExplosion(block, LootPool.builder()
.addEntry(ItemLootEntry.builder(block)
Expand All @@ -62,6 +62,14 @@ private static LootTable.Builder droppingWithNameAndTexture(Block block) {
)));
}

private LootTable.Builder droppingWithTexture(Block block) {
return LootTable.builder()
.addLootPool(withSurvivesExplosion(block, LootPool.builder()
.addEntry(ItemLootEntry.builder(block)
.acceptFunction(FillTexturedBlockLootFunction::new)
)));
}

private void registerRedirect(Block block, Block originalBlock) {
this.registerLootTable(block, LootTable.builder()
.addLootPool(LootPool.builder()
Expand All @@ -70,10 +78,15 @@ private void registerRedirect(Block block, Block originalBlock) {
}

private void addBuilding() {
this.registerLootTable(InspirationsBuilding.shelf_normal, InspirationsBlockLootTable::droppingWithNameAndTexture);
this.registerLootTable(InspirationsBuilding.shelf_rainbow, InspirationsBlockLootTable::droppingWithNameAndTexture);
this.registerLootTable(InspirationsBuilding.shelf_ancient, InspirationsBlockLootTable::droppingWithNameAndTexture);
this.registerLootTable(InspirationsBuilding.shelf_tomes, InspirationsBlockLootTable::droppingWithNameAndTexture);
this.registerLootTable(InspirationsBuilding.shelf_normal, this::droppingWithNameAndTexture);
this.registerLootTable(InspirationsBuilding.shelf_rainbow, this::droppingWithNameAndTexture);
this.registerLootTable(InspirationsBuilding.shelf_ancient, this::droppingWithNameAndTexture);
this.registerLootTable(InspirationsBuilding.shelf_tomes, this::droppingWithNameAndTexture);

this.registerLootTable(InspirationsBuilding.whiteEnlightenedBush, this::droppingWithTexture);
this.registerLootTable(InspirationsBuilding.redEnlightenedBush, this::droppingWithTexture);
this.registerLootTable(InspirationsBuilding.greenEnlightenedBush, this::droppingWithTexture);
this.registerLootTable(InspirationsBuilding.blueEnlightenedBush, this::droppingWithTexture);

this.registerDropSelfLootTable(InspirationsBuilding.plainMulch);
this.registerDropSelfLootTable(InspirationsBuilding.blackMulch);
Expand Down Expand Up @@ -119,6 +132,7 @@ private LootTable.Builder rope(Block block) {
}



private void addTools() {
// func_218482 = droppingNothing()
this.registerLootTable(InspirationsTools.redstoneCharge, func_218482_a());
Expand Down

0 comments on commit 974a5c6

Please sign in to comment.