當前位置: 首頁>>代碼示例>>Java>>正文


Java LootTableList類代碼示例

本文整理匯總了Java中net.minecraft.world.storage.loot.LootTableList的典型用法代碼示例。如果您正苦於以下問題:Java LootTableList類的具體用法?Java LootTableList怎麽用?Java LootTableList使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


LootTableList類屬於net.minecraft.world.storage.loot包,在下文中一共展示了LootTableList類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: changeVanillaTables

import net.minecraft.world.storage.loot.LootTableList; //導入依賴的package包/類
private static void changeVanillaTables(LootTableLoadEvent event)
{
	if (event.getName() == LootTableList.ENTITIES_BLAZE) addPool(event.getTable());
	else if (event.getName() == LootTableList.ENTITIES_CREEPER) addPool(event.getTable());
	else if (event.getName() == LootTableList.ENTITIES_ELDER_GUARDIAN) addPool(event.getTable());
	else if (event.getName() == LootTableList.ENTITIES_ENDER_DRAGON) addPool(event.getTable());
	else if (event.getName() == LootTableList.ENTITIES_ENDERMAN) addPool(event.getTable());
	else if (event.getName() == LootTableList.ENTITIES_ENDERMITE) addPool(event.getTable());
	else if (event.getName() == LootTableList.ENTITIES_EVOCATION_ILLAGER) addPool(event.getTable());
	else if (event.getName() == LootTableList.ENTITIES_GHAST) addPool(event.getTable());
	else if (event.getName() == LootTableList.ENTITIES_GUARDIAN) addPool(event.getTable());
	else if (event.getName() == LootTableList.ENTITIES_HUSK) addPool(event.getTable());
	else if (event.getName() == LootTableList.ENTITIES_MAGMA_CUBE) addPool(event.getTable());
	else if (event.getName() == LootTableList.ENTITIES_SHULKER) addPool(event.getTable());
	else if (event.getName() == LootTableList.ENTITIES_SKELETON) addPool(event.getTable());
	else if (event.getName() == LootTableList.ENTITIES_SLIME) addPool(event.getTable());
	else if (event.getName() == LootTableList.ENTITIES_SPIDER) addPool(event.getTable());
	else if (event.getName() == LootTableList.ENTITIES_VEX) addPool(event.getTable());
	else if (event.getName() == LootTableList.ENTITIES_VINDICATION_ILLAGER) addPool(event.getTable());
	else if (event.getName() == LootTableList.ENTITIES_WITCH) addPool(event.getTable());
	else if (event.getName() == LootTableList.ENTITIES_WITHER_SKELETON) addPool(event.getTable());
	else if (event.getName() == LootTableList.ENTITIES_ZOMBIE) addPool(event.getTable());
	else if (event.getName() == LootTableList.ENTITIES_ZOMBIE_PIGMAN) addPool(event.getTable());
	else if (event.getName() == LootTableList.ENTITIES_ZOMBIE_VILLAGER) addPool(event.getTable());
}
 
開發者ID:TheXFactor117,項目名稱:Loot-Slash-Conquer,代碼行數:26,代碼來源:EventLoadLootTable.java

示例2: work

import net.minecraft.world.storage.loot.LootTableList; //導入依賴的package包/類
@Override
public float work() {
    if (WorkUtils.isDisabled(this.getBlockType())) return 0;
    if (this.world.rand.nextBoolean() && this.world.rand.nextBoolean()) return 1;
    List<BlockPos> blockPos = BlockUtils.getBlockPosInAABB(getWorkingArea());
    boolean allWaterSources = true;
    for (BlockPos pos : blockPos) {
        IBlockState state = this.world.getBlockState(pos);
        if (!(state.getBlock().equals(FluidRegistry.WATER.getBlock()) && state.getBlock().getMetaFromState(state) == 0))
            allWaterSources = false;
    }
    if (allWaterSources) {
        LootContext.Builder lootcontext = new LootContext.Builder((WorldServer) this.world);
        List<ItemStack> items = this.world.getLootTableManager().getLootTableFromLocation(LootTableList.GAMEPLAY_FISHING).generateLootForPools(this.world.rand, lootcontext.build());
        for (ItemStack stack : items) {
            ItemHandlerHelper.insertItem(outFish, stack, false);
        }
        return 1;
    }
    return 1;
}
 
