forked from paulevsGitch/BetterEnd
-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8036071
commit edf7184
Showing
1 changed file
with
105 additions
and
93 deletions.
There are no files selected for viewing
198 changes: 105 additions & 93 deletions
198
src/main/java/org/betterx/betterend/util/DebugHelpers.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 |
---|---|---|
@@ -1,104 +1,116 @@ | ||
package org.betterx.betterend.util; | ||
|
||
import org.betterx.bclib.items.DebugDataItem; | ||
import org.betterx.betterend.BetterEnd; | ||
import org.betterx.betterend.registry.EndItems; | ||
import org.betterx.betterend.world.structures.village.VillagePools; | ||
|
||
import net.minecraft.core.registries.BuiltInRegistries; | ||
import net.minecraft.world.item.Item; | ||
import net.minecraft.world.item.Items; | ||
import net.minecraft.world.level.block.Blocks; | ||
|
||
public class DebugHelpers { | ||
private static boolean didCreateDebugItems = false; | ||
|
||
public static void generateDebugItems() { | ||
if (didCreateDebugItems) return; | ||
didCreateDebugItems = true; | ||
BetterEnd.LOGGER.warn("Generating Debug Helpers"); | ||
|
||
// EndItems.registerEndItem( | ||
// "debug/village_loot", | ||
// DebugDataItem.forLootTable(LootTableUtil.VILLAGE_LOOT, Items.IRON_INGOT) | ||
// ); | ||
// | ||
// EndItems.registerEndItem( | ||
// "debug/village_bonus", | ||
// DebugDataItem.forLootTable(LootTableUtil.VILLAGE_BONUS_LOOT, Items.DIAMOND) | ||
// ); | ||
// | ||
// EndItems.registerEndItem( | ||
// "debug/village_template", | ||
// DebugDataItem.forLootTable(LootTableUtil.VILLAGE_TEMPLATE_LOOT, Items.GOLD_INGOT) | ||
// ); | ||
// | ||
// EndItems.registerEndItem( | ||
// "debug/biome_loot", | ||
// DebugDataItem.forLootTable(LootTableUtil.BIOME_CHEST, Items.OAK_LEAVES) | ||
// ); | ||
// | ||
// EndItems.registerEndItem( | ||
// "debug/jigsaw_entrance", | ||
// DebugDataItem.forHouseEntranceJigSaw(BetterEnd.MOD_ID, null, Items.OAK_DOOR) | ||
// ); | ||
// | ||
// EndItems.registerEndItem( | ||
// "debug/jigsaw_street_entrance", | ||
// DebugDataItem.forHouseEntranceJigSaw(BetterEnd.MOD_ID, VillagePools.HOUSES_KEY.key, Items.IRON_DOOR) | ||
// ); | ||
// | ||
// EndItems.registerEndItem( | ||
// "debug/jigsaw_street", | ||
// DebugDataItem.forSteetJigSaw( | ||
// BetterEnd.MOD_ID, | ||
// VillagePools.STREET_KEY.key, | ||
// Items.ENDER_PEARL | ||
// ) | ||
// ); | ||
// | ||
// EndItems.registerEndItem( | ||
// "debug/jigsaw_street_deco", | ||
// DebugDataItem.forStreetDecorationJigSaw( | ||
// BetterEnd.MOD_ID, | ||
// VillagePools.STREET_DECO_KEY.key, | ||
// Items.ENDER_EYE | ||
// ) | ||
// ); | ||
// EndItems.registerEndItem( | ||
// "debug/jigsaw_street_big_deco", | ||
// DebugDataItem.forDecorationJigSaw( | ||
// BetterEnd.MOD_ID, | ||
// VillagePools.DECORATIONS_KEY.key, | ||
// Items.SLIME_BALL | ||
// ) | ||
// ); | ||
// | ||
// EndItems.registerEndItem( | ||
// "debug/jigsaw_big_deco", | ||
// DebugDataItem.forDecorationJigSaw( | ||
// BetterEnd.MOD_ID, | ||
// null, | ||
// Items.TURTLE_HELMET | ||
// ) | ||
// ); | ||
// | ||
// EndItems.registerEndItem( | ||
// "debug/jigsaw_deco", | ||
// DebugDataItem.forStreetDecorationJigSaw( | ||
// BetterEnd.MOD_ID, | ||
// null, | ||
// Items.LANTERN | ||
// ) | ||
// ); | ||
// | ||
// EndItems.registerEndItem( | ||
// "debug/fill_base_void", | ||
// new DebugDataItem((player, entity, useOnContext) -> DebugDataItem.fillStructureEntityBounds( | ||
// useOnContext, entity, | ||
// state -> state.is(Blocks.END_STONE), | ||
// Blocks.STRUCTURE_VOID.defaultBlockState(), | ||
// false | ||
// ), false, BuiltInRegistries.ITEM.getKey(Items.WATER_BUCKET)) | ||
// ); | ||
// | ||
// Item item = EndItems.registerEndItem( | ||
// "debug/fill_air", | ||
// new DebugDataItem((player, entity, useOnContext) -> DebugDataItem.fillStructureEntityBounds( | ||
// useOnContext, entity, | ||
// state -> state.isAir() || state.is(Blocks.STRUCTURE_VOID), | ||
// Blocks.STRUCTURE_VOID.defaultBlockState(), | ||
// true | ||
// ), false, BuiltInRegistries.ITEM.getKey(Items.BUCKET)) | ||
// ); | ||
EndItems.registerEndItem( | ||
"debug/village_loot", | ||
DebugDataItem.forLootTable(LootTableUtil.VILLAGE_LOOT, Items.IRON_INGOT) | ||
); | ||
|
||
EndItems.registerEndItem( | ||
"debug/village_bonus", | ||
DebugDataItem.forLootTable(LootTableUtil.VILLAGE_BONUS_LOOT, Items.DIAMOND) | ||
); | ||
|
||
EndItems.registerEndItem( | ||
"debug/village_template", | ||
DebugDataItem.forLootTable(LootTableUtil.VILLAGE_TEMPLATE_LOOT, Items.GOLD_INGOT) | ||
); | ||
|
||
EndItems.registerEndItem( | ||
"debug/biome_loot", | ||
DebugDataItem.forLootTable(LootTableUtil.BIOME_CHEST, Items.OAK_LEAVES) | ||
); | ||
|
||
EndItems.registerEndItem( | ||
"debug/jigsaw_entrance", | ||
DebugDataItem.forHouseEntranceJigSaw(BetterEnd.MOD_ID, null, Items.OAK_DOOR) | ||
); | ||
|
||
EndItems.registerEndItem( | ||
"debug/jigsaw_street_entrance", | ||
DebugDataItem.forHouseEntranceJigSaw(BetterEnd.MOD_ID, VillagePools.HOUSES_KEY.key, Items.IRON_DOOR) | ||
); | ||
|
||
EndItems.registerEndItem( | ||
"debug/jigsaw_street", | ||
DebugDataItem.forSteetJigSaw( | ||
BetterEnd.MOD_ID, | ||
VillagePools.STREET_KEY.key, | ||
Items.ENDER_PEARL | ||
) | ||
); | ||
|
||
EndItems.registerEndItem( | ||
"debug/jigsaw_street_deco", | ||
DebugDataItem.forStreetDecorationJigSaw( | ||
BetterEnd.MOD_ID, | ||
VillagePools.STREET_DECO_KEY.key, | ||
Items.ENDER_EYE | ||
) | ||
); | ||
EndItems.registerEndItem( | ||
"debug/jigsaw_street_big_deco", | ||
DebugDataItem.forDecorationJigSaw( | ||
BetterEnd.MOD_ID, | ||
VillagePools.DECORATIONS_KEY.key, | ||
Items.SLIME_BALL | ||
) | ||
); | ||
|
||
EndItems.registerEndItem( | ||
"debug/jigsaw_big_deco", | ||
DebugDataItem.forDecorationJigSaw( | ||
BetterEnd.MOD_ID, | ||
null, | ||
Items.TURTLE_HELMET | ||
) | ||
); | ||
|
||
EndItems.registerEndItem( | ||
"debug/jigsaw_deco", | ||
DebugDataItem.forStreetDecorationJigSaw( | ||
BetterEnd.MOD_ID, | ||
null, | ||
Items.LANTERN | ||
) | ||
); | ||
|
||
EndItems.registerEndItem( | ||
"debug/fill_base_void", | ||
new DebugDataItem((player, entity, useOnContext) -> DebugDataItem.fillStructureEntityBounds( | ||
useOnContext, entity, | ||
state -> state.is(Blocks.END_STONE), | ||
Blocks.STRUCTURE_VOID.defaultBlockState(), | ||
false | ||
), false, BuiltInRegistries.ITEM.getKey(Items.WATER_BUCKET)) | ||
); | ||
|
||
Item item = EndItems.registerEndItem( | ||
"debug/fill_air", | ||
new DebugDataItem((player, entity, useOnContext) -> DebugDataItem.fillStructureEntityBounds( | ||
useOnContext, entity, | ||
state -> state.isAir() || state.is(Blocks.STRUCTURE_VOID), | ||
Blocks.STRUCTURE_VOID.defaultBlockState(), | ||
true | ||
), false, BuiltInRegistries.ITEM.getKey(Items.BUCKET)) | ||
); | ||
} | ||
|
||
} |