mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-20 12:20:11 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
83248d65c2 | ||
|
|
dda9f474af | ||
|
|
b7e940da22 | ||
|
|
df3449534f | ||
|
|
906cb8ee39 | ||
|
|
d541e492c4 | ||
|
|
d7d0f241ff | ||
|
|
c8fca39895 | ||
|
|
dd1eb6924d |
No files matched your search
@@ -106,6 +106,7 @@ public class ForgeHooksClient {
|
|||||||
Tessellator.instance=t;
|
Tessellator.instance=t;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static IRenderContextHandler unbindContext=null;
|
||||||
protected static void bindTexture(String name, int sub) {
|
protected static void bindTexture(String name, int sub) {
|
||||||
Integer n;
|
Integer n;
|
||||||
n=textures.get(name);
|
n=textures.get(name);
|
||||||
@@ -115,12 +116,20 @@ public class ForgeHooksClient {
|
|||||||
textures.put(name,n);
|
textures.put(name,n);
|
||||||
}
|
}
|
||||||
if(!inWorld) {
|
if(!inWorld) {
|
||||||
|
if(unbindContext!=null) {
|
||||||
|
unbindContext.afterRenderContext();
|
||||||
|
unbindContext=null;
|
||||||
|
}
|
||||||
if(Tessellator.instance.isDrawing) {
|
if(Tessellator.instance.isDrawing) {
|
||||||
int mode=Tessellator.instance.drawMode;
|
int mode=Tessellator.instance.drawMode;
|
||||||
Tessellator.instance.draw();
|
Tessellator.instance.draw();
|
||||||
Tessellator.instance.startDrawing(mode);
|
Tessellator.instance.startDrawing(mode);
|
||||||
}
|
}
|
||||||
GL11.glBindTexture(3553 /* GL_TEXTURE_2D */,n);
|
GL11.glBindTexture(3553 /* GL_TEXTURE_2D */,n);
|
||||||
|
unbindContext=renderHandlers.get(new TesKey(n,sub));
|
||||||
|
if(unbindContext!=null) {
|
||||||
|
unbindContext.beforeRenderContext();
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
bindTessellator(n,sub);
|
bindTessellator(n,sub);
|
||||||
@@ -133,6 +142,10 @@ public class ForgeHooksClient {
|
|||||||
if(Tessellator.instance.isDrawing) {
|
if(Tessellator.instance.isDrawing) {
|
||||||
int mode=Tessellator.instance.drawMode;
|
int mode=Tessellator.instance.drawMode;
|
||||||
Tessellator.instance.draw();
|
Tessellator.instance.draw();
|
||||||
|
if(unbindContext!=null) {
|
||||||
|
unbindContext.afterRenderContext();
|
||||||
|
unbindContext=null;
|
||||||
|
}
|
||||||
Tessellator.instance.startDrawing(mode);
|
Tessellator.instance.startDrawing(mode);
|
||||||
}
|
}
|
||||||
GL11.glBindTexture(3553 /* GL_TEXTURE_2D */, ModLoader
|
GL11.glBindTexture(3553 /* GL_TEXTURE_2D */, ModLoader
|
||||||
|
|||||||
@@ -269,7 +269,7 @@ public class ForgeHooks {
|
|||||||
|
|
||||||
public static final int majorVersion=1;
|
public static final int majorVersion=1;
|
||||||
public static final int minorVersion=2;
|
public static final int minorVersion=2;
|
||||||
public static final int revisionVersion=3;
|
public static final int revisionVersion=4;
|
||||||
static {
|
static {
|
||||||
System.out.printf("MinecraftForge V%d.%d.%d Initialized\n", majorVersion, minorVersion, revisionVersion);
|
System.out.printf("MinecraftForge V%d.%d.%d Initialized\n", majorVersion, minorVersion, revisionVersion);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -321,7 +321,7 @@
|
|||||||
+ * @param encouragement How much the block encourages fire to spread
|
+ * @param encouragement How much the block encourages fire to spread
|
||||||
+ * @param flammability how easy a block is to catch fire
|
+ * @param flammability how easy a block is to catch fire
|
||||||
+ */
|
+ */
|
||||||
+ protected static void setBurnRate(int id, int encouragement, int flammability)
|
+ public static void setBurnProperties(int id, int encouragement, int flammability)
|
||||||
+ {
|
+ {
|
||||||
+ blockFireSpreadSpeed[id] = encouragement;
|
+ blockFireSpreadSpeed[id] = encouragement;
|
||||||
+ blockFlammability[id] = flammability;
|
+ blockFlammability[id] = flammability;
|
||||||
|
|||||||
@@ -20,20 +20,21 @@
|
|||||||
setTickOnLoad(true);
|
setTickOnLoad(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -39,12 +39,6 @@
|
@@ -38,11 +38,10 @@
|
||||||
|
setBurnRate(Block.cloth.blockID, 30, 60);
|
||||||
setBurnRate(Block.vine.blockID, 15, 100);
|
setBurnRate(Block.vine.blockID, 15, 100);
|
||||||
}
|
}
|
||||||
|
-
|
||||||
- private void setBurnRate(int i, int j, int k)
|
+
|
||||||
- {
|
private void setBurnRate(int i, int j, int k)
|
||||||
|
{
|
||||||
- chanceToEncourageFire[i] = j;
|
- chanceToEncourageFire[i] = j;
|
||||||
- abilityToCatchFire[i] = k;
|
- abilityToCatchFire[i] = k;
|
||||||
- }
|
+ Block.setBurnProperties(i, j, k);
|
||||||
-
|
}
|
||||||
|
|
||||||
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int i, int j, int k)
|
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int i, int j, int k)
|
||||||
{
|
@@ -77,11 +76,9 @@
|
||||||
return null;
|
|
||||||
@@ -77,11 +71,9 @@
|
|
||||||
|
|
||||||
public void updateTick(World world, int i, int j, int k, Random random)
|
public void updateTick(World world, int i, int j, int k, Random random)
|
||||||
{
|
{
|
||||||
@@ -48,7 +49,7 @@
|
|||||||
if(!canPlaceBlockAt(world, i, j, k))
|
if(!canPlaceBlockAt(world, i, j, k))
|
||||||
{
|
{
|
||||||
world.setBlockWithNotify(i, j, k, 0);
|
world.setBlockWithNotify(i, j, k, 0);
|
||||||
@@ -99,23 +91,23 @@
|
@@ -99,23 +96,23 @@
|
||||||
world.scheduleBlockUpdate(i, j, k, blockID, tickRate());
|
world.scheduleBlockUpdate(i, j, k, blockID, tickRate());
|
||||||
if(!flag && !func_263_h(world, i, j, k))
|
if(!flag && !func_263_h(world, i, j, k))
|
||||||
{
|
{
|
||||||
@@ -80,14 +81,22 @@
|
|||||||
for(int i1 = i - 1; i1 <= i + 1; i1++)
|
for(int i1 = i - 1; i1 <= i + 1; i1++)
|
||||||
{
|
{
|
||||||
for(int j1 = k - 1; j1 <= k + 1; j1++)
|
for(int j1 = k - 1; j1 <= k + 1; j1++)
|
||||||
@@ -155,9 +147,14 @@
|
@@ -155,9 +152,23 @@
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- private void tryToCatchBlockOnFire(World world, int i, int j, int k, int l, Random random, int i1)
|
+ /*
|
||||||
+ private void tryToCatchBlockOnFire(World world, int i, int j, int k, int l, Random random, int i1, int face)
|
+ * Added for backwards compatibility, should not be called by anyone who is making a mod for forge
|
||||||
|
+ */
|
||||||
|
+ @Deprecated
|
||||||
|
private void tryToCatchBlockOnFire(World world, int i, int j, int k, int l, Random random, int i1)
|
||||||
{
|
{
|
||||||
- int j1 = abilityToCatchFire[world.getBlockId(i, j, k)];
|
- int j1 = abilityToCatchFire[world.getBlockId(i, j, k)];
|
||||||
|
+ tryToCatchBlockOnFire(world, i, j, k, l, random, i1, 0);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ private void tryToCatchBlockOnFire(World world, int i, int j, int k, int l, Random random, int i1, int face)
|
||||||
|
+ {
|
||||||
+ Block block = Block.blocksList[world.getBlockId(i, j, k)];
|
+ Block block = Block.blocksList[world.getBlockId(i, j, k)];
|
||||||
+ int j1 = 0;
|
+ int j1 = 0;
|
||||||
+ if (block != null)
|
+ if (block != null)
|
||||||
@@ -97,7 +106,7 @@
|
|||||||
if(random.nextInt(l) < j1)
|
if(random.nextInt(l) < j1)
|
||||||
{
|
{
|
||||||
boolean flag = world.getBlockId(i, j, k) == Block.tnt.blockID;
|
boolean flag = world.getBlockId(i, j, k) == Block.tnt.blockID;
|
||||||
@@ -182,27 +179,27 @@
|
@@ -182,27 +193,27 @@
|
||||||
|
|
||||||
private boolean func_263_h(World world, int i, int j, int k)
|
private boolean func_263_h(World world, int i, int j, int k)
|
||||||
{
|
{
|
||||||
@@ -131,7 +140,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
private int getChanceOfNeighborsEncouragingFire(World world, int i, int j, int k)
|
private int getChanceOfNeighborsEncouragingFire(World world, int i, int j, int k)
|
||||||
@@ -213,12 +210,12 @@
|
@@ -213,12 +224,12 @@
|
||||||
return 0;
|
return 0;
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
@@ -150,19 +159,24 @@
|
|||||||
return l;
|
return l;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -228,14 +225,25 @@
|
@@ -227,15 +238,43 @@
|
||||||
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
-
|
||||||
- public boolean canBlockCatchFire(IBlockAccess iblockaccess, int i, int j, int k)
|
+
|
||||||
- {
|
+ /*
|
||||||
- return chanceToEncourageFire[iblockaccess.getBlockId(i, j, k)] > 0;
|
+ * Added for backwards compatibility, should not be called by anyone who is making a mod for forge
|
||||||
- }
|
+ */
|
||||||
|
+ @Deprecated
|
||||||
- public int getChanceToEncourageFire(World world, int i, int j, int k, int l)
|
public boolean canBlockCatchFire(IBlockAccess iblockaccess, int i, int j, int k)
|
||||||
+ public boolean canBlockCatchFire(IBlockAccess world, int i, int j, int k, int face)
|
|
||||||
{
|
{
|
||||||
- int i1 = chanceToEncourageFire[world.getBlockId(i, j, k)];
|
- return chanceToEncourageFire[iblockaccess.getBlockId(i, j, k)] > 0;
|
||||||
|
+ return canBlockCatchFire(iblockaccess, i, j, k, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
+ public boolean canBlockCatchFire(IBlockAccess world, int i, int j, int k, int face)
|
||||||
|
+ {
|
||||||
+ Block block = Block.blocksList[world.getBlockId(i, j, k)];
|
+ Block block = Block.blocksList[world.getBlockId(i, j, k)];
|
||||||
+ if (block != null)
|
+ if (block != null)
|
||||||
+ {
|
+ {
|
||||||
@@ -171,6 +185,16 @@
|
|||||||
+ return false;
|
+ return false;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
|
+ /*
|
||||||
|
+ * Added for backwards compatibility, should not be called by anyone who is making a mod for forge
|
||||||
|
+ */
|
||||||
|
+ @Deprecated
|
||||||
|
public int getChanceToEncourageFire(World world, int i, int j, int k, int l)
|
||||||
|
{
|
||||||
|
- int i1 = chanceToEncourageFire[world.getBlockId(i, j, k)];
|
||||||
|
+ return getChanceToEncourageFire(world, i, j, k, l, 0);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
+ public int getChanceToEncourageFire(World world, int i, int j, int k, int l, int face)
|
+ public int getChanceToEncourageFire(World world, int i, int j, int k, int l, int face)
|
||||||
+ {
|
+ {
|
||||||
+ int i1 = 0;
|
+ int i1 = 0;
|
||||||
@@ -182,7 +206,7 @@
|
|||||||
if(i1 > l)
|
if(i1 > l)
|
||||||
{
|
{
|
||||||
return i1;
|
return i1;
|
||||||
@@ -247,12 +255,12 @@
|
@@ -247,12 +286,12 @@
|
||||||
|
|
||||||
public boolean canPlaceBlockAt(World world, int i, int j, int k)
|
public boolean canPlaceBlockAt(World world, int i, int j, int k)
|
||||||
{
|
{
|
||||||
@@ -197,7 +221,7 @@
|
|||||||
{
|
{
|
||||||
world.setBlockWithNotify(i, j, k, 0);
|
world.setBlockWithNotify(i, j, k, 0);
|
||||||
return;
|
return;
|
||||||
@@ -268,7 +276,7 @@
|
@@ -268,7 +307,7 @@
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -206,7 +230,7 @@
|
|||||||
{
|
{
|
||||||
world.setBlockWithNotify(i, j, k, 0);
|
world.setBlockWithNotify(i, j, k, 0);
|
||||||
return;
|
return;
|
||||||
@@ -285,7 +293,7 @@
|
@@ -285,7 +324,7 @@
|
||||||
{
|
{
|
||||||
world.playSoundEffect((float)i + 0.5F, (float)j + 0.5F, (float)k + 0.5F, "fire.fire", 1.0F + random.nextFloat(), random.nextFloat() * 0.7F + 0.3F);
|
world.playSoundEffect((float)i + 0.5F, (float)j + 0.5F, (float)k + 0.5F, "fire.fire", 1.0F + random.nextFloat(), random.nextFloat() * 0.7F + 0.3F);
|
||||||
}
|
}
|
||||||
@@ -215,7 +239,7 @@
|
|||||||
{
|
{
|
||||||
for(int l = 0; l < 3; l++)
|
for(int l = 0; l < 3; l++)
|
||||||
{
|
{
|
||||||
@@ -297,7 +305,7 @@
|
@@ -297,7 +336,7 @@
|
||||||
|
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
@@ -224,7 +248,7 @@
|
|||||||
{
|
{
|
||||||
for(int i1 = 0; i1 < 2; i1++)
|
for(int i1 = 0; i1 < 2; i1++)
|
||||||
{
|
{
|
||||||
@@ -308,7 +316,7 @@
|
@@ -308,7 +347,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -233,7 +257,7 @@
|
|||||||
{
|
{
|
||||||
for(int j1 = 0; j1 < 2; j1++)
|
for(int j1 = 0; j1 < 2; j1++)
|
||||||
{
|
{
|
||||||
@@ -319,7 +327,7 @@
|
@@ -319,7 +358,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -242,7 +266,7 @@
|
|||||||
{
|
{
|
||||||
for(int k1 = 0; k1 < 2; k1++)
|
for(int k1 = 0; k1 < 2; k1++)
|
||||||
{
|
{
|
||||||
@@ -330,7 +338,7 @@
|
@@ -330,7 +369,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -251,7 +275,7 @@
|
|||||||
{
|
{
|
||||||
for(int l1 = 0; l1 < 2; l1++)
|
for(int l1 = 0; l1 < 2; l1++)
|
||||||
{
|
{
|
||||||
@@ -341,7 +349,7 @@
|
@@ -341,7 +380,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -267,7 +267,7 @@
|
|||||||
+ * @param face The face that the fire is coming from
|
+ * @param face The face that the fire is coming from
|
||||||
+ * @return A number that is used to determine the speed of fire growth around the block
|
+ * @return A number that is used to determine the speed of fire growth around the block
|
||||||
+ */
|
+ */
|
||||||
+ public int chanceToEncourageFire(World world, int x, int y, int z, int metadata, int face)
|
+ public int getFireSpreadSpeed(World world, int x, int y, int z, int metadata, int face)
|
||||||
+ {
|
+ {
|
||||||
+ return blockFireSpreadSpeed[blockID];
|
+ return blockFireSpreadSpeed[blockID];
|
||||||
+ }
|
+ }
|
||||||
@@ -304,7 +304,7 @@
|
|||||||
+ * @param encouragement How much the block encourages fire to spread
|
+ * @param encouragement How much the block encourages fire to spread
|
||||||
+ * @param flammability how easy a block is to catch fire
|
+ * @param flammability how easy a block is to catch fire
|
||||||
+ */
|
+ */
|
||||||
+ protected static void setBurnRate(int id, int encouragement, int flammability)
|
+ public static void setBurnProperties(int id, int encouragement, int flammability)
|
||||||
+ {
|
+ {
|
||||||
+ blockFireSpreadSpeed[id] = encouragement;
|
+ blockFireSpreadSpeed[id] = encouragement;
|
||||||
+ blockFlammability[id] = flammability;
|
+ blockFlammability[id] = flammability;
|
||||||
|
|||||||
@@ -20,20 +20,21 @@
|
|||||||
setTickOnLoad(true);
|
setTickOnLoad(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -39,12 +39,6 @@
|
@@ -38,11 +38,10 @@
|
||||||
|
setBurnRate(Block.cloth.blockID, 30, 60);
|
||||||
setBurnRate(Block.vine.blockID, 15, 100);
|
setBurnRate(Block.vine.blockID, 15, 100);
|
||||||
}
|
}
|
||||||
|
-
|
||||||
- private void setBurnRate(int i, int j, int k)
|
+
|
||||||
- {
|
private void setBurnRate(int i, int j, int k)
|
||||||
|
{
|
||||||
- chanceToEncourageFire[i] = j;
|
- chanceToEncourageFire[i] = j;
|
||||||
- abilityToCatchFire[i] = k;
|
- abilityToCatchFire[i] = k;
|
||||||
- }
|
+ Block.setBurnProperties(i, j, k);
|
||||||
-
|
}
|
||||||
|
|
||||||
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int i, int j, int k)
|
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int i, int j, int k)
|
||||||
{
|
@@ -77,11 +76,9 @@
|
||||||
return null;
|
|
||||||
@@ -77,11 +71,9 @@
|
|
||||||
|
|
||||||
public void updateTick(World world, int i, int j, int k, Random random)
|
public void updateTick(World world, int i, int j, int k, Random random)
|
||||||
{
|
{
|
||||||
@@ -48,7 +49,7 @@
|
|||||||
if(!canPlaceBlockAt(world, i, j, k))
|
if(!canPlaceBlockAt(world, i, j, k))
|
||||||
{
|
{
|
||||||
world.setBlockWithNotify(i, j, k, 0);
|
world.setBlockWithNotify(i, j, k, 0);
|
||||||
@@ -99,23 +91,23 @@
|
@@ -99,23 +96,23 @@
|
||||||
world.scheduleBlockUpdate(i, j, k, blockID, tickRate());
|
world.scheduleBlockUpdate(i, j, k, blockID, tickRate());
|
||||||
if(!flag && !func_268_g(world, i, j, k))
|
if(!flag && !func_268_g(world, i, j, k))
|
||||||
{
|
{
|
||||||
@@ -80,14 +81,24 @@
|
|||||||
for(int i1 = i - 1; i1 <= i + 1; i1++)
|
for(int i1 = i - 1; i1 <= i + 1; i1++)
|
||||||
{
|
{
|
||||||
for(int j1 = k - 1; j1 <= k + 1; j1++)
|
for(int j1 = k - 1; j1 <= k + 1; j1++)
|
||||||
@@ -155,9 +147,14 @@
|
@@ -154,10 +151,24 @@
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
-
|
||||||
- private void tryToCatchBlockOnFire(World world, int i, int j, int k, int l, Random random, int i1)
|
+
|
||||||
+ private void tryToCatchBlockOnFire(World world, int i, int j, int k, int l, Random random, int i1, int face)
|
+ /*
|
||||||
|
+ * Added for backwards compatibility, should not be called by anyone who is making a mod for forge
|
||||||
|
+ */
|
||||||
|
+ @Deprecated
|
||||||
|
private void tryToCatchBlockOnFire(World world, int i, int j, int k, int l, Random random, int i1)
|
||||||
{
|
{
|
||||||
- int j1 = abilityToCatchFire[world.getBlockId(i, j, k)];
|
- int j1 = abilityToCatchFire[world.getBlockId(i, j, k)];
|
||||||
|
+ tryToCatchBlockOnFire(world, i, j, k, l, random, i1, 0);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ private void tryToCatchBlockOnFire(World world, int i, int j, int k, int l, Random random, int i1, int face)
|
||||||
|
+ {
|
||||||
+ Block block = Block.blocksList[world.getBlockId(i, j, k)];
|
+ Block block = Block.blocksList[world.getBlockId(i, j, k)];
|
||||||
+ int j1 = 0;
|
+ int j1 = 0;
|
||||||
+ if (block != null)
|
+ if (block != null)
|
||||||
@@ -97,7 +108,7 @@
|
|||||||
if(random.nextInt(l) < j1)
|
if(random.nextInt(l) < j1)
|
||||||
{
|
{
|
||||||
boolean flag = world.getBlockId(i, j, k) == Block.tnt.blockID;
|
boolean flag = world.getBlockId(i, j, k) == Block.tnt.blockID;
|
||||||
@@ -182,27 +179,27 @@
|
@@ -182,27 +193,27 @@
|
||||||
|
|
||||||
private boolean func_268_g(World world, int i, int j, int k)
|
private boolean func_268_g(World world, int i, int j, int k)
|
||||||
{
|
{
|
||||||
@@ -131,7 +142,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
private int getChanceOfNeighborsEncouragingFire(World world, int i, int j, int k)
|
private int getChanceOfNeighborsEncouragingFire(World world, int i, int j, int k)
|
||||||
@@ -213,12 +210,12 @@
|
@@ -213,12 +224,12 @@
|
||||||
return 0;
|
return 0;
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
@@ -150,19 +161,24 @@
|
|||||||
return l;
|
return l;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -228,14 +225,24 @@
|
@@ -227,15 +238,43 @@
|
||||||
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
- public boolean canBlockCatchFire(IBlockAccess iblockaccess, int i, int j, int k)
|
|
||||||
- {
|
|
||||||
- return chanceToEncourageFire[iblockaccess.getBlockId(i, j, k)] > 0;
|
|
||||||
- }
|
|
||||||
-
|
-
|
||||||
- public int getChanceToEncourageFire(World world, int i, int j, int k, int l)
|
+
|
||||||
+ public boolean canBlockCatchFire(IBlockAccess world, int i, int j, int k, int face)
|
+ /*
|
||||||
|
+ * Added for backwards compatibility, should not be called by anyone who is making a mod for forge
|
||||||
|
+ */
|
||||||
|
+ @Deprecated
|
||||||
|
public boolean canBlockCatchFire(IBlockAccess iblockaccess, int i, int j, int k)
|
||||||
{
|
{
|
||||||
- int i1 = chanceToEncourageFire[world.getBlockId(i, j, k)];
|
- return chanceToEncourageFire[iblockaccess.getBlockId(i, j, k)] > 0;
|
||||||
|
+ return canBlockCatchFire(iblockaccess, i, j, k, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
+ public boolean canBlockCatchFire(IBlockAccess world, int i, int j, int k, int face)
|
||||||
|
+ {
|
||||||
+ Block block = Block.blocksList[world.getBlockId(i, j, k)];
|
+ Block block = Block.blocksList[world.getBlockId(i, j, k)];
|
||||||
+ if (block != null)
|
+ if (block != null)
|
||||||
+ {
|
+ {
|
||||||
@@ -171,18 +187,28 @@
|
|||||||
+ return false;
|
+ return false;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
|
+ /*
|
||||||
|
+ * Added for backwards compatibility, should not be called by anyone who is making a mod for forge
|
||||||
|
+ */
|
||||||
|
+ @Deprecated
|
||||||
|
public int getChanceToEncourageFire(World world, int i, int j, int k, int l)
|
||||||
|
{
|
||||||
|
- int i1 = chanceToEncourageFire[world.getBlockId(i, j, k)];
|
||||||
|
+ return getChanceToEncourageFire(world, i, j, k, l, 0);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
+ public int getChanceToEncourageFire(World world, int i, int j, int k, int l, int face)
|
+ public int getChanceToEncourageFire(World world, int i, int j, int k, int l, int face)
|
||||||
+ {
|
+ {
|
||||||
+ int i1 = 0;
|
+ int i1 = 0;
|
||||||
+ Block block = Block.blocksList[world.getBlockId(i, j, k)];
|
+ Block block = Block.blocksList[world.getBlockId(i, j, k)];
|
||||||
+ if (block != null)
|
+ if (block != null)
|
||||||
+ {
|
+ {
|
||||||
+ i1 = block.chanceToEncourageFire(world, i, j, k, world.getBlockMetadata(i, j, k), face);
|
+ i1 = block.getFireSpreadSpeed(world, i, j, k, world.getBlockMetadata(i, j, k), face);
|
||||||
+ }
|
+ }
|
||||||
if(i1 > l)
|
if(i1 > l)
|
||||||
{
|
{
|
||||||
return i1;
|
return i1;
|
||||||
@@ -247,12 +254,12 @@
|
@@ -247,12 +286,12 @@
|
||||||
|
|
||||||
public boolean canPlaceBlockAt(World world, int i, int j, int k)
|
public boolean canPlaceBlockAt(World world, int i, int j, int k)
|
||||||
{
|
{
|
||||||
@@ -197,7 +223,7 @@
|
|||||||
{
|
{
|
||||||
world.setBlockWithNotify(i, j, k, 0);
|
world.setBlockWithNotify(i, j, k, 0);
|
||||||
return;
|
return;
|
||||||
@@ -268,7 +275,7 @@
|
@@ -268,7 +307,7 @@
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -8,6 +8,6 @@ set PATH=E:\cygwin\bin;%PATH%
|
|||||||
|
|
||||||
cd forge
|
cd forge
|
||||||
|
|
||||||
sh package.sh 1.2.2
|
sh package.sh 1.2.4
|
||||||
|
|
||||||
pause
|
pause
|
||||||
Reference in new issue
Block a user