本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
}
示例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();
}
示例11: getVillageCollection
import net.minecraft.village.VillageCollection; //导入依赖的package包/类
public VillageCollection getVillageCollection()
{
return this.villageCollectionObj;
}
示例12: getVillageCollection
import net.minecraft.village.VillageCollection; //导入依赖的package包/类
@Override
public VillageCollection getVillageCollection()
{
return this.parent.getVillageCollection();
}
示例13: getVillageCollection
import net.minecraft.village.VillageCollection; //导入依赖的package包/类
@Override
public @Nonnull VillageCollection getVillageCollection() {
return wrapped.getVillageCollection();
}