開發者ID:Buuz135,項目名稱:Industrial-Foregoing,代碼行數:22,代碼來源:WaterResourcesCollectorTile.java

示例3: onLootTableLoad

import net.minecraft.world.storage.loot.LootTableList; //導入依賴的package包/類
@SubscribeEvent
public static void onLootTableLoad(LootTableLoadEvent event) {
    ResourceLocation tableName = event.getName();
    LootPool pool = null;
    int bandage = 0, plaster = 0, morphine = 0;
    if (tableName.equals(LootTableList.CHESTS_SPAWN_BONUS_CHEST)) {
        pool = event.getTable().getPool("main");
        bandage = 8;
        plaster = 16;
        morphine = 4;
    } else if (tableName.equals(LootTableList.CHESTS_STRONGHOLD_CORRIDOR) || tableName.equals(LootTableList.CHESTS_STRONGHOLD_CROSSING) || tableName.equals(LootTableList.CHESTS_ABANDONED_MINESHAFT)) {
        pool = event.getTable().getPool("main");
        bandage = 20;
        plaster = 24;
        morphine = 8;
    }

    if (pool != null) {
        pool.addEntry(new LootEntryItem(FirstAidItems.BANDAGE, bandage, 0, new SetCount[]{new SetCount(new LootCondition[0], new RandomValueRange(1, 3))}, new LootCondition[0], FirstAid.MODID + "bandage"));
        pool.addEntry(new LootEntryItem(FirstAidItems.PLASTER, plaster, 0, new SetCount[]{new SetCount(new LootCondition[0], new RandomValueRange(1, 5))}, new LootCondition[0], FirstAid.MODID + "plaster"));
        pool.addEntry(new LootEntryItem(FirstAidItems.MORPHINE, morphine, 0, new SetCount[]{new SetCount(new LootCondition[0], new RandomValueRange(1, 2))}, new LootCondition[0], FirstAid.MODID + "morphine"));
    }
}
 
開發者ID:ichttt,項目名稱:FirstAid,代碼行數:24,代碼來源:EventHandler.java

示例4: isLootTarget

import net.minecraft.world.storage.loot.LootTableList; //導入依賴的package包/類
private boolean isLootTarget(LootTableLoadEvent event) {
	return event.getName().equals(LootTableList.CHESTS_END_CITY_TREASURE)
			|| event.getName().equals(LootTableList.CHESTS_SIMPLE_DUNGEON)
			|| event.getName().equals(LootTableList.CHESTS_VILLAGE_BLACKSMITH)
			|| event.getName().equals(LootTableList.CHESTS_ABANDONED_MINESHAFT)
			|| event.getName().equals(LootTableList.CHESTS_NETHER_BRIDGE)
			|| event.getName().equals(LootTableList.CHESTS_STRONGHOLD_LIBRARY)
			|| event.getName().equals(LootTableList.CHESTS_STRONGHOLD_CROSSING)
			|| event.getName().equals(LootTableList.CHESTS_STRONGHOLD_CORRIDOR)
			|| event.getName().equals(LootTableList.CHESTS_DESERT_PYRAMID)
			|| event.getName().equals(LootTableList.CHESTS_JUNGLE_TEMPLE)
			|| event.getName().equals(LootTableList.CHESTS_JUNGLE_TEMPLE_DISPENSER)
			|| event.getName().equals(LootTableList.CHESTS_IGLOO_CHEST)
			|| event.getName().equals(LootTableList.CHESTS_WOODLAND_MANSION);
}
 
開發者ID:ToroCraft,項目名稱:NemesisSystem,代碼行數:16,代碼來源:LootHandler.java

示例5: lootLoaded

import net.minecraft.world.storage.loot.LootTableList; //導入依賴的package包/類
@SubscribeEvent
public static void lootLoaded(LootTableLoadEvent event)
{
	if (event.getName().equals(LootTableList.CHESTS_SIMPLE_DUNGEON))
	{
		LootTable customTable = event.getLootTableManager().getLootTableFromLocation(new ResourceLocation(BetterThanWeagles.MODID, "custom/simple_dungeon_chest"));
		LootPool customPool = customTable.getPool("weagles");
		event.getTable().addPool(customPool);
	}
}
 
