本文整理汇总了Java中net.minecraft.util.datafix.IDataFixer类的典型用法代码示例。如果您正苦于以下问题:Java IDataFixer类的具体用法?Java IDataFixer怎么用?Java IDataFixer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IDataFixer类属于net.minecraft.util.datafix包,在下文中一共展示了IDataFixer类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: func_190533_a
import net.minecraft.util.datafix.IDataFixer; //导入依赖的package包/类
public static void func_190533_a(DataFixer p_190533_0_)
{
p_190533_0_.registerWalker(FixTypes.ENTITY, new IDataWalker()
{
public NBTTagCompound process(IDataFixer fixer, NBTTagCompound compound, int versionIn)
{
if (compound.hasKey("Passengers", 9))
{
NBTTagList nbttaglist = compound.getTagList("Passengers", 10);
for (int i = 0; i < nbttaglist.tagCount(); ++i)
{
nbttaglist.set(i, fixer.process(FixTypes.ENTITY, nbttaglist.getCompoundTagAt(i), versionIn));
}
}
return compound;
}
});
}
示例2: func_191522_a
import net.minecraft.util.datafix.IDataFixer; //导入依赖的package包/类
public static void func_191522_a(DataFixer p_191522_0_)
{
p_191522_0_.registerWalker(FixTypes.PLAYER, new IDataWalker()
{
public NBTTagCompound process(IDataFixer fixer, NBTTagCompound compound, int versionIn)
{
if (compound.hasKey("RootVehicle", 10))
{
NBTTagCompound nbttagcompound = compound.getCompoundTag("RootVehicle");
if (nbttagcompound.hasKey("Entity", 10))
{
nbttagcompound.setTag("Entity", fixer.process(FixTypes.ENTITY, nbttagcompound.getCompoundTag("Entity"), versionIn));
}
}
return compound;
}
});
}
示例3: func_189670_a
import net.minecraft.util.datafix.IDataFixer; //导入依赖的package包/类
public static void func_189670_a(DataFixer p_189670_0_)
{
EntityMinecart.func_189669_a(p_189670_0_, "MinecartCommandBlock");
p_189670_0_.registerWalker(FixTypes.ENTITY, new IDataWalker()
{
public NBTTagCompound process(IDataFixer fixer, NBTTagCompound compound, int versionIn)
{
if ("MinecartCommandBlock".equals(compound.getString("id")))
{
compound.setString("id", "Control");
fixer.process(FixTypes.BLOCK_ENTITY, compound, versionIn);
compound.setString("id", "MinecartCommandBlock");
}
return compound;
}
});
}
示例4: func_189672_a
import net.minecraft.util.datafix.IDataFixer; //导入依赖的package包/类
public static void func_189672_a(DataFixer p_189672_0_)
{
func_189669_a(p_189672_0_, "MinecartSpawner");
p_189672_0_.registerWalker(FixTypes.ENTITY, new IDataWalker()
{
public NBTTagCompound process(IDataFixer fixer, NBTTagCompound compound, int versionIn)
{
if ("MinecartSpawner".equals(compound.getString("id")))
{
compound.setString("id", "MobSpawner");
fixer.process(FixTypes.BLOCK_ENTITY, compound, versionIn);
compound.setString("id", "MinecartSpawner");
}
return compound;
}
});
}
示例5: func_191158_a
import net.minecraft.util.datafix.IDataFixer; //导入依赖的package包/类
public static void func_191158_a(DataFixer p_191158_0_)
{
p_191158_0_.registerWalker(FixTypes.STRUCTURE, new IDataWalker()
{
public NBTTagCompound process(IDataFixer fixer, NBTTagCompound compound, int versionIn)
{
if (compound.hasKey("entities", 9))
{
NBTTagList nbttaglist = compound.getTagList("entities", 10);
for (int i = 0; i < nbttaglist.tagCount(); ++i)
{
NBTTagCompound nbttagcompound = (NBTTagCompound)nbttaglist.get(i);
if (nbttagcompound.hasKey("nbt", 10))
{
nbttagcompound.setTag("nbt", fixer.process(FixTypes.ENTITY, nbttagcompound.getCompoundTag("nbt"), versionIn));
}
}
}
if (compound.hasKey("blocks", 9))
{
NBTTagList nbttaglist1 = compound.getTagList("blocks", 10);
for (int j = 0; j < nbttaglist1.tagCount(); ++j)
{
NBTTagCompound nbttagcompound1 = (NBTTagCompound)nbttaglist1.get(j);
if (nbttagcompound1.hasKey("nbt", 10))
{
nbttagcompound1.setTag("nbt", fixer.process(FixTypes.BLOCK_ENTITY, nbttagcompound1.getCompoundTag("nbt"), versionIn));
}
}
}
return compound;
}
});
}
示例6: filteredProcess
import net.minecraft.util.datafix.IDataFixer; //导入依赖的package包/类
NBTTagCompound filteredProcess(IDataFixer fixer, NBTTagCompound compound, int versionIn)
{
for (String s : this.matchingTags)
{
compound = DataFixesManager.processItemStack(fixer, compound, versionIn, s);
}
return compound;
}
示例7: process
import net.minecraft.util.datafix.IDataFixer; //导入依赖的package包/类
public NBTTagCompound process(IDataFixer fixer, NBTTagCompound compound, int versionIn)
{
if (!compound.hasKey("tag", 10))
{
return compound;
}
else
{
NBTTagCompound nbttagcompound = compound.getCompoundTag("tag");
if (nbttagcompound.hasKey("BlockEntityTag", 10))
{
NBTTagCompound nbttagcompound1 = nbttagcompound.getCompoundTag("BlockEntityTag");
String s = compound.getString("id");
String s1 = getBlockEntityID(versionIn, s);
boolean flag;
if (s1 == null)
{
LOGGER.warn("Unable to resolve BlockEntity for ItemInstance: {}", new Object[] {s});
flag = false;
}
else
{
flag = !nbttagcompound1.hasKey("id");
nbttagcompound1.setString("id", s1);
}
fixer.process(FixTypes.BLOCK_ENTITY, nbttagcompound1, versionIn);
if (flag)
{
nbttagcompound1.removeTag("id");
}
}
return compound;
}
}
示例8: process
import net.minecraft.util.datafix.IDataFixer; //导入依赖的package包/类
public NBTTagCompound process(IDataFixer fixer, NBTTagCompound compound, int versionIn)
{
if ((new ResourceLocation(compound.getString("id"))).equals(this.key))
{
compound = this.filteredProcess(fixer, compound, versionIn);
}
return compound;
}
示例9: filteredProcess
import net.minecraft.util.datafix.IDataFixer; //导入依赖的package包/类
NBTTagCompound filteredProcess(IDataFixer fixer, NBTTagCompound compound, int versionIn)
{
for (String s : this.matchingTags)
{
compound = DataFixesManager.processInventory(fixer, compound, versionIn, s);
}
return compound;
}
示例10: process
import net.minecraft.util.datafix.IDataFixer; //导入依赖的package包/类
public NBTTagCompound process(IDataFixer fixer, NBTTagCompound compound, int versionIn)
{
if (!compound.hasKey("tag", 10))
{
return compound;
}
else
{
NBTTagCompound nbttagcompound = compound.getCompoundTag("tag");
if (nbttagcompound.hasKey("BlockEntityTag", 10))
{
NBTTagCompound nbttagcompound1 = nbttagcompound.getCompoundTag("BlockEntityTag");
String s = compound.getString("id");
String s1 = getBlockEntityID(s);
boolean flag;
if (s1 == null)
{
LOGGER.warn("Unable to resolve BlockEntity for ItemInstance: {}", new Object[] {s});
flag = false;
}
else
{
flag = !nbttagcompound1.hasKey("id");
nbttagcompound1.setString("id", s1);
}
fixer.process(FixTypes.BLOCK_ENTITY, nbttagcompound1, versionIn);
if (flag)
{
nbttagcompound1.removeTag("id");
}
}
return compound;
}
}
示例11: process
import net.minecraft.util.datafix.IDataFixer; //导入依赖的package包/类
public NBTTagCompound process(IDataFixer fixer, NBTTagCompound compound, int versionIn)
{
if (compound.getString(this.key).equals(this.value))
{
compound = this.filteredProcess(fixer, compound, versionIn);
}
return compound;
}
示例12: func_189806_a
import net.minecraft.util.datafix.IDataFixer; //导入依赖的package包/类
public static void func_189806_a(DataFixer p_189806_0_)
{
p_189806_0_.registerWalker(FixTypes.PLAYER, new IDataWalker()
{
public NBTTagCompound process(IDataFixer fixer, NBTTagCompound compound, int versionIn)
{
DataFixesManager.processInventory(fixer, compound, versionIn, "Inventory");
DataFixesManager.processInventory(fixer, compound, versionIn, "EnderItems");
return compound;
}
});
}
示例13: func_189785_b
import net.minecraft.util.datafix.IDataFixer; //导入依赖的package包/类
public static void func_189785_b(DataFixer p_189785_0_)
{
EntityLiving.func_189752_a(p_189785_0_, "Villager");
p_189785_0_.registerWalker(FixTypes.ENTITY, new ItemStackDataLists("Villager", new String[] {"Inventory"}));
p_189785_0_.registerWalker(FixTypes.ENTITY, new IDataWalker()
{
public NBTTagCompound process(IDataFixer fixer, NBTTagCompound compound, int versionIn)
{
if ("Villager".equals(compound.getString("id")) && compound.hasKey("Offers", 10))
{
NBTTagCompound nbttagcompound = compound.getCompoundTag("Offers");
if (nbttagcompound.hasKey("Recipes", 9))
{
NBTTagList nbttaglist = nbttagcompound.getTagList("Recipes", 10);
for (int i = 0; i < nbttaglist.tagCount(); ++i)
{
NBTTagCompound nbttagcompound1 = nbttaglist.getCompoundTagAt(i);
DataFixesManager.processItemStack(fixer, nbttagcompound1, versionIn, "buy");
DataFixesManager.processItemStack(fixer, nbttagcompound1, versionIn, "buyB");
DataFixesManager.processItemStack(fixer, nbttagcompound1, versionIn, "sell");
nbttaglist.set(i, nbttagcompound1);
}
}
}
return compound;
}
});
}
示例14: processTag
import net.minecraft.util.datafix.IDataFixer; //导入依赖的package包/类
@Override
protected NBTTagCompound processTag(IDataFixer fixer, NBTTagCompound compound, int version) {
for (String tag : tags)
compound = DataFixesManager.processInventory(fixer, compound, version, tag);
return compound;
}
示例15: process
import net.minecraft.util.datafix.IDataFixer; //导入依赖的package包/类
@Override
public NBTTagCompound process(IDataFixer fixer, NBTTagCompound compound, int version) {
final ResourceLocation id = new ResourceLocation(compound.getString(idTag));
final ResourceLocation expected = entry.getRegistryName();
if (id.equals(expected)) return processImpl(fixer, compound, version);
return compound;
}