当前位置: 首页>>代码示例>>Java>>正文


Java VillageCollection类代码示例

本文整理汇总了Java中net.minecraft.village.VillageCollection的典型用法代码示例。如果您正苦于以下问题:Java VillageCollection类的具体用法?Java VillageCollection怎么用?Java VillageCollection使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


VillageCollection类属于net.minecraft.village包,在下文中一共展示了VillageCollection类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: init

import net.minecraft.village.VillageCollection; //导入依赖的package包/类
public World init()
{
    this.mapStorage = this.delegate.getMapStorage();
    this.worldScoreboard = this.delegate.getScoreboard();
    String s = VillageCollection.fileNameForProvider(this.provider);
    VillageCollection villagecollection = (VillageCollection)this.mapStorage.loadData(VillageCollection.class, s);

    if (villagecollection == null)
    {
        this.villageCollectionObj = new VillageCollection(this);
        this.mapStorage.setData(s, this.villageCollectionObj);
    }
    else
    {
        this.villageCollectionObj = villagecollection;
        this.villageCollectionObj.setWorldsForAll(this);
    }

    return this;
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:21,代码来源:WorldServerMulti.java

示例2: init

import net.minecraft.village.VillageCollection; //导入依赖的package包/类
public World init()
{
    this.mapStorage = this.delegate.getMapStorage();
    this.worldScoreboard = this.delegate.getScoreboard();
    this.lootTable = this.delegate.getLootTableManager();
    String s = VillageCollection.fileNameForProvider(this.provider);
    VillageCollection villagecollection = (VillageCollection)this.mapStorage.getOrLoadData(VillageCollection.class, s);

    if (villagecollection == null)
    {
        this.villageCollectionObj = new VillageCollection(this);
        this.mapStorage.setData(s, this.villageCollectionObj);
    }
    else
    {
        this.villageCollectionObj = villagecollection;
        this.villageCollectionObj.setWorldsForAll(this);
    }

    return this;
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:22,代码来源:WorldServerMulti.java

示例3: init

import net.minecraft.village.VillageCollection; //导入依赖的package包/类
public World init()
{
    this.mapStorage = this.delegate.getMapStorage();
    this.worldScoreboard = this.delegate.getScoreboard();
    this.lootTable = this.delegate.getLootTableManager();
    String s = VillageCollection.fileNameForProvider(this.provider);
    VillageCollection villagecollection = (VillageCollection)this.perWorldStorage.getOrLoadData(VillageCollection.class, s);

    if (villagecollection == null)
    {
        this.villageCollectionObj = new VillageCollection(this);
        this.perWorldStorage.setData(s, this.villageCollectionObj);
    }
    else
    {
        this.villageCollectionObj = villagecollection;
        this.villageCollectionObj.setWorldsForAll(this);
    }

    this.initCapabilities();
    return this;
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:23,代码来源:WorldServerMulti.java

示例4: init

import net.minecraft.village.VillageCollection; //导入依赖的package包/类
public World init()
{
    this.mapStorage = this.delegate.getMapStorage();
    this.worldScoreboard = this.delegate.getScoreboard();
    this.lootTable = this.delegate.getLootTableManager();
    String s = VillageCollection.fileNameForProvider(this.provider);
    VillageCollection villagecollection = (VillageCollection)this.perWorldStorage.getOrLoadData(VillageCollection.class, s);

    if (villagecollection == null)
    {
        this.villageCollection = new VillageCollection(this);
        this.perWorldStorage.setData(s, this.villageCollection);
    }
    else
    {
        this.villageCollection = villagecollection;
        this.villageCollection.setWorldsForAll(this);
    }

    return this;
}
 
开发者ID:lumien231,项目名称:Simple-Dimensions,代码行数:22,代码来源:WorldCustom.java

示例5: tickEvent

import net.minecraft.village.VillageCollection; //导入依赖的package包/类
@SubscribeEvent
public void tickEvent(@Nonnull final TickEvent.PlayerTickEvent event) {
	if (event.phase == Phase.END && event.side == Side.SERVER) {
		final EntityPlayer player = event.player;
		final VillageCollection villageCollection = player.getEntityWorld().getVillageCollection();
		boolean inVillage = false;

		if (villageCollection != null) {
			final List<Village> villages = villageCollection.getVillageList();
			if (villages != null && villages.size() > 0) {
				final BlockPos pos = player.getPosition();
				for (final Village v : villages)
					if (v.isBlockPosWithinSqVillageRadius(pos)) {
						inVillage = true;
						break;
					}
			}
		}

		final PacketEnvironment packet = new PacketEnvironment(inVillage);
		Network.sendToPlayer((EntityPlayerMP) player, packet);
	}
}
 
开发者ID:OreCruncher,项目名称:DynamicSurroundings,代码行数:24,代码来源:EnvironmentService.java

示例6: finishSetup

import net.minecraft.village.VillageCollection; //导入依赖的package包/类
@SideOnly(Side.CLIENT)
protected void finishSetup()
{
    VillageCollection villagecollection = (VillageCollection)this.mapStorage.loadData(VillageCollection.class, "villages");

    if (villagecollection == null)
    {
        this.villageCollectionObj = new VillageCollection(this);
        this.mapStorage.setData("villages", this.villageCollectionObj);
    }
    else
    {
        this.villageCollectionObj = villagecollection;
        this.villageCollectionObj.func_82566_a(this);
    }

    // Guarantee the dimension ID was not reset by the provider
    int providerDim = this.provider.dimensionId;
    this.provider.registerWorld(this);
    this.provider.dimensionId = providerDim;
    this.chunkProvider = this.createChunkProvider();
    this.calculateInitialSkylight();
    this.calculateInitialWeather();
}
 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:25,代码来源:World.java

示例7: World

import net.minecraft.village.VillageCollection; //导入依赖的package包/类
@SideOnly(Side.CLIENT)
public World(ISaveHandler p_i1953_1_, String p_i1953_2_, WorldProvider p_i1953_3_, WorldSettings p_i1953_4_, Profiler p_i1953_5_, ILogAgent p_i1953_6_) {
   this.field_72990_M = this.field_73012_v.nextInt(12000);
   this.field_72994_J = new int['\u8000'];
   this.field_73019_z = p_i1953_1_;
   this.field_72984_F = p_i1953_5_;
   this.field_72986_A = new WorldInfo(p_i1953_4_, p_i1953_2_);
   this.field_73011_w = p_i1953_3_;
   this.field_72988_C = new MapStorage(p_i1953_1_);
   this.field_98181_L = p_i1953_6_;
   VillageCollection var7 = (VillageCollection)this.field_72988_C.func_75742_a(VillageCollection.class, "villages");
   if(var7 == null) {
      this.field_72982_D = new VillageCollection(this);
      this.field_72988_C.func_75745_a("villages", this.field_72982_D);
   } else {
      this.field_72982_D = var7;
      this.field_72982_D.func_82566_a(this);
   }

   p_i1953_3_.func_76558_a(this);
   this.field_73020_y = this.func_72970_h();
   this.func_72966_v();
   this.func_72947_a();
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:25,代码来源:World.java

示例8: finishSetup

import net.minecraft.village.VillageCollection; //导入依赖的package包/类
@SideOnly(Side.CLIENT)
protected void finishSetup()
{
    VillageCollection villagecollection = (VillageCollection)this.mapStorage.loadData(VillageCollection.class, "villages");

    if (villagecollection == null)
    {
        this.villageCollectionObj = new VillageCollection(this);
        this.mapStorage.setData("villages", this.villageCollectionObj);
    }
    else
    {
        this.villageCollectionObj = villagecollection;
        this.villageCollectionObj.func_82566_a(this);
    }
    // Guarantee the dimension ID was not reset by the provider
    int providerDim = this.provider.dimensionId;
    this.provider.registerWorld(this);
    this.provider.dimensionId = providerDim;
    this.chunkProvider = this.createChunkProvider();
    this.calculateInitialSkylight();
    this.calculateInitialWeather();
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:24,代码来源:World.java

示例9: getVillageCollection

import net.minecraft.village.VillageCollection; //导入依赖的package包/类
@Override
public VillageCollection getVillageCollection() {
	if (m_proxyWorld != null && Util.isPrefixInCallStack(m_modPrefix)) {
		return m_proxyWorld.getVillageCollection();
	} else if (m_realWorld != null) {
		return m_realWorld.getVillageCollection();
	} else {
		return super.getVillageCollection();
	}
}
 
开发者ID:orbwoi,项目名称:UniversalRemote,代码行数:11,代码来源:WorldServerProxy.java

示例10: World

import net.minecraft.village.VillageCollection; //导入依赖的package包/类
public World(ISaveHandler p_i45368_1_, String p_i45368_2_, WorldProvider p_i45368_3_, WorldSettings p_i45368_4_, Profiler p_i45368_5_)
{
    this.ambientTickCountdown = this.rand.nextInt(12000);
    this.spawnHostileMobs = true;
    this.spawnPeacefulMobs = true;
    this.collidingBoundingBoxes = new ArrayList();
    this.lightUpdateBlockList = new int[32768];
    this.saveHandler = p_i45368_1_;
    this.theProfiler = p_i45368_5_;
    this.worldInfo = new WorldInfo(p_i45368_4_, p_i45368_2_);
    this.provider = p_i45368_3_;
    this.mapStorage = new MapStorage(p_i45368_1_);
    VillageCollection var6 = (VillageCollection)this.mapStorage.loadData(VillageCollection.class, "villages");

    if (var6 == null)
    {
        this.villageCollectionObj = new VillageCollection(this);
        this.mapStorage.setData("villages", this.villageCollectionObj);
    }
    else
    {
        this.villageCollectionObj = var6;
        this.villageCollectionObj.func_82566_a(this);
    }

    p_i45368_3_.registerWorld(this);
    this.chunkProvider = this.createChunkProvider();
    this.calculateInitialSkylight();
    this.calculateInitialWeather();
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:31,代码来源:World.java

示例11: getVillageCollection

import net.minecraft.village.VillageCollection; //导入依赖的package包/类
public VillageCollection getVillageCollection()
{
    return this.villageCollectionObj;
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:5,代码来源:World.java

示例12: getVillageCollection

import net.minecraft.village.VillageCollection; //导入依赖的package包/类
@Override
public VillageCollection getVillageCollection()
{
    return this.parent.getVillageCollection();
}
 
开发者ID:maruohon,项目名称:placementpreview,代码行数:6,代码来源:FakeWorld.java

示例13: getVillageCollection

import net.minecraft.village.VillageCollection; //导入依赖的package包/类
@Override
public @Nonnull VillageCollection getVillageCollection() {
  return wrapped.getVillageCollection();
}
 
开发者ID:SleepyTrousers,项目名称:EnderIO,代码行数:5,代码来源:PickupWorld.java


注:本文中的net.minecraft.village.VillageCollection类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。