Skip to content
Permalink
Browse files

Initial update to 1.8, Super beta. Most rendering related hooks are o…

…ut due to major changes in 1.8.

Some notes:
Almost all int x, int y, int z parameters have been changed to BlockPos class
ForgeDirection has been removed, replaced by net.minecraft.util.EnumFacing.
All FML classes have moved from packet cpw.mods.fml to net.minecraftforge.fml
Fluid Rendering has been disabled for the time being, to be re-evaulated and a test mod created for it.
Minecraft now uses a Model based system for rendering blocks and Items. The intention is to expand the model format to better suit modder's needed once it is evaulated.
As such, The model loaders from Forge have been removed, to be replaced by expanding vanilla's model format.
Metadata has been extracted out in Minecraft to IBlockState, which holds a list of properties instead of magic number metadata. DO NOT listen to the fearmongering, you can do EVERYTHING with block states you could previously with metadata.
Stencil Bits are disabled entirely by for the main Display, Modders must enable and recreate the FrameBuffer if they wish to use Stencil Bits.
  • Loading branch information...
LexManos committed Nov 26, 2014
1 parent 0e91787 commit 53659fca065a600470734d81a168fbdde6ec631a
Showing 410 changed files with 8,585 additions and 13,971 deletions.
@@ -21,3 +21,7 @@
/patches-/
# FML changelog
changelog.txt
/patches_old/
/patches_old_bak/
*.py
*.7z
@@ -34,11 +34,12 @@ repositories {
}

minecraft {
version = '1.7.10'
mcpVersion = '9.05'
version = '1.8'
mcpVersion = '9.10'
mappings = 'snapshot_nodoc_20140930'
fmlDir = projectDir.getAbsolutePath() + "/fml";
mainClass = 'cpw.mods.fml.relauncher.ServerLaunchWrapper'
tweakClass = 'cpw.mods.fml.common.launcher.FMLTweaker'
mainClass = 'net.minecraftforge.fml.relauncher.ServerLaunchWrapper'
tweakClass = 'net.minecraftforge.fml.common.launcher.FMLTweaker'
installerVersion = "1.4"
}

BIN +338 Bytes (100%) eclipse-workspace-dev.zip
Binary file not shown.
2 fml
Submodule fml updated 349 files

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -0,0 +1,9 @@
--- ../src-base/minecraft/net/minecraft/block/BlockAir.java
+++ ../src-work/minecraft/net/minecraft/block/BlockAir.java
@@ -36,4 +36,6 @@
}

public void func_180653_a(World p_180653_1_, BlockPos p_180653_2_, IBlockState p_180653_3_, float p_180653_4_, int p_180653_5_) {}
+
+ public boolean func_176200_f(World worldIn, BlockPos pos){ return true; }
}
@@ -1,73 +1,54 @@
--- ../src-base/minecraft/net/minecraft/block/BlockBush.java
+++ ../src-work/minecraft/net/minecraft/block/BlockBush.java
@@ -6,8 +6,13 @@
import net.minecraft.init.Blocks;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.World;
+import net.minecraft.world.IBlockAccess;
+import net.minecraftforge.common.EnumPlantType;
+import net.minecraftforge.common.util.ForgeDirection;
+import net.minecraftforge.common.IPlantable;
+import static net.minecraftforge.common.EnumPlantType.*;
@@ -12,7 +12,7 @@
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;

