Delete rejects that I initially processed.
This commit is contained in:
parent
41bd8a41fa
commit
5147742049
38 changed files with 0 additions and 954 deletions
|
@ -1,56 +0,0 @@
|
|||
++++ REJECTED PATCH 1
|
||||
public class Block
|
||||
{
|
||||
private static final ResourceLocation AIR_ID = new ResourceLocation("air");
|
||||
- public static final RegistryNamespacedDefaultedByKey blockRegistry = new RegistryNamespacedDefaultedByKey(AIR_ID);
|
||||
- public static final ObjectIntIdentityMap BLOCK_STATE_IDS = new ObjectIntIdentityMap();
|
||||
+ public static final RegistryNamespacedDefaultedByKey blockRegistry = net.minecraftforge.fml.common.registry.GameData.getBlockRegistry();
|
||||
+ @Deprecated //Modders: DO NOT use this! Use GameRegistry
|
||||
+ public static final ObjectIntIdentityMap BLOCK_STATE_IDS = net.minecraftforge.fml.common.registry.GameData.getBlockStateIDMap();
|
||||
private CreativeTabs displayOnCreativeTab;
|
||||
public static final Block.SoundType soundTypeStone = new Block.SoundType("stone", 1.0F, 1.0F);
|
||||
public static final Block.SoundType soundTypeWood = new Block.SoundType("wood", 1.0F, 1.0F);
|
||||
++++ END PATCH
|
||||
++++ REJECTED PATCH 7
|
||||
|
||||
public void onBlockAdded(World worldIn, BlockPos pos, IBlockState state) {}
|
||||
|
||||
- public void breakBlock(World worldIn, BlockPos pos, IBlockState state) {}
|
||||
+ public void breakBlock(World worldIn, BlockPos pos, IBlockState state)
|
||||
+ {
|
||||
+ if (hasTileEntity(state) && !(this instanceof BlockContainer))
|
||||
+ {
|
||||
+ worldIn.removeTileEntity(pos);
|
||||
+ }
|
||||
+ }
|
||||
|
||||
public int quantityDropped(Random random)
|
||||
{
|
||||
++++ END PATCH
|
||||
++++ REJECTED PATCH 9
|
||||
|
||||
public void dropBlockAsItemWithChance(World worldIn, BlockPos pos, IBlockState state, float chance, int fortune)
|
||||
{
|
||||
- if (!worldIn.isRemote)
|
||||
+ if (!worldIn.isRemote && !worldIn.restoringBlockSnapshots) // do not drop items while restoring blockstates, prevents item dupe
|
||||
{
|
||||
- int j = this.quantityDroppedWithBonus(fortune, worldIn.rand);
|
||||
+ java.util.List<ItemStack> items = getDrops(worldIn, pos, state, fortune);
|
||||
+ chance = net.minecraftforge.event.ForgeEventFactory.fireBlockHarvesting(items, worldIn, pos, state, fortune, chance, false, harvesters.get());
|
||||
|
||||
- for (int k = 0; k < j; ++k)
|
||||
+ for (ItemStack item : items)
|
||||
{
|
||||
if (worldIn.rand.nextFloat() <= chance)
|
||||
{
|
||||
- Item item = this.getItemDropped(state, worldIn.rand, fortune);
|
||||
-
|
||||
- if (item != null)
|
||||
- {
|
||||
- spawnAsEntity(worldIn, pos, new ItemStack(item, 1, this.damageDropped(state)));
|
||||
- }
|
||||
+ spawnAsEntity(worldIn, pos, item);
|
||||
}
|
||||
}
|
||||
}
|
||||
++++ END PATCH
|
|
@ -1,8 +0,0 @@
|
|||
++++ REJECTED PATCH 1
|
||||
}
|
||||
|
||||
public void dropBlockAsItemWithChance(World worldIn, BlockPos pos, IBlockState state, float chance, int fortune) {}
|
||||
+
|
||||
+ public boolean isReplaceable(World worldIn, BlockPos pos){ return true; }
|
||||
}
|
||||
++++ END PATCH
|
|
@ -1,15 +0,0 @@
|
|||
++++ REJECTED PATCH 1
|
||||
|
||||
public void dropBlockAsItemWithChance(World worldIn, BlockPos pos, IBlockState state, float chance, int fortune)
|
||||
{
|
||||
+ super.dropBlockAsItemWithChance(worldIn, pos, state, chance, fortune);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public java.util.List<ItemStack> getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
|
||||
+ {
|
||||
+ java.util.List<ItemStack> dropped = super.getDrops(world, pos, state, fortune);
|
||||
int j = ((Integer)state.getValue(AGE)).intValue();
|
||||
byte b0 = 1;
|
||||
|
||||
++++ END PATCH
|
|
@ -1,26 +0,0 @@
|
|||
++++ REJECTED PATCH 3
|
||||
public void dropBlockAsItemWithChance(World worldIn, BlockPos pos, IBlockState state, float chance, int fortune)
|
||||
{
|
||||
super.dropBlockAsItemWithChance(worldIn, pos, state, chance, 0);
|
||||
-
|
||||
- if (!worldIn.isRemote)
|
||||
- {
|
||||
- int j = ((Integer)state.getValue(AGE)).intValue();
|
||||
-
|
||||
- if (j >= 7)
|
||||
- {
|
||||
- int k = 3 + fortune;
|
||||
-
|
||||
- for (int l = 0; l < k; ++l)
|
||||
- {
|
||||
- if (worldIn.rand.nextInt(15) <= j)
|
||||
- {
|
||||
- spawnAsEntity(worldIn, pos, new ItemStack(this.getSeed(), 1, 0));
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
}
|
||||
|
||||
public Item getItemDropped(IBlockState state, Random rand, int fortune)
|
||||
++++ END PATCH
|
|
@ -1,40 +0,0 @@
|
|||
++++ REJECTED PATCH 2
|
||||
Object object = flag ? this : worldIn.getBlockState(blockpos1).getBlock();
|
||||
Object object1 = flag ? worldIn.getBlockState(blockpos2).getBlock() : this;
|
||||
|
||||
+ if (!flag) this.dropBlockAsItem(worldIn, pos, state, 0); //Forge move above the setting to air.
|
||||
+
|
||||
if (object == this)
|
||||
{
|
||||
worldIn.setBlockState(blockpos1, Blocks.air.getDefaultState(), 3);
|
||||
++++ END PATCH
|
||||
++++ REJECTED PATCH 3
|
||||
if (object1 == this)
|
||||
{
|
||||
worldIn.setBlockState(blockpos2, Blocks.air.getDefaultState(), 3);
|
||||
-
|
||||
- if (!flag)
|
||||
- {
|
||||
- this.dropBlockAsItem(worldIn, blockpos2, state, 0);
|
||||
- }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public boolean canBlockStay(World worldIn, BlockPos pos, IBlockState state)
|
||||
{
|
||||
+ if (state.getBlock() != this) return super.canBlockStay(worldIn, pos, state); //Forge: This function is called during world gen and placement, before this block is set, so if we are not 'here' then assume it's the pre-check.
|
||||
if (state.getValue(HALF) == BlockDoublePlant.EnumBlockHalf.UPPER)
|
||||
{
|
||||
return worldIn.getBlockState(pos.down()).getBlock() == this;
|
||||
++++ END PATCH
|
||||
++++ REJECTED PATCH 5
|
||||
else
|
||||
{
|
||||
player.triggerAchievement(StatList.mineBlockStatArray[Block.getIdFromBlock(this)]);
|
||||
- int i = (enumplanttype == BlockDoublePlant.EnumPlantType.GRASS ? BlockTallGrass.EnumType.GRASS : BlockTallGrass.EnumType.FERN).getMeta();
|
||||
- spawnAsEntity(worldIn, pos, new ItemStack(Blocks.tallgrass, 2, i));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
++++ END PATCH
|
|
@ -1,73 +0,0 @@
|
|||
++++ REJECTED PATCH 5
|
||||
b0 = -50;
|
||||
}
|
||||
|
||||
- this.catchOnFire(worldIn, pos.east(), 300 + b0, rand, i);
|
||||
- this.catchOnFire(worldIn, pos.west(), 300 + b0, rand, i);
|
||||
- this.catchOnFire(worldIn, pos.down(), 250 + b0, rand, i);
|
||||
- this.catchOnFire(worldIn, pos.up(), 250 + b0, rand, i);
|
||||
- this.catchOnFire(worldIn, pos.north(), 300 + b0, rand, i);
|
||||
- this.catchOnFire(worldIn, pos.south(), 300 + b0, rand, i);
|
||||
+ this.tryCatchFire(worldIn, pos.east(), 300 + b0, rand, i, EnumFacing.WEST);
|
||||
+ this.tryCatchFire(worldIn, pos.west(), 300 + b0, rand, i, EnumFacing.EAST);
|
||||
+ this.tryCatchFire(worldIn, pos.down(), 250 + b0, rand, i, EnumFacing.UP);
|
||||
+ this.tryCatchFire(worldIn, pos.up(), 250 + b0, rand, i, EnumFacing.DOWN);
|
||||
+ this.tryCatchFire(worldIn, pos.north(), 300 + b0, rand, i, EnumFacing.SOUTH);
|
||||
+ this.tryCatchFire(worldIn, pos.south(), 300 + b0, rand, i, EnumFacing.NORTH);
|
||||
|
||||
for (int j = -1; j <= 1; ++j)
|
||||
{
|
||||
++++ END PATCH
|
||||
++++ REJECTED PATCH 6
|
||||
return false;
|
||||
}
|
||||
|
||||
+ @Deprecated // Use Block.getFlammability
|
||||
public int getFlammability(Block blockIn)
|
||||
{
|
||||
Integer integer = (Integer)this.flammabilities.get(blockIn);
|
||||
return integer == null ? 0 : integer.intValue();
|
||||
}
|
||||
|
||||
+ @Deprecated // Use Block.getFlammability
|
||||
public int getEncouragement(Block blockIn)
|
||||
{
|
||||
Integer integer = (Integer)this.encouragements.get(blockIn);
|
||||
return integer == null ? 0 : integer.intValue();
|
||||
}
|
||||
|
||||
+ @Deprecated // Use tryCatchFire with face below
|
||||
private void catchOnFire(World worldIn, BlockPos pos, int chance, Random random, int age)
|
||||
{
|
||||
- int k = this.getFlammability(worldIn.getBlockState(pos).getBlock());
|
||||
+ this.tryCatchFire(worldIn, pos, chance, random, age, EnumFacing.UP);
|
||||
+ }
|
||||
|
||||
+ private void tryCatchFire(World worldIn, BlockPos pos, int chance, Random random, int age, EnumFacing face)
|
||||
+ {
|
||||
+ int k = worldIn.getBlockState(pos).getBlock().getFlammability(worldIn, pos, face);
|
||||
+
|
||||
if (random.nextInt(chance) < k)
|
||||
{
|
||||
IBlockState iblockstate = worldIn.getBlockState(pos);
|
||||
++++ END PATCH
|
||||
++++ REJECTED PATCH 7
|
||||
{
|
||||
EnumFacing enumfacing = aenumfacing[j];
|
||||
|
||||
- if (this.canCatchFire(worldIn, pos.offset(enumfacing)))
|
||||
+ if (this.canCatchFire(worldIn, pos.offset(enumfacing), enumfacing.getOpposite()))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
++++ END PATCH
|
||||
++++ REJECTED PATCH 8
|
||||
for (int k = 0; k < j; ++k)
|
||||
{
|
||||
EnumFacing enumfacing = aenumfacing[k];
|
||||
- i = Math.max(this.getEncouragement(worldIn.getBlockState(pos.offset(enumfacing)).getBlock()), i);
|
||||
+ i = Math.max(worldIn.getBlockState(pos.offset(enumfacing)).getBlock().getFlammability(worldIn, pos.offset(enumfacing), enumfacing.getOpposite()), i);
|
||||
}
|
||||
|
||||
return i;
|
||||
++++ END PATCH
|
|
@ -1,32 +0,0 @@
|
|||
++++ REJECTED PATCH 2
|
||||
Block block = worldIn.getBlockState(blockpos1.up()).getBlock();
|
||||
IBlockState iblockstate1 = worldIn.getBlockState(blockpos1);
|
||||
|
||||
- if (iblockstate1.getBlock() == Blocks.dirt && iblockstate1.getValue(BlockDirt.VARIANT) == BlockDirt.DirtType.DIRT && worldIn.getLightFromNeighbors(blockpos1.up()) >= 4 && block.getLightOpacity() <= 2)
|
||||
+ if (iblockstate1.getBlock() == Blocks.dirt && iblockstate1.getValue(BlockDirt.VARIANT) == BlockDirt.DirtType.DIRT && worldIn.getLightFromNeighbors(blockpos1.up()) >= 4 && block.getLightOpacity(worldIn, blockpos1.up()) <= 2)
|
||||
{
|
||||
worldIn.setBlockState(blockpos1, Blocks.grass.getDefaultState());
|
||||
}
|
||||
++++ END PATCH
|
||||
++++ REJECTED PATCH 3
|
||||
continue;
|
||||
}
|
||||
}
|
||||
- else if (worldIn.getBlockState(blockpos2).getBlock().blockMaterial == Material.air)
|
||||
+ else if (worldIn.isAirBlock(blockpos2))
|
||||
{
|
||||
if (rand.nextInt(8) == 0)
|
||||
{
|
||||
- BlockFlower.EnumFlowerType enumflowertype = worldIn.getBiomeGenForCoords(blockpos2).pickRandomFlower(rand, blockpos2);
|
||||
- BlockFlower blockflower = enumflowertype.getBlockType().getBlock();
|
||||
- IBlockState iblockstate1 = blockflower.getDefaultState().withProperty(blockflower.getTypeProperty(), enumflowertype);
|
||||
-
|
||||
- if (blockflower.canBlockStay(worldIn, blockpos2, iblockstate1))
|
||||
- {
|
||||
- worldIn.setBlockState(blockpos2, iblockstate1, 3);
|
||||
- }
|
||||
+ worldIn.getBiomeGenForCoords(blockpos2).plantFlower(worldIn, rand, blockpos2);
|
||||
}
|
||||
else
|
||||
{
|
||||
++++ END PATCH
|
|
@ -1,10 +0,0 @@
|
|||
++++ REJECTED PATCH 3
|
||||
return new BlockState(this, new IProperty[] {FACING});
|
||||
}
|
||||
|
||||
+ @Override public boolean isLadder(IBlockAccess world, BlockPos pos, EntityLivingBase entity) { return true; }
|
||||
+
|
||||
static final class SwitchEnumFacing
|
||||
{
|
||||
static final int[] FACING_LOOKUP = new int[EnumFacing.values().length];
|
||||
++++ END PATCH
|
|
@ -1,73 +0,0 @@
|
|||
++++ REJECTED PATCH 2
|
||||
BlockPos blockpos1 = pos.add(i1, j1, k1);
|
||||
IBlockState iblockstate1 = worldIn.getBlockState(blockpos1);
|
||||
|
||||
- if (iblockstate1.getBlock().getMaterial() == Material.leaves && !((Boolean)iblockstate1.getValue(CHECK_DECAY)).booleanValue())
|
||||
+ if (iblockstate1.getBlock().isLeaves(worldIn, blockpos1))
|
||||
{
|
||||
- worldIn.setBlockState(blockpos1, iblockstate1.withProperty(CHECK_DECAY, Boolean.valueOf(true)), 4);
|
||||
+ iblockstate1.getBlock().beginLeavesDecay(worldIn, blockpos1);
|
||||
}
|
||||
}
|
||||
}
|
||||
++++ END PATCH
|
||||
++++ REJECTED PATCH 3
|
||||
{
|
||||
for (i2 = -b0; i2 <= b0; ++i2)
|
||||
{
|
||||
- Block block = worldIn.getBlockState(new BlockPos(j + k1, k + l1, l + i2)).getBlock();
|
||||
+ BlockPos tmp = new BlockPos(j + k1, k + l1, l + i2);
|
||||
+ Block block = worldIn.getBlockState(tmp).getBlock();
|
||||
|
||||
- if (block != Blocks.log && block != Blocks.log2)
|
||||
+ if (!block.canSustainLeaves(worldIn, tmp))
|
||||
{
|
||||
- if (block.getMaterial() == Material.leaves)
|
||||
+ if (block.isLeaves(worldIn, tmp))
|
||||
{
|
||||
this.surroundings[(k1 + j1) * i1 + (l1 + j1) * b1 + i2 + j1] = -2;
|
||||
}
|
||||
++++ END PATCH
|
||||
++++ REJECTED PATCH 4
|
||||
|
||||
public void dropBlockAsItemWithChance(World worldIn, BlockPos pos, IBlockState state, float chance, int fortune)
|
||||
{
|
||||
- if (!worldIn.isRemote)
|
||||
- {
|
||||
- int j = this.getSaplingDropChance(state);
|
||||
-
|
||||
- if (fortune > 0)
|
||||
- {
|
||||
- j -= 2 << fortune;
|
||||
-
|
||||
- if (j < 10)
|
||||
- {
|
||||
- j = 10;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- if (worldIn.rand.nextInt(j) == 0)
|
||||
- {
|
||||
- Item item = this.getItemDropped(state, worldIn.rand, fortune);
|
||||
- spawnAsEntity(worldIn, pos, new ItemStack(item, 1, this.damageDropped(state)));
|
||||
- }
|
||||
-
|
||||
- j = 200;
|
||||
-
|
||||
- if (fortune > 0)
|
||||
- {
|
||||
- j -= 10 << fortune;
|
||||
-
|
||||
- if (j < 40)
|
||||
- {
|
||||
- j = 40;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- this.dropApple(worldIn, pos, state, j);
|
||||
- }
|
||||
+ super.dropBlockAsItemWithChance(worldIn, pos, state, chance, fortune);
|
||||
}
|
||||
|
||||
protected void dropApple(World worldIn, BlockPos pos, IBlockState state, int chance) {}
|
||||
++++ END PATCH
|
|
@ -1,55 +0,0 @@
|
|||
++++ REJECTED PATCH 1
|
||||
|
||||
public boolean canPlaceBlockOnSide(World worldIn, BlockPos pos, EnumFacing side)
|
||||
{
|
||||
- return side == EnumFacing.UP && World.doesBlockHaveSolidTopSurface(worldIn, pos.down()) ? true : this.canSustainLever(worldIn, pos.offset(side.getOpposite()));
|
||||
+ return side == EnumFacing.UP && World.doesBlockHaveSolidTopSurface(worldIn, pos.down()) ? true : worldIn.isSideSolid(pos.offset(side.getOpposite()), side);
|
||||
}
|
||||
|
||||
public boolean canPlaceBlockAt(World worldIn, BlockPos pos)
|
||||
{
|
||||
- return this.canSustainLever(worldIn, pos.west()) ? true : (this.canSustainLever(worldIn, pos.east()) ? true : (this.canSustainLever(worldIn, pos.north()) ? true : (this.canSustainLever(worldIn, pos.south()) ? true : (World.doesBlockHaveSolidTopSurface(worldIn, pos.down()) ? true : this.canSustainLever(worldIn, pos.up())))));
|
||||
+ return worldIn.isSideSolid(pos.west(), EnumFacing.EAST ) ||
|
||||
+ worldIn.isSideSolid(pos.east(), EnumFacing.WEST ) ||
|
||||
+ worldIn.isSideSolid(pos.north(), EnumFacing.SOUTH) ||
|
||||
+ worldIn.isSideSolid(pos.south(), EnumFacing.NORTH) ||
|
||||
+ worldIn.isSideSolid(pos.down(), EnumFacing.UP ) ||
|
||||
+ worldIn.isSideSolid(pos.up(), EnumFacing.DOWN );
|
||||
}
|
||||
|
||||
- protected boolean canSustainLever(World worldIn, BlockPos pos)
|
||||
- {
|
||||
- return worldIn.getBlockState(pos).getBlock().isNormalCube();
|
||||
- }
|
||||
-
|
||||
public IBlockState onBlockPlaced(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer)
|
||||
{
|
||||
IBlockState iblockstate = this.getDefaultState().withProperty(POWERED, Boolean.valueOf(false));
|
||||
|
||||
- if (this.canSustainLever(worldIn, pos.offset(facing.getOpposite())))
|
||||
+ if (worldIn.isSideSolid(pos.offset(facing.getOpposite()), facing))
|
||||
{
|
||||
return iblockstate.withProperty(FACING, BlockLever.EnumOrientation.forFacings(facing, placer.getHorizontalFacing()));
|
||||
}
|
||||
++++ END PATCH
|
||||
++++ REJECTED PATCH 2
|
||||
|
||||
enumfacing1 = (EnumFacing)iterator.next();
|
||||
}
|
||||
- while (enumfacing1 == facing || !this.canSustainLever(worldIn, pos.offset(enumfacing1.getOpposite())));
|
||||
+ while (enumfacing1 == facing || !worldIn.isSideSolid(pos.offset(enumfacing1.getOpposite()), enumfacing1));
|
||||
|
||||
return iblockstate.withProperty(FACING, BlockLever.EnumOrientation.forFacings(enumfacing1, placer.getHorizontalFacing()));
|
||||
}
|
||||
++++ END PATCH
|
||||
++++ REJECTED PATCH 3
|
||||
|
||||
public void onNeighborBlockChange(World worldIn, BlockPos pos, IBlockState state, Block neighborBlock)
|
||||
{
|
||||
- if (this.checkForDrop(worldIn, pos) && !this.canSustainLever(worldIn, pos.offset(((BlockLever.EnumOrientation)state.getValue(FACING)).getFacing().getOpposite())))
|
||||
+ EnumFacing dir = ((BlockLever.EnumOrientation)state.getValue(FACING)).getFacing();
|
||||
+ if (this.checkForDrop(worldIn, pos) && !worldIn.isSideSolid(pos.offset(dir.getOpposite()), dir))
|
||||
{
|
||||
this.dropBlockAsItem(worldIn, pos, state, 0);
|
||||
worldIn.setBlockToAir(pos);
|
||||
++++ END PATCH
|
|
@ -1,13 +0,0 @@
|
|||
++++ REJECTED PATCH 1
|
||||
BlockPos blockpos1 = (BlockPos)iterator.next();
|
||||
IBlockState iblockstate1 = worldIn.getBlockState(blockpos1);
|
||||
|
||||
- if (iblockstate1.getBlock().getMaterial() == Material.leaves && !((Boolean)iblockstate1.getValue(BlockLeaves.CHECK_DECAY)).booleanValue())
|
||||
+ if (iblockstate1.getBlock().isLeaves(worldIn, blockpos1))
|
||||
{
|
||||
- worldIn.setBlockState(blockpos1, iblockstate1.withProperty(BlockLeaves.CHECK_DECAY, Boolean.valueOf(true)), 4);
|
||||
+ iblockstate1.getBlock().beginLeavesDecay(worldIn, blockpos1);
|
||||
}
|
||||
}
|
||||
}
|
||||
++++ END PATCH
|
|
@ -1,18 +0,0 @@
|
|||
++++ REJECTED PATCH 1
|
||||
public void dropBlockAsItemWithChance(World worldIn, BlockPos pos, IBlockState state, float chance, int fortune)
|
||||
{
|
||||
super.dropBlockAsItemWithChance(worldIn, pos, state, chance, fortune);
|
||||
- int j = 15 + worldIn.rand.nextInt(15) + worldIn.rand.nextInt(15);
|
||||
- this.dropXpOnBlockBreak(worldIn, pos, j);
|
||||
}
|
||||
|
||||
+ @Override
|
||||
+ public int getExpDrop(net.minecraft.world.IBlockAccess world, BlockPos pos, int fortune)
|
||||
+ {
|
||||
+ return 15 + RANDOM.nextInt(15) + RANDOM.nextInt(15);
|
||||
+ }
|
||||
+
|
||||
public boolean isOpaqueCube()
|
||||
{
|
||||
return false;
|
||||
++++ END PATCH
|
|
@ -1,10 +0,0 @@
|
|||
++++ REJECTED PATCH 1
|
||||
if (pos.getY() >= 0 && pos.getY() < 256)
|
||||
{
|
||||
IBlockState iblockstate1 = worldIn.getBlockState(pos.down());
|
||||
- return iblockstate1.getBlock() == Blocks.mycelium ? true : (iblockstate1.getBlock() == Blocks.dirt && iblockstate1.getValue(BlockDirt.VARIANT) == BlockDirt.DirtType.PODZOL ? true : worldIn.getLight(pos) < 13 && this.canPlaceBlockOn(iblockstate1.getBlock()));
|
||||
+ return iblockstate1.getBlock() == Blocks.mycelium ? true : (iblockstate1.getBlock() == Blocks.dirt && iblockstate1.getValue(BlockDirt.VARIANT) == BlockDirt.DirtType.PODZOL ? true : worldIn.getLight(pos) < 13 && iblockstate1.getBlock().canSustainPlant(worldIn, pos.down(), net.minecraft.util.EnumFacing.UP, this));
|
||||
}
|
||||
else
|
||||
{
|
||||
++++ END PATCH
|
|
@ -1,10 +0,0 @@
|
|||
++++ REJECTED PATCH 2
|
||||
IBlockState iblockstate1 = worldIn.getBlockState(blockpos1);
|
||||
Block block = worldIn.getBlockState(blockpos1.up()).getBlock();
|
||||
|
||||
- if (iblockstate1.getBlock() == Blocks.dirt && iblockstate1.getValue(BlockDirt.VARIANT) == BlockDirt.DirtType.DIRT && worldIn.getLightFromNeighbors(blockpos1.up()) >= 4 && block.getLightOpacity() <= 2)
|
||||
+ if (iblockstate1.getBlock() == Blocks.dirt && iblockstate1.getValue(BlockDirt.VARIANT) == BlockDirt.DirtType.DIRT && worldIn.getLightFromNeighbors(blockpos1.up()) >= 4 && block.getLightOpacity(worldIn, blockpos1.up()) <= 2)
|
||||
{
|
||||
worldIn.setBlockState(blockpos1, this.getDefaultState());
|
||||
}
|
||||
++++ END PATCH
|
|
@ -1,22 +0,0 @@
|
|||
++++ REJECTED PATCH 1
|
||||
}
|
||||
}
|
||||
|
||||
- if (!flag1 && block.getMaterial() != Material.air && canPush(block, worldIn, blockpos1, enumfacing.getOpposite(), false) && (block.getMobilityFlag() == 0 || block == Blocks.piston || block == Blocks.sticky_piston))
|
||||
+ if (!flag1 && !block.isAir(worldIn, blockpos1) && canPush(block, worldIn, blockpos1, enumfacing.getOpposite(), false) && (block.getMobilityFlag() == 0 || block == Blocks.piston || block == Blocks.sticky_piston))
|
||||
{
|
||||
this.doMove(worldIn, pos, enumfacing, false);
|
||||
}
|
||||
++++ END PATCH
|
||||
++++ REJECTED PATCH 3
|
||||
{
|
||||
blockpos1 = (BlockPos)list1.get(j);
|
||||
Block block = worldIn.getBlockState(blockpos1).getBlock();
|
||||
- block.dropBlockAsItem(worldIn, blockpos1, worldIn.getBlockState(blockpos1), 0);
|
||||
+ //With our change to how snowballs are dropped this needs to disallow to mimic vanilla behavior.
|
||||
+ float chance = block instanceof BlockSnow ? -1.0f : 1.0f;
|
||||
+ block.dropBlockAsItemWithChance(worldIn, blockpos1, worldIn.getBlockState(blockpos1), chance, 0);
|
||||
worldIn.setBlockToAir(blockpos1);
|
||||
--i;
|
||||
ablock[i] = block;
|
||||
++++ END PATCH
|
|
@ -1,19 +0,0 @@
|
|||
++++ REJECTED PATCH 1
|
||||
|
||||
public void dropBlockAsItemWithChance(World worldIn, BlockPos pos, IBlockState state, float chance, int fortune)
|
||||
{
|
||||
- if (!worldIn.isRemote)
|
||||
- {
|
||||
- TileEntityPiston tileentitypiston = this.getTileEntity(worldIn, pos);
|
||||
-
|
||||
- if (tileentitypiston != null)
|
||||
- {
|
||||
- IBlockState iblockstate1 = tileentitypiston.getPistonState();
|
||||
- iblockstate1.getBlock().dropBlockAsItem(worldIn, pos, iblockstate1, 0);
|
||||
- }
|
||||
- }
|
||||
+ super.dropBlockAsItemWithChance(worldIn, pos, state, chance, fortune);
|
||||
}
|
||||
|
||||
public MovingObjectPosition collisionRayTrace(World worldIn, BlockPos pos, Vec3 start, Vec3 end)
|
||||
++++ END PATCH
|
|
@ -1,134 +0,0 @@
|
|||
++++ REJECTED PATCH 2
|
||||
}
|
||||
|
||||
public abstract IProperty getShapeProperty();
|
||||
+ /* ======================================== FORGE START =====================================*/
|
||||
+ /**
|
||||
+ * Return true if the rail can make corners.
|
||||
+ * Used by placement logic.
|
||||
+ * @param world The world.
|
||||
+ * @param pod Block's position in world
|
||||
+ * @return True if the rail can make corners.
|
||||
+ */
|
||||
+ public boolean isFlexibleRail(IBlockAccess world, BlockPos pos)
|
||||
+ {
|
||||
+ return !this.isPowered;
|
||||
+ }
|
||||
|
||||
+ /**
|
||||
+ * Returns true if the rail can make up and down slopes.
|
||||
+ * Used by placement logic.
|
||||
+ * @param world The world.
|
||||
+ * @param pod Block's position in world
|
||||
+ * @return True if the rail can make slopes.
|
||||
+ */
|
||||
+ public boolean canMakeSlopes(IBlockAccess world, BlockPos pos)
|
||||
+ {
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Returns the max speed of the rail at the specified position.
|
||||
+ * @param world The world.
|
||||
+ * @param cart The cart on the rail, may be null.
|
||||
+ * @param pod Block's position in world
|
||||
+ * @return The max speed of the current rail.
|
||||
+ */
|
||||
+ public float getRailMaxSpeed(World world, net.minecraft.entity.item.EntityMinecart cart, BlockPos pos)
|
||||
+ {
|
||||
+ return 0.4f;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * This function is called by any minecart that passes over this rail.
|
||||
+ * It is called once per update tick that the minecart is on the rail.
|
||||
+ * @param world The world.
|
||||
+ * @param cart The cart on the rail.
|
||||
+ * @param pod Block's position in world
|
||||
+ */
|
||||
+ public void onMinecartPass(World world, net.minecraft.entity.item.EntityMinecart cart, BlockPos pos)
|
||||
+ {
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Rotate the block. For vanilla blocks this rotates around the axis passed in (generally, it should be the "face" that was hit).
|
||||
+ * Note: for mod blocks, this is up to the block and modder to decide. It is not mandated that it be a rotation around the
|
||||
+ * face, but could be a rotation to orient *to* that face, or a visiting of possible rotations.
|
||||
+ * The method should return true if the rotation was successful though.
|
||||
+ *
|
||||
+ * @param world The world
|
||||
+ * @param pos Block position in world
|
||||
+ * @param axis The axis to rotate around
|
||||
+ * @return True if the rotation was successful, False if the rotation failed, or is not possible
|
||||
+ */
|
||||
+ public boolean rotateBlock(World world, BlockPos pos, EnumFacing axis)
|
||||
+ {
|
||||
+ IBlockState state = world.getBlockState(pos);
|
||||
+ for (IProperty prop : (java.util.Set<IProperty>)state.getProperties().keySet())
|
||||
+ {
|
||||
+ if (prop.getName().equals("shape"))
|
||||
+ {
|
||||
+ world.setBlockState(pos, state.cycleProperty(prop));
|
||||
+ return true;
|
||||
+ }
|
||||
+ }
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ /* ======================================== FORGE END =====================================*/
|
||||
+
|
||||
public static enum EnumRailDirection implements IStringSerializable
|
||||
{
|
||||
NORTH_SOUTH(0, "north_south"),
|
||||
++++ END PATCH
|
||||
++++ REJECTED PATCH 4
|
||||
this.state = state;
|
||||
this.block = (BlockRailBase)state.getBlock();
|
||||
BlockRailBase.EnumRailDirection enumraildirection = (BlockRailBase.EnumRailDirection)state.getValue(BlockRailBase.this.getShapeProperty());
|
||||
- this.isPowered = this.block.isPowered;
|
||||
+ this.isPowered = !this.block.isFlexibleRail(worldIn, pos);
|
||||
+ canMakeSlopes = this.block.canMakeSlopes(worldIn, pos);
|
||||
this.func_180360_a(enumraildirection);
|
||||
}
|
||||
|
||||
++++ END PATCH
|
||||
++++ REJECTED PATCH 5
|
||||
}
|
||||
}
|
||||
|
||||
- if (enumraildirection == BlockRailBase.EnumRailDirection.NORTH_SOUTH)
|
||||
+ if (enumraildirection == BlockRailBase.EnumRailDirection.NORTH_SOUTH && canMakeSlopes)
|
||||
{
|
||||
if (BlockRailBase.isRailBlock(this.world, blockpos.up()))
|
||||
{
|
||||
++++ END PATCH
|
||||
++++ REJECTED PATCH 6
|
||||
}
|
||||
}
|
||||
|
||||
- if (enumraildirection == BlockRailBase.EnumRailDirection.EAST_WEST)
|
||||
+ if (enumraildirection == BlockRailBase.EnumRailDirection.EAST_WEST && canMakeSlopes)
|
||||
{
|
||||
if (BlockRailBase.isRailBlock(this.world, blockpos3.up()))
|
||||
{
|
||||
++++ END PATCH
|
||||
++++ REJECTED PATCH 7
|
||||
}
|
||||
}
|
||||
|
||||
- if (enumraildirection == BlockRailBase.EnumRailDirection.NORTH_SOUTH)
|
||||
+ if (enumraildirection == BlockRailBase.EnumRailDirection.NORTH_SOUTH && canMakeSlopes)
|
||||
{
|
||||
if (BlockRailBase.isRailBlock(this.world, blockpos.up()))
|
||||
{
|
||||
++++ END PATCH
|
||||
++++ REJECTED PATCH 8
|
||||
}
|
||||
}
|
||||
|
||||
- if (enumraildirection == BlockRailBase.EnumRailDirection.EAST_WEST)
|
||||
+ if (enumraildirection == BlockRailBase.EnumRailDirection.EAST_WEST && canMakeSlopes)
|
||||
{
|
||||
if (BlockRailBase.isRailBlock(this.world, blockpos3.up()))
|
||||
{
|
||||
++++ END PATCH
|
|
@ -1,10 +0,0 @@
|
|||
++++ REJECTED PATCH 1
|
||||
{
|
||||
EnumFacing enumfacing = (EnumFacing)state.getValue(FACING);
|
||||
BlockPos blockpos1 = pos.offset(enumfacing.getOpposite());
|
||||
+ if(net.minecraftforge.event.ForgeEventFactory.onNeighborNotify(worldIn, pos, worldIn.getBlockState(pos), java.util.EnumSet.of(enumfacing.getOpposite())).isCanceled())
|
||||
+ return;
|
||||
worldIn.notifyBlockOfStateChange(blockpos1, this);
|
||||
worldIn.notifyNeighborsOfStateExcept(blockpos1, this, enumfacing);
|
||||
}
|
||||
++++ END PATCH
|
|
@ -1,21 +0,0 @@
|
|||
++++ REJECTED PATCH 1
|
||||
public void dropBlockAsItemWithChance(World worldIn, BlockPos pos, IBlockState state, float chance, int fortune)
|
||||
{
|
||||
super.dropBlockAsItemWithChance(worldIn, pos, state, chance, fortune);
|
||||
+ }
|
||||
|
||||
- if (this.getItemDropped(state, worldIn.rand, fortune) != Item.getItemFromBlock(this))
|
||||
+ @Override
|
||||
+ public int getExpDrop(net.minecraft.world.IBlockAccess world, BlockPos pos, int fortune)
|
||||
+ {
|
||||
+ if (this.getItemDropped(world.getBlockState(pos), RANDOM, fortune) != Item.getItemFromBlock(this))
|
||||
{
|
||||
- int j = 1 + worldIn.rand.nextInt(5);
|
||||
- this.dropXpOnBlockBreak(worldIn, pos, j);
|
||||
+ return 1 + RANDOM.nextInt(5);
|
||||
}
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
++++ END PATCH
|
|
@ -1,59 +0,0 @@
|
|||
++++ REJECTED PATCH 1
|
||||
BlockPos blockpos1 = pos.offset(direction);
|
||||
Block block = worldIn.getBlockState(pos.offset(direction)).getBlock();
|
||||
|
||||
- if (!canConnectTo(worldIn.getBlockState(blockpos1), direction) && (block.isSolidFullCube() || !canConnectUpwardsTo(worldIn.getBlockState(blockpos1.down()))))
|
||||
+ if (!canRestoneConnect(worldIn, blockpos1, direction) && (block.isSolidFullCube() || !canRestoneConnect(worldIn, blockpos1.down(), null)))
|
||||
{
|
||||
Block block1 = worldIn.getBlockState(pos.up()).getBlock();
|
||||
- return !block1.isSolidFullCube() && block.isSolidFullCube() && canConnectUpwardsTo(worldIn.getBlockState(blockpos1.up())) ? BlockRedstoneWire.EnumAttachPosition.UP : BlockRedstoneWire.EnumAttachPosition.NONE;
|
||||
+ return !block1.isSolidFullCube() && block.isSolidFullCube() && canRestoneConnect(worldIn, blockpos1.up(), null) ? BlockRedstoneWire.EnumAttachPosition.UP : BlockRedstoneWire.EnumAttachPosition.NONE;
|
||||
}
|
||||
else
|
||||
{
|
||||
++++ END PATCH
|
||||
++++ REJECTED PATCH 2
|
||||
Block block = iblockstate.getBlock();
|
||||
boolean flag = block.isNormalCube();
|
||||
boolean flag1 = worldIn.getBlockState(pos.up()).getBlock().isNormalCube();
|
||||
- return !flag1 && flag && canConnectUpwardsTo(worldIn, blockpos1.up()) ? true : (canConnectTo(iblockstate, side) ? true : (block == Blocks.powered_repeater && iblockstate.getValue(BlockRedstoneDiode.FACING) == side ? true : !flag && canConnectUpwardsTo(worldIn, blockpos1.down())));
|
||||
+ return !flag1 && flag && canRestoneConnect(worldIn, blockpos1.up(), null) ? true : (canRestoneConnect(worldIn, blockpos1, side) ? true : (block == Blocks.powered_repeater && iblockstate.getValue(BlockRedstoneDiode.FACING) == side ? true : !flag && canRestoneConnect(worldIn, blockpos1.down(), null)));
|
||||
}
|
||||
|
||||
- protected static boolean canConnectUpwardsTo(IBlockAccess worldIn, BlockPos pos)
|
||||
+ protected static boolean canRestoneConnect(IBlockAccess world, BlockPos pos, EnumFacing side)
|
||||
{
|
||||
- return canConnectUpwardsTo(worldIn.getBlockState(pos));
|
||||
- }
|
||||
+ IBlockState state = world.getBlockState(pos);
|
||||
|
||||
- protected static boolean canConnectUpwardsTo(IBlockState state)
|
||||
- {
|
||||
- return canConnectTo(state, (EnumFacing)null);
|
||||
- }
|
||||
-
|
||||
- protected static boolean canConnectTo(IBlockState blockState, EnumFacing side)
|
||||
- {
|
||||
- Block block = blockState.getBlock();
|
||||
-
|
||||
- if (block == Blocks.redstone_wire)
|
||||
+ if (state.getBlock() == Blocks.redstone_wire)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
- else if (Blocks.unpowered_repeater.isAssociated(block))
|
||||
+ else if (Blocks.unpowered_repeater.isAssociated(state.getBlock()))
|
||||
{
|
||||
- EnumFacing enumfacing1 = (EnumFacing)blockState.getValue(BlockRedstoneRepeater.FACING);
|
||||
- return enumfacing1 == side || enumfacing1.getOpposite() == side;
|
||||
+ EnumFacing direction = (EnumFacing)state.getValue(BlockRedstoneRepeater.FACING);
|
||||
+ return direction == side || direction.getOpposite() == side;
|
||||
}
|
||||
else
|
||||
{
|
||||
- return block.canProvidePower() && side != null;
|
||||
+ return state.getBlock().canConnectRedstone(world, pos, side);
|
||||
}
|
||||
}
|
||||
|
||||
++++ END PATCH
|
|
@ -1,9 +0,0 @@
|
|||
++++ REJECTED PATCH 1
|
||||
|
||||
public void generateTree(World worldIn, BlockPos pos, IBlockState state, Random rand)
|
||||
{
|
||||
+ if (!net.minecraftforge.event.terraingen.TerrainGen.saplingGrowTree(worldIn, rand, pos)) return;
|
||||
Object object = rand.nextInt(10) == 0 ? new WorldGenBigTree(true) : new WorldGenTrees(true);
|
||||
int i = 0;
|
||||
int j = 0;
|
||||
++++ END PATCH
|
|
@ -1,10 +0,0 @@
|
|||
++++ REJECTED PATCH 1
|
||||
return tileentity instanceof TileEntitySkull ? ((TileEntitySkull)tileentity).getSkullType() : super.getDamageValue(worldIn, pos);
|
||||
}
|
||||
|
||||
- public void dropBlockAsItemWithChance(World worldIn, BlockPos pos, IBlockState state, float chance, int fortune) {}
|
||||
-
|
||||
public void onBlockHarvested(World worldIn, BlockPos pos, IBlockState state, EntityPlayer player)
|
||||
{
|
||||
if (player.capabilities.isCreativeMode)
|
||||
++++ END PATCH
|
|
@ -1,10 +0,0 @@
|
|||
++++ REJECTED PATCH 1
|
||||
{
|
||||
IBlockState iblockstate = worldIn.getBlockState(pos.down());
|
||||
Block block = iblockstate.getBlock();
|
||||
- return block != Blocks.ice && block != Blocks.packed_ice ? (block.getMaterial() == Material.leaves ? true : (block == this && ((Integer)iblockstate.getValue(LAYERS)).intValue() == 7 ? true : block.isOpaqueCube() && block.blockMaterial.blocksMovement())) : false;
|
||||
+ return block != Blocks.ice && block != Blocks.packed_ice ? (block.isLeaves(worldIn, pos.down()) ? true : (block == this && ((Integer)iblockstate.getValue(LAYERS)).intValue() == 7 ? true : block.isOpaqueCube() && block.blockMaterial.blocksMovement())) : false;
|
||||
}
|
||||
|
||||
public void onNeighborBlockChange(World worldIn, BlockPos pos, IBlockState state, Block neighborBlock)
|
||||
++++ END PATCH
|
|
@ -1,18 +0,0 @@
|
|||
++++ REJECTED PATCH 3
|
||||
|
||||
for (int k = 0; k < 3; ++k)
|
||||
{
|
||||
- if (worldIn.rand.nextInt(15) <= j)
|
||||
+ if (RANDOM.nextInt(15) <= j)
|
||||
{
|
||||
- spawnAsEntity(worldIn, pos, new ItemStack(item));
|
||||
+ ret.add(new ItemStack(item));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+ return ret;
|
||||
}
|
||||
|
||||
protected Item getSeedItem()
|
||||
++++ END PATCH
|
|
@ -1,30 +0,0 @@
|
|||
++++ REJECTED PATCH 2
|
||||
{
|
||||
BlockPos blockpos1 = pos.offset(facing.getOpposite());
|
||||
boolean flag = facing.getAxis().isHorizontal();
|
||||
- return flag && worldIn.isBlockNormalCube(blockpos1, true) || facing.equals(EnumFacing.UP) && this.canPlaceOn(worldIn, blockpos1);
|
||||
+ return flag && worldIn.isSideSolid(blockpos1, facing, true) || facing.equals(EnumFacing.UP) && this.canPlaceOn(worldIn, blockpos1);
|
||||
}
|
||||
|
||||
public IBlockState onBlockPlaced(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer)
|
||||
++++ END PATCH
|
||||
++++ REJECTED PATCH 3
|
||||
|
||||
enumfacing1 = (EnumFacing)iterator.next();
|
||||
}
|
||||
- while (!worldIn.isBlockNormalCube(pos.offset(enumfacing1.getOpposite()), true));
|
||||
+ while (!worldIn.isSideSolid(pos.offset(enumfacing1.getOpposite()), enumfacing1, true));
|
||||
|
||||
return this.getDefaultState().withProperty(FACING, enumfacing1);
|
||||
}
|
||||
++++ END PATCH
|
||||
++++ REJECTED PATCH 4
|
||||
EnumFacing enumfacing1 = enumfacing.getOpposite();
|
||||
boolean flag = false;
|
||||
|
||||
- if (axis.isHorizontal() && !worldIn.isBlockNormalCube(pos.offset(enumfacing1), true))
|
||||
+ if (axis.isHorizontal() && !worldIn.isSideSolid(pos.offset(enumfacing1), enumfacing1, true))
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
++++ END PATCH
|
|
@ -1,13 +0,0 @@
|
|||
++++ REJECTED PATCH 2
|
||||
{
|
||||
if (!worldIn.isRemote)
|
||||
{
|
||||
+ EnumFacing direction = (EnumFacing)state.getValue(FACING);
|
||||
BlockPos blockpos1 = pos.offset(((EnumFacing)state.getValue(FACING)).getOpposite());
|
||||
|
||||
- if (!isValidSupportBlock(worldIn.getBlockState(blockpos1).getBlock()))
|
||||
+ if (!(isValidSupportBlock(worldIn.getBlockState(blockpos1).getBlock()) || worldIn.isSideSolid(blockpos1, direction, true)))
|
||||
{
|
||||
worldIn.setBlockToAir(pos);
|
||||
this.dropBlockAsItem(worldIn, pos, state, 0);
|
||||
++++ END PATCH
|
|
@ -1,10 +0,0 @@
|
|||
++++ REJECTED PATCH 2
|
||||
|
||||
enumfacing = (EnumFacing)iterator.next();
|
||||
}
|
||||
- while (!worldIn.getBlockState(pos.offset(enumfacing)).getBlock().isNormalCube());
|
||||
+ while (!worldIn.isSideSolid(pos.offset(enumfacing), enumfacing.getOpposite(), true));
|
||||
|
||||
return true;
|
||||
}
|
||||
++++ END PATCH
|
|
@ -1,18 +0,0 @@
|
|||
++++ REJECTED PATCH 3
|
||||
return i;
|
||||
}
|
||||
|
||||
+ /*************************FORGE START***********************************/
|
||||
+ @Override public boolean isLadder(IBlockAccess world, BlockPos pos, EntityLivingBase entity){ return true; }
|
||||
+ @Override public boolean isShearable(ItemStack item, IBlockAccess world, BlockPos pos){ return true; }
|
||||
+ @Override
|
||||
+ public java.util.List<ItemStack> onSheared(ItemStack item, IBlockAccess world, BlockPos pos, int fortune)
|
||||
+ {
|
||||
+ return java.util.Arrays.asList(new ItemStack(this, 1));
|
||||
+ }
|
||||
+ /*************************FORGE END***********************************/
|
||||
+
|
||||
static final class SwitchEnumFacing
|
||||
{
|
||||
static final int[] FACING_LOOKUP = new int[EnumFacing.values().length];
|
||||
++++ END PATCH
|
|
@ -1,10 +0,0 @@
|
|||
++++ REJECTED PATCH 2
|
||||
BlockPos blockpos1 = origin.offset(this.moveDirection.getOpposite(), i);
|
||||
block = this.world.getBlockState(blockpos1).getBlock();
|
||||
|
||||
- if (block.getMaterial() == Material.air || !BlockPistonBase.canPush(block, this.world, blockpos1, this.moveDirection, false) || blockpos1.equals(this.pistonPos))
|
||||
+ if (block.isAir(world, blockpos1)|| !BlockPistonBase.canPush(block, this.world, blockpos1, this.moveDirection, false) || blockpos1.equals(this.pistonPos))
|
||||
{
|
||||
break;
|
||||
}
|
||||
++++ END PATCH
|
|
@ -1,10 +0,0 @@
|
|||
++++ REJECTED PATCH 2
|
||||
{
|
||||
List list = (List)iterator.next();
|
||||
Map map = MapPopulator.createMap(this.properties, list);
|
||||
- BlockState.StateImplementation stateimplementation = new BlockState.StateImplementation(blockIn, ImmutableMap.copyOf(map), null);
|
||||
+ BlockState.StateImplementation stateimplementation = createState(blockIn, ImmutableMap.copyOf(map), unlistedProperties);
|
||||
linkedhashmap.put(map, stateimplementation);
|
||||
arraylist.add(stateimplementation);
|
||||
}
|
||||
++++ END PATCH
|
|
@ -1,9 +0,0 @@
|
|||
++++ REJECTED PATCH 1
|
||||
return new ModelResourceLocation(s + "_double_slab", s1);
|
||||
}
|
||||
});
|
||||
+ net.minecraftforge.client.model.ModelLoader.onRegisterAllBlocks(this);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
++++ END PATCH
|
|
@ -1,21 +0,0 @@
|
|||
++++ REJECTED PATCH 3
|
||||
while (iterator.hasNext())
|
||||
{
|
||||
Item item = (Item)iterator.next();
|
||||
+ if (item == null)
|
||||
+ {
|
||||
+ continue;
|
||||
+ }
|
||||
|
||||
- if (item != null && item.getCreativeTab() == this)
|
||||
+ for (CreativeTabs tab : item.getCreativeTabs())
|
||||
{
|
||||
- item.getSubItems(item, this, p_78018_1_);
|
||||
+ if (tab == this)
|
||||
+ {
|
||||
+ item.getSubItems(item, this, p_78018_1_);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
++++ END PATCH
|
|
@ -1,9 +0,0 @@
|
|||
++++ REJECTED PATCH 3
|
||||
}
|
||||
}
|
||||
});
|
||||
+ if (false){ //Forge: Removed, Fixes MC-75630 - Exploit with signs and command blocks
|
||||
BlockDispenser.dispenseBehaviorRegistry.putObject(Item.getItemFromBlock(Blocks.command_block), new BehaviorDefaultDispenseItem()
|
||||
{
|
||||
private static final String __OBFID = "CL_00002276";
|
||||
++++ END PATCH
|
|
@ -1,11 +0,0 @@
|
|||
++++ REJECTED PATCH 1
|
||||
}
|
||||
public boolean isItemValid(ItemStack stack)
|
||||
{
|
||||
- return stack == null ? false : (stack.getItem() instanceof ItemArmor ? ((ItemArmor)stack.getItem()).armorType == k : (stack.getItem() != Item.getItemFromBlock(Blocks.pumpkin) && stack.getItem() != Items.skull ? false : k == 0));
|
||||
+ if (stack == null) return false;
|
||||
+ return stack.getItem().isValidArmor(stack, k, thePlayer);
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
public String getSlotTexture()
|
||||
++++ END PATCH
|
|
@ -1,20 +0,0 @@
|
|||
++++ REJECTED PATCH 3
|
||||
|
||||
if (itemstack2 != null)
|
||||
{
|
||||
+ if (!net.minecraftforge.common.ForgeHooks.onAnvilChange(this, itemstack, itemstack2, outputSlot, repairedItemName, i2)) return;
|
||||
flag7 = itemstack2.getItem() == Items.enchanted_book && Items.enchanted_book.getEnchantments(itemstack2).tagCount() > 0;
|
||||
int k;
|
||||
int l;
|
||||
++++ END PATCH
|
||||
++++ REJECTED PATCH 4
|
||||
{
|
||||
int l1 = ((Integer)iterator.next()).intValue();
|
||||
|
||||
- if (l1 != l && !enchantment.canApplyTogether(Enchantment.getEnchantmentById(l1)))
|
||||
+ Enchantment e2 = Enchantment.getEnchantmentById(l1);
|
||||
+ if (l1 != l && !(enchantment.canApplyTogether(e2) && e2.canApplyTogether(enchantment))) //Forge BugFix: Let Both enchantments veto being together
|
||||
{
|
||||
flag8 = false;
|
||||
++i;
|
||||
++++ END PATCH
|
|
@ -1,10 +0,0 @@
|
|||
++++ REJECTED PATCH 1
|
||||
|
||||
for (int i = 0; i < 4; ++i)
|
||||
{
|
||||
- this.lines[i] = buf.readChatComponent();
|
||||
+ this.lines[i] = IChatComponent.Serializer.jsonToComponent(buf.readStringFromBuffer(384));
|
||||
}
|
||||
}
|
||||
|
||||
++++ END PATCH
|
|
@ -1,10 +0,0 @@
|
|||
++++ REJECTED PATCH 1
|
||||
int i1 = p_180624_2_.nextInt(16);
|
||||
BlockPos blockpos1 = p_180624_3_.add(k, l, i1);
|
||||
|
||||
- if (worldIn.getBlockState(blockpos1).getBlock() == Blocks.stone)
|
||||
+ if (worldIn.getBlockState(blockpos1).getBlock().isReplaceableOreGen(worldIn, blockpos1, net.minecraft.block.state.pattern.BlockHelper.forBlock(Blocks.stone)))
|
||||
{
|
||||
worldIn.setBlockState(blockpos1, Blocks.emerald_ore.getDefaultState(), 2);
|
||||
}
|
||||
++++ END PATCH
|
|
@ -1,22 +0,0 @@
|
|||
++++ REJECTED PATCH 1
|
||||
File file1 = this.getWorldDirectory();
|
||||
File file2;
|
||||
|
||||
- if (provider instanceof WorldProviderHell)
|
||||
+ if (provider.getSaveFolder() != null)
|
||||
{
|
||||
- file2 = new File(file1, "DIM-1");
|
||||
+ file2 = new File(file1, provider.getSaveFolder());
|
||||
file2.mkdirs();
|
||||
return new AnvilChunkLoader(file2);
|
||||
}
|
||||
- else if (provider instanceof WorldProviderEnd)
|
||||
- {
|
||||
- file2 = new File(file1, "DIM1");
|
||||
- file2.mkdirs();
|
||||
- return new AnvilChunkLoader(file2);
|
||||
- }
|
||||
else
|
||||
{
|
||||
return new AnvilChunkLoader(file1);
|
||||
++++ END PATCH
|
Loading…
Reference in a new issue