当前位置: 首页>>代码示例>>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;未经允许,请勿转载。