開發者ID:DarkMorford,項目名稱:BetterThanWeagles,代碼行數:11,代碼來源:EventHandlerLootTables.java

示例6: init

import net.minecraft.world.storage.loot.LootTableList; //導入依賴的package包/類
public static void init() {
    // Every entity in our mod has an ID (local to this mod)
    int id = 1;
    EntityRegistry.registerModEntity(new ResourceLocation(MeeCreeps.MODID, "meecreeps"), EntityMeeCreeps.class, "MeeCreeps", id++, MeeCreeps.instance, 64, 3, true, 0x0CD5F2, 0xFF7300);
    EntityRegistry.registerModEntity(new ResourceLocation(MeeCreeps.MODID, "meecreeps_projectile"), EntityProjectile.class, "meecreeps_projectile", id++, MeeCreeps.instance, 100, 5, true);

    // This is the loot table for our mob
    LootTableList.register(EntityMeeCreeps.LOOT);
}
 
開發者ID:McJty,項目名稱:MeeCreeps,代碼行數:10,代碼來源:ModEntities.java

示例7: init

import net.minecraft.world.storage.loot.LootTableList; //導入依賴的package包/類
public static void init() {
	//World generators
	GameRegistry.registerWorldGenerator(new AshenCubeStructure(), 5);
	GameRegistry.registerWorldGenerator(new MonolithStructure(), 5);
	GameRegistry.registerWorldGenerator(new ObeliskDecorator(), 5);
	//Loot tables
	LootTableList.register(SCHRODINGER_LOOT);
}
 
開發者ID:ArekkuusuJerii,項目名稱:Solar,代碼行數:9,代碼來源:ModGen.java

示例8: onLootTablesLoaded

import net.minecraft.world.storage.loot.LootTableList; //導入依賴的package包/類
@SubscribeEvent
public void onLootTablesLoaded(LootTableLoadEvent event) {
	if ((event.getName().equals(LootTableList.CHESTS_ABANDONED_MINESHAFT)) || (event.getName().equals(LootTableList.CHESTS_SIMPLE_DUNGEON)) || (event.getName().equals(LootTableList.CHESTS_DESERT_PYRAMID)) || (event.getName().equals(LootTableList.CHESTS_NETHER_BRIDGE)) || (event.getName().equals(LootTableList.CHESTS_STRONGHOLD_LIBRARY)) || (event.getName().equals(LootTableList.CHESTS_END_CITY_TREASURE))) {
		LootPool mainPool = event.getTable().getPool("main");
		if (mainPool != null) {
			if (event.getName().equals(LootTableList.CHESTS_ABANDONED_MINESHAFT) || event.getName().equals(LootTableList.CHESTS_NETHER_BRIDGE) || event.getName().equals(LootTableList.CHESTS_SIMPLE_DUNGEON)) {
				mainPool.addEntry(new LootEntryItem(ModItems.FRIENDER_PEARL, 10, 0, new LootFunction[] {}, new LootCondition[0], ModGlobals.MODID + ":friender_pearl_loot"));
			}
		}
	}

}
 
開發者ID:p455w0rd,項目名稱:EndermanEvolution,代碼行數:13,代碼來源:ModEvents.java

示例9: handleDataMarker

