Update mappings to 09/21 snapshots.

Conflict with getMatrix in ITransformation, so renamed to getMatrixVec.
This commit is contained in:
LexManos committed 2018-09-22 03:40:22 -07:00
1 parent 5ed03945a0
commit 94e1a8e0a4
210 files changed
+1052 -978

No files matched your search

@@ -139,7 +139,7 @@ public interface IForgeBlock
*/
default boolean doesSideBlockRendering(IBlockState state, IWorldReader world, BlockPos pos, EnumFacing face)
{
return state.func_200015_d(world, pos);
return state.isOpaqueCube(world, pos);
}
/**
@@ -237,7 +237,7 @@ public interface IForgeBlock
{
if (world instanceof IWorldWriter)
{
((IWorldWriter)world).setBlockState(pos, state.func_206870_a(BlockBed.OCCUPIED,occupied), 4);
((IWorldWriter)world).setBlockState(pos, state.with(BlockBed.OCCUPIED,occupied), 4);
}
}
@@ -252,7 +252,7 @@ public interface IForgeBlock
*/
default EnumFacing getBedDirection(IBlockState state, IWorldReader world, BlockPos pos)
{
return state.getValue(BlockHorizontal.FACING);
return state.get(BlockHorizontal.HORIZONTAL_FACING);
}
/**
@@ -264,7 +264,7 @@ public interface IForgeBlock
*/
default boolean isBedFoot(IBlockState state, IWorldReader world, BlockPos pos)
{
return state.getValue(BlockBed.PART) == BedPart.FOOT;
return state.get(BlockBed.PART) == BedPart.FOOT;
}
/**
@@ -408,7 +408,7 @@ public interface IForgeBlock
default boolean canPlaceTorchOnTop(IBlockState state, IWorldReader world, BlockPos pos)
{
if (state.isTopSolid() || state.getBlockFaceShape(world, pos, EnumFacing.UP) == BlockFaceShape.SOLID)
return this.getBlock() != Blocks.END_GATEWAY && this.getBlock() != Blocks.field_196628_cT;
return this.getBlock() != Blocks.END_GATEWAY && this.getBlock() != Blocks.JACK_O_LANTERN;
else
return this.getBlock() instanceof BlockFence || this.getBlock() == Blocks.COBBLESTONE_WALL || this.getBlock() instanceof BlockGlass;
}
@@ -514,19 +514,19 @@ public interface IForgeBlock
return this.getBlock() == Blocks.CACTUS && this.getBlock() == Blocks.SAND;
}
if (plant.getBlock() == Blocks.field_196608_cF)
if (plant.getBlock() == Blocks.SUGAR_CANE)
{
return true;
}
if (plantable instanceof BlockBush && ((BlockBush)plantable).func_196260_a(state, world, pos))
if (plantable instanceof BlockBush && ((BlockBush)plantable).isValidPosition(state, world, pos))
{
return true;
}
switch (type)
{
case Desert: return this.getBlock() == Blocks.SAND || this.getBlock() == Blocks.HARDENED_CLAY ||
case Desert: return this.getBlock() == Blocks.SAND || this.getBlock() == Blocks.TERRACOTTA ||
this.getBlock() instanceof BlockGlazedTerracotta;
case Nether: return this.getBlock() == Blocks.SOUL_SAND;
case Crop: return this.getBlock() == Blocks.FARMLAND;
@@ -578,7 +578,7 @@ public interface IForgeBlock
default boolean isFertile(IBlockState state, IWorldReader world, BlockPos pos)
{
if (this.getBlock() == Blocks.FARMLAND)
return state.getValue(BlockFarmland.MOISTURE) > 0;
return state.get(BlockFarmland.MOISTURE) > 0;
return false;
}
@@ -598,7 +598,7 @@ public interface IForgeBlock
*/
default int getLightOpacity(IBlockState state, IWorldReader world, BlockPos pos)
{
return state.func_200016_a(world, pos);
return state.getOpacity(world, pos);
}
/**
@@ -630,7 +630,7 @@ public interface IForgeBlock
default boolean rotateBlock(IBlockState state, IWorld world, BlockPos pos, EnumFacing axis)
{
state.func_206871_b().keySet().forEach(prop ->
state.getValues().keySet().forEach(prop ->
{
if (prop.getName().equals("facing") || prop.getName().equals("rotation") && prop.getValueClass() == EnumFacing.class)
{
@@ -640,13 +640,13 @@ public interface IForgeBlock
IBlockState newState;
@SuppressWarnings("unchecked")
IProperty<EnumFacing> facingIProperty = (IProperty<EnumFacing>) prop;
EnumFacing facing = state.getValue(facingIProperty);
EnumFacing facing = state.get(facingIProperty);
Collection<EnumFacing> validFacing = facingIProperty.getAllowedValues();
// rotate horizontal facings clockwise
if (validFacing.size() == 4 && !validFacing.contains(EnumFacing.UP) && !validFacing.contains(EnumFacing.DOWN))
{
newState = state.func_206870_a(facingIProperty, facing.rotateY());
newState = state.with(facingIProperty, facing.rotateY());
}
else
{
@@ -654,11 +654,11 @@ public interface IForgeBlock
EnumFacing rotatedFacing = facing.rotateAround(axis.getAxis());
if (validFacing.contains(rotatedFacing))
{
newState = state.func_206870_a(facingIProperty, rotatedFacing);
newState = state.with(facingIProperty, rotatedFacing);
}
else // abnormal facing property, just cycle it
{
newState = state.cycleProperty(facingIProperty);
newState = state.cycle(facingIProperty);
}
}
@@ -879,7 +879,7 @@ public interface IForgeBlock
@SuppressWarnings("deprecation")
default IBlockState getStateForPlacement(IBlockState state, EnumFacing facing, IBlockState state2, IWorld world, BlockPos pos1, BlockPos pos2, EnumHand hand)
{
return this.getBlock().func_196271_a(state, facing, state2, world, pos1, pos2);
return this.getBlock().updatePostPlacement(state, facing, state2, world, pos1, pos2);
}
@@ -52,7 +52,7 @@ public interface IForgeEntity extends ICapabilitySerializable<NBTTagCompound>
default void deserializeNBT(NBTTagCompound nbt)
{
getEntity().readFromNBT(nbt);
getEntity().read(nbt);
}
default NBTTagCompound serializeNBT()
@@ -63,7 +63,7 @@ public interface IForgeEntity extends ICapabilitySerializable<NBTTagCompound>
{
ret.setString("id", getEntity().getEntityString());
}
return getEntity().writeToNBT(ret);
return getEntity().writeWithoutTypeId(ret);
}
boolean canUpdate();
@@ -125,7 +125,7 @@ public interface IForgeEntity extends ICapabilitySerializable<NBTTagCompound>
}
else
{
ItemSpawnEgg egg = ItemSpawnEgg.func_200889_b(getEntity().func_200600_R());
ItemSpawnEgg egg = ItemSpawnEgg.getEgg(getEntity().getType());
if (egg != null) return new ItemStack(egg);
}
return ItemStack.EMPTY;
@@ -52,7 +52,7 @@ public interface IForgeFluid
*/
default boolean isEntityInside(IFluidState state, IWorldReader world, BlockPos pos, Entity entity, double yToTest, Tag<Fluid> tag, boolean testingHead)
{
return state.func_206884_a(tag) && yToTest - pos.getY() < state.func_206885_f() + 0.1F;
return state.isTagged(tag) && yToTest - pos.getY() < state.getHeight() + 0.1F;
}
/**
@@ -96,6 +96,6 @@ public interface IForgeFluid
*/
default float getExplosionResistance(IFluidState state, IWorldReader world, BlockPos pos, @Nullable Entity exploder, Explosion explosion)
{
return state.func_210200_l();
return state.getExplosionResistance();
}
}
@@ -49,7 +49,7 @@ public interface IForgeFluidState
*/
default boolean isEntityInside(IWorldReader world, BlockPos pos, Entity entity, double yToTest, Tag<Fluid> tag, boolean testingHead)
{
return getFluidState().func_206886_c().isEntityInside(getFluidState(), world, pos, entity, yToTest, tag, testingHead);
return getFluidState().getFluid().isEntityInside(getFluidState(), world, pos, entity, yToTest, tag, testingHead);
}
@@ -65,6 +65,6 @@ public interface IForgeFluidState
*/
default float getExplosionResistance(IWorldReader world, BlockPos pos, @Nullable Entity exploder, Explosion explosion)
{
return getFluidState().func_206886_c().getExplosionResistance(getFluidState(), world, pos, exploder, explosion);
return getFluidState().getFluid().getExplosionResistance(getFluidState(), world, pos, exploder, explosion);
}
}
@@ -70,7 +70,7 @@ public interface IForgeItem
@SuppressWarnings("deprecation")
default Multimap<String, AttributeModifier> getAttributeModifiers(EntityEquipmentSlot slot, ItemStack stack)
{
return getItem().getItemAttributeModifiers(slot);
return getItem().getAttributeModifiers(slot);
}
/**
@@ -133,7 +133,7 @@ public interface IForgeItem
@Nullable
default NBTTagCompound getNBTShareTag(ItemStack stack)
{
return stack.getTagCompound();
return stack.getTag();
}
/**
@@ -145,7 +145,7 @@ public interface IForgeItem
*/
default void readNBTShareTag(ItemStack stack, @Nullable NBTTagCompound nbt)
{
stack.setTagCompound(nbt);
stack.setTag(nbt);
}
/**
@@ -286,7 +286,7 @@ public interface IForgeItem
*/
default java.util.Collection<ItemGroup> getCreativeTabs()
{
return java.util.Collections.singletonList(getItem().getCreativeTab());
return java.util.Collections.singletonList(getItem().getGroup());
}
/**
@@ -454,7 +454,7 @@ public interface IForgeItem
*/
default int getDamage(ItemStack stack)
{
return !stack.hasTagCompound() ? 0 : stack.getTagCompound().getInteger("Damage");
return !stack.hasTag() ? 0 : stack.getTag().getInt("Damage");
}
/**
@@ -467,7 +467,7 @@ public interface IForgeItem
*/
default boolean showDurabilityBar(ItemStack stack)
{
return stack.isItemDamaged();
return stack.isDamaged();
}
/**
@@ -479,7 +479,7 @@ public interface IForgeItem
*/
default double getDurabilityForDisplay(ItemStack stack)
{
return (double) stack.getItemDamage() / (double) stack.getMaxDamage();
return (double) stack.getDamage() / (double) stack.getMaxDamage();
}
/**
@@ -517,7 +517,7 @@ public interface IForgeItem
*/
default boolean isDamaged(ItemStack stack)
{
return stack.getItemDamage() > 0;
return stack.getDamage() > 0;
}
/**
@@ -529,7 +529,7 @@ public interface IForgeItem
*/
default void setDamage(ItemStack stack, int damage)
{
stack.func_196082_o().setInteger("Damage", Math.max(0, damage));
stack.getOrCreateTag().setInt("Damage", Math.max(0, damage));
}
/**
@@ -570,7 +570,7 @@ public interface IForgeItem
@SuppressWarnings("deprecation")
default int getItemStackLimit(ItemStack stack)
{
return getItem().getItemStackLimit();
return getItem().getMaxStackSize();
}
Set<ToolType> getToolTypes(ItemStack stack);
@@ -654,7 +654,7 @@ public interface IForgeItem
default boolean shouldCauseBlockBreakReset(ItemStack oldStack, ItemStack newStack)
{
return !(newStack.getItem() == oldStack.getItem() && ItemStack.areItemStackTagsEqual(newStack, oldStack)
&& (newStack.isItemStackDamageable() || newStack.getItemDamage() == oldStack.getItemDamage()));
&& (newStack.isDamageable() || newStack.getDamage() == oldStack.getDamage()));
}
/**
@@ -704,7 +704,7 @@ public interface IForgeItem
.builder();
for (ResourceLocation location : ((RegistrySimple<ResourceLocation, IItemPropertyGetter>) getItem().properties).getKeys())
{
final IItemPropertyGetter parameter = getItem().properties.getObject(location);
final IItemPropertyGetter parameter = getItem().properties.get(location);
builder.put(location.toString(), input -> parameter.call(stack, world, entity));
}
return builder.build();
@@ -101,16 +101,16 @@ public interface IForgeItemStack extends ICapabilitySerializable<NBTTagCompound>
default EnumActionResult onItemUseFirst(ItemUseContext context)
{
EntityPlayer entityplayer = context.func_195999_j();
BlockPos blockpos = context.func_195995_a();
BlockWorldState blockworldstate = new BlockWorldState(context.func_195991_k(), blockpos, false);
if (entityplayer != null && !entityplayer.capabilities.allowEdit && !getStack().func_206847_b(context.func_195991_k().func_205772_D(), blockworldstate)) {
EntityPlayer entityplayer = context.getPlayer();
BlockPos blockpos = context.getPos();
BlockWorldState blockworldstate = new BlockWorldState(context.getWorld(), blockpos, false);
if (entityplayer != null && !entityplayer.abilities.allowEdit && !getStack().canPlaceOn(context.getWorld().getTags(), blockworldstate)) {
return EnumActionResult.PASS;
} else {
Item item = getStack().getItem();
EnumActionResult enumactionresult = item.onItemUseFirst(getStack(), context);
if (entityplayer != null && enumactionresult == EnumActionResult.SUCCESS) {
entityplayer.addStat(StatList.OBJECT_USE_STATS.func_199076_b(item));
entityplayer.addStat(StatList.ITEM_USED.get(item));
}
return enumactionresult;
@@ -120,7 +120,7 @@ public interface IForgeItemStack extends ICapabilitySerializable<NBTTagCompound>
default NBTTagCompound serializeNBT()
{
NBTTagCompound ret = new NBTTagCompound();
getStack().writeToNBT(ret);
getStack().write(ret);
return ret;
}
@@ -30,14 +30,14 @@ public interface IForgeTileEntity extends ICapabilitySerializable<NBTTagCompound
@Override
default void deserializeNBT(NBTTagCompound nbt)
{
getTileEntity().readFromNBT(nbt);
getTileEntity().read(nbt);
}
@Override
default NBTTagCompound serializeNBT()
{
NBTTagCompound ret = new NBTTagCompound();
getTileEntity().writeToNBT(ret);
getTileEntity().write(ret);
return ret;
}
}