-public class BlockBush extends Block
+public class BlockBush extends Block implements IPlantable
+public class BlockBush extends Block implements net.minecraftforge.common.IPlantable
{
private static final String __OBFID = "CL_00000208";

@@ -27,7 +32,7 @@
@@ -32,7 +32,7 @@

public boolean func_149742_c(World p_149742_1_, int p_149742_2_, int p_149742_3_, int p_149742_4_)
public boolean func_176196_c(World p_176196_1_, BlockPos p_176196_2_)
{
- return super.func_149742_c(p_149742_1_, p_149742_2_, p_149742_3_, p_149742_4_) && this.func_149854_a(p_149742_1_.func_147439_a(p_149742_2_, p_149742_3_ - 1, p_149742_4_));
+ return super.func_149742_c(p_149742_1_, p_149742_2_, p_149742_3_, p_149742_4_) && this.func_149718_j(p_149742_1_, p_149742_2_, p_149742_3_, p_149742_4_);
- return super.func_176196_c(p_176196_1_, p_176196_2_) && this.func_149854_a(p_176196_1_.func_180495_p(p_176196_2_.func_177977_b()).func_177230_c());
+ return super.func_176196_c(p_176196_1_, p_176196_2_) && p_176196_1_.func_180495_p(p_176196_2_.func_177977_b()).func_177230_c().canSustainPlant(p_176196_1_, p_176196_2_.func_177977_b(), net.minecraft.util.EnumFacing.UP, this);
}

protected boolean func_149854_a(Block p_149854_1_)
@@ -57,7 +62,7 @@

public boolean func_149718_j(World p_149718_1_, int p_149718_2_, int p_149718_3_, int p_149718_4_)
{
- return this.func_149854_a(p_149718_1_.func_147439_a(p_149718_2_, p_149718_3_ - 1, p_149718_4_));
+ return p_149718_1_.func_147439_a(p_149718_2_, p_149718_3_ - 1, p_149718_4_).canSustainPlant(p_149718_1_, p_149718_2_, p_149718_3_ - 1, p_149718_4_, ForgeDirection.UP, this);
}

public AxisAlignedBB func_149668_a(World p_149668_1_, int p_149668_2_, int p_149668_3_, int p_149668_4_)
@@ -79,4 +84,37 @@
@@ -85,4 +85,33 @@
{
return 1;
return EnumWorldBlockLayer.CUTOUT;
}
+
+ @Override
+ public EnumPlantType getPlantType(IBlockAccess world, int x, int y, int z)
+ {
+ if (this == Blocks.field_150464_aj) return Crop;
+ if (this == Blocks.field_150459_bM) return Crop;
+ if (this == Blocks.field_150469_bN) return Crop;
+ if (this == Blocks.field_150394_bc) return Crop;
+ if (this == Blocks.field_150393_bb) return Crop;
+ if (this == Blocks.field_150330_I) return Desert;
+ if (this == Blocks.field_150392_bi) return Water;
+ if (this == Blocks.field_150337_Q) return Cave;
+ if (this == Blocks.field_150338_P) return Cave;
+ if (this == Blocks.field_150388_bm) return Nether;
+ if (this == Blocks.field_150345_g) return Plains;
+ if (this == Blocks.field_150329_H) return Plains;
+ if (this == Blocks.field_150398_cm) return Plains;
+ if (this == Blocks.field_150328_O) return Plains;
+ if (this == Blocks.field_150327_N) return Plains;
+ return Plains;
+ }
+
+ @Override
+ public Block getPlant(IBlockAccess world, int x, int y, int z)
+ public net.minecraftforge.common.EnumPlantType getPlantType(net.minecraft.world.IBlockAccess world, BlockPos pos)
+ {
+ return this;
+ if (this == Blocks.field_150464_aj) return net.minecraftforge.common.EnumPlantType.Crop;
+ if (this == Blocks.field_150459_bM) return net.minecraftforge.common.EnumPlantType.Crop;
+ if (this == Blocks.field_150469_bN) return net.minecraftforge.common.EnumPlantType.Crop;
+ if (this == Blocks.field_150394_bc) return net.minecraftforge.common.EnumPlantType.Crop;
+ if (this == Blocks.field_150393_bb) return net.minecraftforge.common.EnumPlantType.Crop;
+ if (this == Blocks.field_150330_I) return net.minecraftforge.common.EnumPlantType.Desert;
+ if (this == Blocks.field_150392_bi) return net.minecraftforge.common.EnumPlantType.Water;
+ if (this == Blocks.field_150337_Q) return net.minecraftforge.common.EnumPlantType.Cave;
+ if (this == Blocks.field_150338_P) return net.minecraftforge.common.EnumPlantType.Cave;
+ if (this == Blocks.field_150388_bm) return net.minecraftforge.common.EnumPlantType.Nether;
+ if (this == Blocks.field_150345_g) return net.minecraftforge.common.EnumPlantType.Plains;
+ if (this == Blocks.field_150329_H) return net.minecraftforge.common.EnumPlantType.Plains;
+ if (this == Blocks.field_150398_cm) return net.minecraftforge.common.EnumPlantType.Plains;
+ if (this == Blocks.field_150328_O) return net.minecraftforge.common.EnumPlantType.Plains;
+ if (this == Blocks.field_150327_N) return net.minecraftforge.common.EnumPlantType.Plains;
+ return net.minecraftforge.common.EnumPlantType.Plains;
+ }
+
+ @Override
+ public int getPlantMetadata(IBlockAccess world, int x, int y, int z)
+ public IBlockState getPlant(net.minecraft.world.IBlockAccess world, BlockPos pos)
+ {
+ return world.func_72805_g(x, y, z);
+ IBlockState state = world.func_180495_p(pos);
+ if (state.func_177230_c() != this) return func_176223_P();
+ return state;
+ }
}
@@ -1,100 +1,55 @@
--- ../src-base/minecraft/net/minecraft/block/BlockButton.java
+++ ../src-work/minecraft/net/minecraft/block/BlockButton.java
@@ -14,6 +14,9 @@
@@ -18,6 +18,7 @@
import net.minecraft.util.EnumFacing;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
+import static net.minecraft.util.EnumFacing.*;