import net.minecraft.world.storage.loot.LootTableList; //導入依賴的package包/類
protected void handleDataMarker(String p_186175_1_, BlockPos p_186175_2_, World p_186175_3_, Random p_186175_4_, StructureBoundingBox p_186175_5_)
{
    if (p_186175_1_.startsWith("Chest"))
    {
        BlockPos blockpos = p_186175_2_.down();

        if (p_186175_5_.isVecInside(blockpos))
        {
            TileEntity tileentity = p_186175_3_.getTileEntity(blockpos);

            if (tileentity instanceof TileEntityChest)
            {
                ((TileEntityChest)tileentity).setLootTable(LootTableList.CHESTS_END_CITY_TREASURE, p_186175_4_.nextLong());
            }
        }
    }
    else if (p_186175_1_.startsWith("Sentry"))
    {
        EntityShulker entityshulker = new EntityShulker(p_186175_3_);
        entityshulker.setPosition((double)p_186175_2_.getX() + 0.5D, (double)p_186175_2_.getY() + 0.5D, (double)p_186175_2_.getZ() + 0.5D);
        entityshulker.setAttachmentPos(p_186175_2_);
        p_186175_3_.spawnEntityInWorld(entityshulker);
    }
    else if (p_186175_1_.startsWith("Elytra"))
    {
        EntityItemFrame entityitemframe = new EntityItemFrame(p_186175_3_, p_186175_2_, this.rotation.rotate(EnumFacing.SOUTH));
        entityitemframe.setDisplayedItem(new ItemStack(Items.ELYTRA));
        p_186175_3_.spawnEntityInWorld(entityitemframe);
    }
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:31,代碼來源:StructureEndCityPieces.java

示例10: addComponentParts

import net.minecraft.world.storage.loot.LootTableList; //導入依賴的package包/類
public boolean addComponentParts(World worldIn, Random randomIn, StructureBoundingBox structureBoundingBoxIn)
{
    if (this.isLiquidInStructureBoundingBox(worldIn, structureBoundingBoxIn))
    {
        return false;
    }
    else
    {
        this.fillWithRandomizedBlocks(worldIn, structureBoundingBoxIn, 0, 0, 0, 4, 4, 6, true, randomIn, StructureStrongholdPieces.STRONGHOLD_STONES);
        this.placeDoor(worldIn, randomIn, structureBoundingBoxIn, this.entryDoor, 1, 1, 0);
        this.placeDoor(worldIn, randomIn, structureBoundingBoxIn, StructureStrongholdPieces.Stronghold.Door.OPENING, 1, 1, 6);
        this.fillWithBlocks(worldIn, structureBoundingBoxIn, 3, 1, 2, 3, 1, 4, Blocks.STONEBRICK.getDefaultState(), Blocks.STONEBRICK.getDefaultState(), false);
        this.setBlockState(worldIn, Blocks.STONE_SLAB.getStateFromMeta(BlockStoneSlab.EnumType.SMOOTHBRICK.getMetadata()), 3, 1, 1, structureBoundingBoxIn);
        this.setBlockState(worldIn, Blocks.STONE_SLAB.getStateFromMeta(BlockStoneSlab.EnumType.SMOOTHBRICK.getMetadata()), 3, 1, 5, structureBoundingBoxIn);
        this.setBlockState(worldIn, Blocks.STONE_SLAB.getStateFromMeta(BlockStoneSlab.EnumType.SMOOTHBRICK.getMetadata()), 3, 2, 2, structureBoundingBoxIn);
        this.setBlockState(worldIn, Blocks.STONE_SLAB.getStateFromMeta(BlockStoneSlab.EnumType.SMOOTHBRICK.getMetadata()), 3, 2, 4, structureBoundingBoxIn);

        for (int i = 2; i <= 4; ++i)
        {
            this.setBlockState(worldIn, Blocks.STONE_SLAB.getStateFromMeta(BlockStoneSlab.EnumType.SMOOTHBRICK.getMetadata()), 2, 1, i, structureBoundingBoxIn);
        }

        if (!this.hasMadeChest && structureBoundingBoxIn.isVecInside(new BlockPos(this.getXWithOffset(3, 3), this.getYWithOffset(2), this.getZWithOffset(3, 3))))
        {
            this.hasMadeChest = true;
            this.generateChest(worldIn, structureBoundingBoxIn, randomIn, 3, 2, 3, LootTableList.CHESTS_STRONGHOLD_CORRIDOR);
        }

        return true;
    }
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:32,代碼來源:StructureStrongholdPieces.java

示例11: addComponentParts

import net.minecraft.world.storage.loot.LootTableList; //導入依賴的package包/類
public boolean addComponentParts(World worldIn, Random randomIn, StructureBoundingBox structureBoundingBoxIn)
{
    this.fillWithBlocks(worldIn, structureBoundingBoxIn, 0, 0, 0, 4, 1, 4, Blocks.NETHER_BRICK.getDefaultState(), Blocks.NETHER_BRICK.getDefaultState(), false);
    this.fillWithBlocks(worldIn, structureBoundingBoxIn, 0, 2, 0, 4, 5, 4, Blocks.AIR.getDefaultState(), Blocks.AIR.getDefaultState(), false);
    this.fillWithBlocks(worldIn, structureBoundingBoxIn, 4, 2, 0, 4, 5, 4, Blocks.NETHER_BRICK.getDefaultState(), Blocks.NETHER_BRICK.getDefaultState(), false);
    this.fillWithBlocks(worldIn, structureBoundingBoxIn, 4, 3, 1, 4, 4, 1, Blocks.NETHER_BRICK_FENCE.getDefaultState(), Blocks.NETHER_BRICK_FENCE.getDefaultState(), false);
    this.fillWithBlocks(worldIn, structureBoundingBoxIn, 4, 3, 3, 4, 4, 3, Blocks.NETHER_BRICK_FENCE.getDefaultState(), Blocks.NETHER_BRICK_FENCE.getDefaultState(), false);
    this.fillWithBlocks(worldIn, structureBoundingBoxIn, 0, 2, 0, 0, 5, 0, Blocks.NETHER_BRICK.getDefaultState(), Blocks.NETHER_BRICK.getDefaultState(), false);
    this.fillWithBlocks(worldIn, structureBoundingBoxIn, 0, 2, 4, 3, 5, 4, Blocks.NETHER_BRICK.getDefaultState(), Blocks.NETHER_BRICK.getDefaultState(), false);
    this.fillWithBlocks(worldIn, structureBoundingBoxIn, 1, 3, 4, 1, 4, 4, Blocks.NETHER_BRICK_FENCE.getDefaultState(), Blocks.NETHER_BRICK.getDefaultState(), false);
    this.fillWithBlocks(worldIn, structureBoundingBoxIn, 3, 3, 4, 3, 4, 4, Blocks.NETHER_BRICK_FENCE.getDefaultState(), Blocks.NETHER_BRICK.getDefaultState(), false);

    if (this.chest && structureBoundingBoxIn.isVecInside(new BlockPos(this.getXWithOffset(3, 3), this.getYWithOffset(2), this.getZWithOffset(3, 3))))
    {
        this.chest = false;
        this.generateChest(worldIn, structureBoundingBoxIn, randomIn, 3, 2, 3, LootTableList.CHESTS_NETHER_BRIDGE);
    }

    this.fillWithBlocks(worldIn, structureBoundingBoxIn, 0, 6, 0, 4, 6, 4, Blocks.NETHER_BRICK.getDefaultState(), Blocks.NETHER_BRICK.getDefaultState(), false);

    for (int i = 0; i <= 4; ++i)
    {
        for (int j = 0; j <= 4; ++j)
        {
            this.replaceAirAndLiquidDownwards(worldIn, Blocks.NETHER_BRICK.getDefaultState(), i, -1, j, structureBoundingBoxIn);
        }
    }

    return true;
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:31,代碼來源:StructureNetherBridgePieces.java

示例12: addTable

import net.minecraft.world.storage.loot.LootTableList; //導入依賴的package包/類
@SubscribeEvent
public void addTable(LootTableLoadEvent event){
	if(!TF2ConfigVars.disableLoot && (event.getName().equals(LootTableList.CHESTS_SIMPLE_DUNGEON)||event.getName().equals(LootTableList.CHESTS_END_CITY_TREASURE)
			||event.getName().equals(LootTableList.CHESTS_NETHER_BRIDGE)||event.getName().equals(LootTableList.CHESTS_ABANDONED_MINESHAFT)
			||event.getName().equals(LootTableList.CHESTS_STRONGHOLD_CORRIDOR))){
		//System.out.println("loaded: "+new ResourceLocation(TF2weapons.MOD_ID,event.getName().getResourcePath()));
		event.getTable().addPool(getLootPool(new ResourceLocation(TF2weapons.MOD_ID,event.getName().getResourcePath())));
	}
}
 
開發者ID:rafradek,項目名稱:Mods,代碼行數:10,代碼來源:TF2EventsCommon.java

示例13: addLoot

import net.minecraft.world.storage.loot.LootTableList; //導入依賴的package包/類
public static void addLoot(LootTable table, ResourceLocation tableName)
   {
if(BBConfig.spawnMarshmallows)
{
    if(tableName.equals(LootTableList.CHESTS_SIMPLE_DUNGEON))
    {
	LootUtil.addItemToTable(table, "main", RegisterItems.marshmallow, 100, 1, 5);
    }
    else if(tableName.equals(LootTableList.CHESTS_DESERT_PYRAMID))
    {
	LootUtil.addItemToTable(table, "main", RegisterItems.marshmallow, 200, 1, 10);
    }
    else if(tableName.equals(LootTableList.CHESTS_JUNGLE_TEMPLE))
    {
	LootUtil.addItemToTable(table, "main", RegisterItems.marshmallow, 200, 1, 10);
    }
    else if(tableName.equals(LootTableList.CHESTS_STRONGHOLD_CROSSING))
    {
	LootUtil.addItemToTable(table, "main", RegisterItems.marshmallow, 150, 1, 12);
    }
    else if(tableName.equals(LootTableList.CHESTS_STRONGHOLD_CORRIDOR))
    {
	LootUtil.addItemToTable(table, "main", RegisterItems.marshmallow, 150, 1, 12);
    }
    else if(tableName.equals(LootTableList.CHESTS_ABANDONED_MINESHAFT))
    {
	LootUtil.addItemToTable(table, "main", RegisterItems.marshmallow, 150, 1, 12);
    }		
}
   }
 
開發者ID:einsteinsci,項目名稱:BetterBeginningsReborn,代碼行數:31,代碼來源:Worldgen.java

示例14: addComponentParts

import net.minecraft.world.storage.loot.LootTableList; //導入依賴的package包/類
/**
 * second Part of Structure generating, this for example places Spiderwebs, Mob Spawners, it closes
 * Mineshafts at the end, it adds Fences...
 */
public boolean addComponentParts(World worldIn, Random randomIn, StructureBoundingBox structureBoundingBoxIn)
{
    if (this.isLiquidInStructureBoundingBox(worldIn, structureBoundingBoxIn))
    {
        return false;
    }
    else
    {
        this.fillWithRandomizedBlocks(worldIn, structureBoundingBoxIn, 0, 0, 0, 4, 4, 6, true, randomIn, StructureStrongholdPieces.STRONGHOLD_STONES);
        this.placeDoor(worldIn, randomIn, structureBoundingBoxIn, this.entryDoor, 1, 1, 0);
        this.placeDoor(worldIn, randomIn, structureBoundingBoxIn, StructureStrongholdPieces.Stronghold.Door.OPENING, 1, 1, 6);
        this.fillWithBlocks(worldIn, structureBoundingBoxIn, 3, 1, 2, 3, 1, 4, Blocks.STONEBRICK.getDefaultState(), Blocks.STONEBRICK.getDefaultState(), false);
        this.setBlockState(worldIn, Blocks.STONE_SLAB.getStateFromMeta(BlockStoneSlab.EnumType.SMOOTHBRICK.getMetadata()), 3, 1, 1, structureBoundingBoxIn);
        this.setBlockState(worldIn, Blocks.STONE_SLAB.getStateFromMeta(BlockStoneSlab.EnumType.SMOOTHBRICK.getMetadata()), 3, 1, 5, structureBoundingBoxIn);
        this.setBlockState(worldIn, Blocks.STONE_SLAB.getStateFromMeta(BlockStoneSlab.EnumType.SMOOTHBRICK.getMetadata()), 3, 2, 2, structureBoundingBoxIn);
        this.setBlockState(worldIn, Blocks.STONE_SLAB.getStateFromMeta(BlockStoneSlab.EnumType.SMOOTHBRICK.getMetadata()), 3, 2, 4, structureBoundingBoxIn);

        for (int i = 2; i <= 4; ++i)
        {
            this.setBlockState(worldIn, Blocks.STONE_SLAB.getStateFromMeta(BlockStoneSlab.EnumType.SMOOTHBRICK.getMetadata()), 2, 1, i, structureBoundingBoxIn);
        }

        if (!this.hasMadeChest && structureBoundingBoxIn.isVecInside(new BlockPos(this.getXWithOffset(3, 3), this.getYWithOffset(2), this.getZWithOffset(3, 3))))
        {
            this.hasMadeChest = true;
            this.generateChest(worldIn, structureBoundingBoxIn, randomIn, 3, 2, 3, LootTableList.CHESTS_STRONGHOLD_CORRIDOR);
        }

        return true;
    }
}
 
開發者ID:F1r3w477,項目名稱:CustomWorldGen,代碼行數:36,代碼來源:StructureStrongholdPieces.java

示例15: addComponentParts

import net.minecraft.world.storage.loot.LootTableList; //導入依賴的package包/類
/**
 * second Part of Structure generating, this for example places Spiderwebs, Mob Spawners, it closes
 * Mineshafts at the end, it adds Fences...
 */
public boolean addComponentParts(World worldIn, Random randomIn, StructureBoundingBox structureBoundingBoxIn)
{
    this.fillWithBlocks(worldIn, structureBoundingBoxIn, 0, 0, 0, 4, 1, 4, Blocks.NETHER_BRICK.getDefaultState(), Blocks.NETHER_BRICK.getDefaultState(), false);
    this.fillWithBlocks(worldIn, structureBoundingBoxIn, 0, 2, 0, 4, 5, 4, Blocks.AIR.getDefaultState(), Blocks.AIR.getDefaultState(), false);
    this.fillWithBlocks(worldIn, structureBoundingBoxIn, 4, 2, 0, 4, 5, 4, Blocks.NETHER_BRICK.getDefaultState(), Blocks.NETHER_BRICK.getDefaultState(), false);
    this.fillWithBlocks(worldIn, structureBoundingBoxIn, 4, 3, 1, 4, 4, 1, Blocks.NETHER_BRICK_FENCE.getDefaultState(), Blocks.NETHER_BRICK_FENCE.getDefaultState(), false);
    this.fillWithBlocks(worldIn, structureBoundingBoxIn, 4, 3, 3, 4, 4, 3, Blocks.NETHER_BRICK_FENCE.getDefaultState(), Blocks.NETHER_BRICK_FENCE.getDefaultState(), false);
    this.fillWithBlocks(worldIn, structureBoundingBoxIn, 0, 2, 0, 0, 5, 0, Blocks.NETHER_BRICK.getDefaultState(), Blocks.NETHER_BRICK.getDefaultState(), false);
    this.fillWithBlocks(worldIn, structureBoundingBoxIn, 0, 2, 4, 3, 5, 4, Blocks.NETHER_BRICK.getDefaultState(), Blocks.NETHER_BRICK.getDefaultState(), false);
    this.fillWithBlocks(worldIn, structureBoundingBoxIn, 1, 3, 4, 1, 4, 4, Blocks.NETHER_BRICK_FENCE.getDefaultState(), Blocks.NETHER_BRICK.getDefaultState(), false);
    this.fillWithBlocks(worldIn, structureBoundingBoxIn, 3, 3, 4, 3, 4, 4, Blocks.NETHER_BRICK_FENCE.getDefaultState(), Blocks.NETHER_BRICK.getDefaultState(), false);

    if (this.chest && structureBoundingBoxIn.isVecInside(new BlockPos(this.getXWithOffset(3, 3), this.getYWithOffset(2), this.getZWithOffset(3, 3))))
    {
        this.chest = false;
        this.generateChest(worldIn, structureBoundingBoxIn, randomIn, 3, 2, 3, LootTableList.CHESTS_NETHER_BRIDGE);
    }

    this.fillWithBlocks(worldIn, structureBoundingBoxIn, 0, 6, 0, 4, 6, 4, Blocks.NETHER_BRICK.getDefaultState(), Blocks.NETHER_BRICK.getDefaultState(), false);

    for (int i = 0; i <= 4; ++i)
    {
        for (int j = 0; j <= 4; ++j)
        {
            this.replaceAirAndLiquidDownwards(worldIn, Blocks.NETHER_BRICK.getDefaultState(), i, -1, j, structureBoundingBoxIn);
        }
    }

    return true;
}
 
開發者ID:F1r3w477,項目名稱:CustomWorldGen,代碼行數:35,代碼來源:StructureNetherBridgePieces.java


注:本文中的net.minecraft.world.storage.loot.LootTableList類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。