+import net.minecraftforge.common.util.ForgeDirection;
+import static net.minecraftforge.common.util.ForgeDirection.*;
+
public abstract class BlockButton extends Block
{
private final boolean field_150047_a;
@@ -49,12 +52,19 @@

public boolean func_149707_d(World p_149707_1_, int p_149707_2_, int p_149707_3_, int p_149707_4_, int p_149707_5_)
{
- return p_149707_5_ == 2 && p_149707_1_.func_147439_a(p_149707_2_, p_149707_3_, p_149707_4_ + 1).func_149721_r() ? true : (p_149707_5_ == 3 && p_149707_1_.func_147439_a(p_149707_2_, p_149707_3_, p_149707_4_ - 1).func_149721_r() ? true : (p_149707_5_ == 4 && p_149707_1_.func_147439_a(p_149707_2_ + 1, p_149707_3_, p_149707_4_).func_149721_r() ? true : p_149707_5_ == 5 && p_149707_1_.func_147439_a(p_149707_2_ - 1, p_149707_3_, p_149707_4_).func_149721_r()));
+ ForgeDirection dir = ForgeDirection.getOrientation(p_149707_5_);
+ return (dir == NORTH && p_149707_1_.isSideSolid(p_149707_2_, p_149707_3_, p_149707_4_ + 1, NORTH)) ||
+ (dir == SOUTH && p_149707_1_.isSideSolid(p_149707_2_, p_149707_3_, p_149707_4_ - 1, SOUTH)) ||
+ (dir == WEST && p_149707_1_.isSideSolid(p_149707_2_ + 1, p_149707_3_, p_149707_4_, WEST)) ||
+ (dir == EAST && p_149707_1_.isSideSolid(p_149707_2_ - 1, p_149707_3_, p_149707_4_, EAST));
}
@@ -57,7 +58,7 @@

public boolean func_149742_c(World p_149742_1_, int p_149742_2_, int p_149742_3_, int p_149742_4_)
public boolean func_176198_a(World p_176198_1_, BlockPos p_176198_2_, EnumFacing p_176198_3_)
{
- return p_149742_1_.func_147439_a(p_149742_2_ - 1, p_149742_3_, p_149742_4_).func_149721_r() ? true : (p_149742_1_.func_147439_a(p_149742_2_ + 1, p_149742_3_, p_149742_4_).func_149721_r() ? true : (p_149742_1_.func_147439_a(p_149742_2_, p_149742_3_, p_149742_4_ - 1).func_149721_r() ? true : p_149742_1_.func_147439_a(p_149742_2_, p_149742_3_, p_149742_4_ + 1).func_149721_r()));
+ return (p_149742_1_.isSideSolid(p_149742_2_ - 1, p_149742_3_, p_149742_4_, EAST)) ||
+ (p_149742_1_.isSideSolid(p_149742_2_ + 1, p_149742_3_, p_149742_4_, WEST)) ||
+ (p_149742_1_.isSideSolid(p_149742_2_, p_149742_3_, p_149742_4_ - 1, SOUTH)) ||
+ (p_149742_1_.isSideSolid(p_149742_2_, p_149742_3_, p_149742_4_ + 1, NORTH));
- return p_176198_1_.func_180495_p(p_176198_2_.func_177972_a(p_176198_3_.func_176734_d())).func_177230_c().func_149721_r();
+ return p_176198_1_.isSideSolid(p_176198_2_.func_177972_a(p_176198_3_.func_176734_d()), p_176198_3_, true);
}

public int func_149660_a(World p_149660_1_, int p_149660_2_, int p_149660_3_, int p_149660_4_, int p_149660_5_, float p_149660_6_, float p_149660_7_, float p_149660_8_, int p_149660_9_)
@@ -63,19 +73,21 @@
int k1 = j1 & 8;
j1 &= 7;

- if (p_149660_5_ == 2 && p_149660_1_.func_147439_a(p_149660_2_, p_149660_3_, p_149660_4_ + 1).func_149721_r())
+ ForgeDirection dir = ForgeDirection.getOrientation(p_149660_5_);
+
+ if (dir == NORTH && p_149660_1_.isSideSolid(p_149660_2_, p_149660_3_, p_149660_4_ + 1, NORTH))
{
j1 = 4;
}
- else if (p_149660_5_ == 3 && p_149660_1_.func_147439_a(p_149660_2_, p_149660_3_, p_149660_4_ - 1).func_149721_r())
+ else if (dir == SOUTH && p_149660_1_.isSideSolid(p_149660_2_, p_149660_3_, p_149660_4_ - 1, SOUTH))
public boolean func_176196_c(World p_176196_1_, BlockPos p_176196_2_)
@@ -69,7 +70,7 @@
{
j1 = 3;
}
- else if (p_149660_5_ == 4 && p_149660_1_.func_147439_a(p_149660_2_ + 1, p_149660_3_, p_149660_4_).func_149721_r())
+ else if (dir == WEST && p_149660_1_.isSideSolid(p_149660_2_ + 1, p_149660_3_, p_149660_4_, WEST))
{
j1 = 2;
}
- else if (p_149660_5_ == 5 && p_149660_1_.func_147439_a(p_149660_2_ - 1, p_149660_3_, p_149660_4_).func_149721_r())
+ else if (dir == EAST && p_149660_1_.isSideSolid(p_149660_2_ - 1, p_149660_3_, p_149660_4_, EAST))
{
j1 = 1;
}
@@ -89,7 +101,11 @@

private int func_150045_e(World p_150045_1_, int p_150045_2_, int p_150045_3_, int p_150045_4_)
{
- return p_150045_1_.func_147439_a(p_150045_2_ - 1, p_150045_3_, p_150045_4_).func_149721_r() ? 1 : (p_150045_1_.func_147439_a(p_150045_2_ + 1, p_150045_3_, p_150045_4_).func_149721_r() ? 2 : (p_150045_1_.func_147439_a(p_150045_2_, p_150045_3_, p_150045_4_ - 1).func_149721_r() ? 3 : (p_150045_1_.func_147439_a(p_150045_2_, p_150045_3_, p_150045_4_ + 1).func_149721_r() ? 4 : 1)));
+ if (p_150045_1_.isSideSolid(p_150045_2_ - 1, p_150045_3_, p_150045_4_, EAST)) return 1;
+ if (p_150045_1_.isSideSolid(p_150045_2_ + 1, p_150045_3_, p_150045_4_, WEST)) return 2;
+ if (p_150045_1_.isSideSolid(p_150045_2_, p_150045_3_, p_150045_4_ - 1, SOUTH)) return 3;
+ if (p_150045_1_.isSideSolid(p_150045_2_, p_150045_3_, p_150045_4_ + 1, NORTH)) return 4;
+ return 1;
}

public void func_149695_a(World p_149695_1_, int p_149695_2_, int p_149695_3_, int p_149695_4_, Block p_149695_5_)
@@ -99,22 +115,22 @@
int l = p_149695_1_.func_72805_g(p_149695_2_, p_149695_3_, p_149695_4_) & 7;
boolean flag = false;
EnumFacing enumfacing = aenumfacing[j];

- if (!p_149695_1_.func_147439_a(p_149695_2_ - 1, p_149695_3_, p_149695_4_).func_149721_r() && l == 1)
+ if (!p_149695_1_.isSideSolid(p_149695_2_ - 1, p_149695_3_, p_149695_4_, EAST) && l == 1)
- if (p_176196_1_.func_180495_p(p_176196_2_.func_177972_a(enumfacing)).func_177230_c().func_149721_r())
+ if (p_176196_1_.isSideSolid(p_176196_2_.func_177972_a(enumfacing), enumfacing.func_176734_d(), true))
{
flag = true;
return true;
}
@@ -80,7 +81,7 @@

- if (!p_149695_1_.func_147439_a(p_149695_2_ + 1, p_149695_3_, p_149695_4_).func_149721_r() && l == 2)
+ if (!p_149695_1_.isSideSolid(p_149695_2_ + 1, p_149695_3_, p_149695_4_, WEST) && l == 2)
{
flag = true;
}
public IBlockState func_180642_a(World p_180642_1_, BlockPos p_180642_2_, EnumFacing p_180642_3_, float p_180642_4_, float p_180642_5_, float p_180642_6_, int p_180642_7_, EntityLivingBase p_180642_8_)
{
- return p_180642_1_.func_180495_p(p_180642_2_.func_177972_a(p_180642_3_.func_176734_d())).func_177230_c().func_149721_r() ? this.func_176223_P().func_177226_a(field_176585_a, p_180642_3_).func_177226_a(field_176584_b, Boolean.valueOf(false)) : this.func_176223_P().func_177226_a(field_176585_a, EnumFacing.DOWN).func_177226_a(field_176584_b, Boolean.valueOf(false));
+ return p_180642_1_.isSideSolid(p_180642_2_.func_177972_a(p_180642_3_.func_176734_d()), p_180642_3_, true) ? this.func_176223_P().func_177226_a(field_176585_a, p_180642_3_).func_177226_a(field_176584_b, Boolean.valueOf(false)) : this.func_176223_P().func_177226_a(field_176585_a, EnumFacing.DOWN).func_177226_a(field_176584_b, Boolean.valueOf(false));
}

- if (!p_149695_1_.func_147439_a(p_149695_2_, p_149695_3_, p_149695_4_ - 1).func_149721_r() && l == 3)
+ if (!p_149695_1_.isSideSolid(p_149695_2_, p_149695_3_, p_149695_4_ - 1, SOUTH) && l == 3)
{
flag = true;
}
public void func_176204_a(World p_176204_1_, BlockPos p_176204_2_, IBlockState p_176204_3_, Block p_176204_4_)
@@ -89,7 +90,7 @@
{
EnumFacing enumfacing = (EnumFacing)p_176204_3_.func_177229_b(field_176585_a);

- if (!p_149695_1_.func_147439_a(p_149695_2_, p_149695_3_, p_149695_4_ + 1).func_149721_r() && l == 4)
+ if (!p_149695_1_.isSideSolid(p_149695_2_, p_149695_3_, p_149695_4_ + 1, NORTH) && l == 4)
- if (!p_176204_1_.func_180495_p(p_176204_2_.func_177972_a(enumfacing.func_176734_d())).func_177230_c().func_149721_r())
+ if (!p_176204_1_.isSideSolid(p_176204_2_.func_177972_a(enumfacing.func_176734_d()), enumfacing, true))
{
flag = true;
}
this.func_176226_b(p_176204_1_, p_176204_2_, p_176204_3_, 0);
p_176204_1_.func_175698_g(p_176204_2_);
@@ -338,6 +339,8 @@
return new BlockState(this, new IProperty[] {field_176585_a, field_176584_b});
}

+ @Override public net.minecraft.item.Item func_180660_a(IBlockState state, Random rnd, int fortune){ return null; }
+
static final class SwitchEnumFacing
{
static final int[] field_180420_a = new int[EnumFacing.values().length];
@@ -1,49 +1,37 @@
--- ../src-base/minecraft/net/minecraft/block/BlockCactus.java
+++ ../src-work/minecraft/net/minecraft/block/BlockCactus.java
@@ -11,9 +11,13 @@
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.DamageSource;
import net.minecraft.util.IIcon;
+import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
+import net.minecraftforge.common.EnumPlantType;
+import net.minecraftforge.common.util.ForgeDirection;
+import net.minecraftforge.common.IPlantable;
@@ -19,7 +19,7 @@
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;

-public class BlockCactus extends Block
+public class BlockCactus extends Block implements IPlantable
+public class BlockCactus extends Block implements net.minecraftforge.common.IPlantable
{
@SideOnly(Side.CLIENT)
private IIcon field_150041_a;
@@ -125,7 +129,7 @@
else
{
Block block = p_149718_1_.func_147439_a(p_149718_2_, p_149718_3_ - 1, p_149718_4_);
- return block == Blocks.field_150434_aF || block == Blocks.field_150354_m;
+ return block.canSustainPlant(p_149718_1_, p_149718_2_, p_149718_3_ - 1, p_149718_4_, ForgeDirection.UP, this);
public static final PropertyInteger field_176587_a = PropertyInteger.func_177719_a("age", 0, 15);
private static final String __OBFID = "CL_00000210";
@@ -115,7 +115,7 @@
}

Block block = p_176586_1_.func_180495_p(p_176586_2_.func_177977_b()).func_177230_c();
- return block == Blocks.field_150434_aF || block == Blocks.field_150354_m;
+ return block.canSustainPlant(p_176586_1_, p_176586_2_.func_177977_b(), EnumFacing.UP, this);
}

@@ -141,4 +145,22 @@
this.field_150041_a = p_149651_1_.func_94245_a(this.func_149641_N() + "_top");
this.field_150040_b = p_149651_1_.func_94245_a(this.func_149641_N() + "_bottom");
public void func_180634_a(World p_180634_1_, BlockPos p_180634_2_, IBlockState p_180634_3_, Entity p_180634_4_)
@@ -143,4 +143,16 @@
{
return new BlockState(this, new IProperty[] {field_176587_a});
}
+
+ @Override
+ public EnumPlantType getPlantType(IBlockAccess world, int x, int y, int z)
+ {
+ return EnumPlantType.Desert;
+ }
+
+ @Override
+ public Block getPlant(IBlockAccess world, int x, int y, int z)
+ public net.minecraftforge.common.EnumPlantType getPlantType(net.minecraft.world.IBlockAccess world, BlockPos pos)
+ {
+ return this;
+ return net.minecraftforge.common.EnumPlantType.Desert;
+ }
+
+ @Override
+ public int getPlantMetadata(IBlockAccess world, int x, int y, int z)
+ public IBlockState getPlant(net.minecraft.world.IBlockAccess world, BlockPos pos)
+ {
+ return -1;
+ return func_176223_P();
+ }
}
Oops, something went wrong.

0 comments on commit 53659fc

Please sign in to comment.
You can’t perform that action at this time.