mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-20 12:20:11 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e554a79351 | ||
|
|
2c7b827bbd | ||
|
|
d56f912277 | ||
|
|
5332a09d17 | ||
|
|
82c0731888 | ||
|
|
a0b0faf693 | ||
|
|
ed3fe86454 | ||
|
|
5bf8a30ab8 | ||
|
|
663ed58610 | ||
|
|
d1909d30ac | ||
|
|
5013991fa4 | ||
|
|
1ed1d233c7 | ||
|
|
3fb9b988d9 | ||
|
|
10f8c2c426 | ||
|
|
8d43d859c7 | ||
|
|
106b9dc4c9 | ||
|
|
8735d92ecd | ||
|
|
87ea7289cb | ||
|
|
8a08602dc3 | ||
|
|
2995f1c072 | ||
|
|
812be37f5f | ||
|
|
4928e3b059 | ||
|
|
3262b656a3 | ||
|
|
5fc1ee844d | ||
|
|
1be3e18a9d | ||
|
|
e511ba7db8 | ||
|
|
e08cec3bc0 | ||
|
|
d6a5cf2828 | ||
|
|
03c5d8aeb4 | ||
|
|
3c3654b576 | ||
|
|
fb30b67adb | ||
|
|
d08641aae5 | ||
|
|
99542f5ef5 | ||
|
|
5decee87d6 | ||
|
|
590072e636 | ||
|
|
fb1cd9be88 | ||
|
|
576ff2fadb | ||
|
|
9e28c51d23 | ||
|
|
6d5dffa458 | ||
|
|
30b1f4c2ed | ||
|
|
0e221f098c | ||
|
|
e835fd2a46 | ||
|
|
55f599e2b3 | ||
|
|
68c3a5675f | ||
|
|
a31f983e6a | ||
|
|
a2fac655b4 | ||
|
|
670180a0b6 | ||
|
|
54da114945 | ||
|
|
ebd92e094d | ||
|
|
7f67f1f13a | ||
|
|
b719f6142c | ||
|
|
18795572fe | ||
|
|
fba7f7d1ab | ||
|
|
1c253966c8 | ||
|
|
effbaa0c74 | ||
|
|
321c8196e7 | ||
|
|
024ebad54a | ||
|
|
d58587a016 | ||
|
|
249d607397 | ||
|
|
5a3585adaa | ||
|
|
8fb9ad4687 | ||
|
|
6715ccd14a | ||
|
|
cf456f9f3d | ||
|
|
a19394d48a | ||
|
|
e233005138 | ||
|
|
f579b2db69 | ||
|
|
fe62372429 | ||
|
|
12853df285 | ||
|
|
9034062c8c | ||
|
|
2a950f3e80 | ||
|
|
fb0ccd3618 | ||
|
|
a6214f2d45 | ||
|
|
3135a0650a | ||
|
|
d2c6244ca8 | ||
|
|
74e7431ab6 | ||
|
|
086b155e6b | ||
|
|
f82ee17e48 | ||
|
|
ae02a73c67 | ||
|
|
561e3c773f | ||
|
|
4127a60d3f | ||
|
|
e7c2b0506f | ||
|
|
65e1544168 | ||
|
|
e9ae3a0a82 | ||
|
|
b4fa5f58db | ||
|
|
eda99a16fb | ||
|
|
721b3015db | ||
|
|
297b35a136 | ||
|
|
29a712e0f9 | ||
|
|
81802108ca | ||
|
|
0908fdfe5c | ||
|
|
fb070104a2 | ||
|
|
e85d4af5da | ||
|
|
54bb9a6efb | ||
|
|
ca979fe391 | ||
|
|
f59a0f61aa | ||
|
|
2a1342dc75 | ||
|
|
f264295d12 | ||
|
|
fb4bbaa85b | ||
|
|
c25a08e946 | ||
|
|
a6a1bcf402 | ||
|
|
0ae9be4710 | ||
|
|
4f7c0b73f8 | ||
|
|
87a9cc96cb | ||
|
|
07dd048d50 | ||
|
|
47bf6357c3 | ||
|
|
705fc5b26c | ||
|
|
7b35ba5be4 | ||
|
|
1a04139657 | ||
|
|
6cfbc34940 | ||
|
|
8fcc2a1f9f | ||
|
|
d3323f547c | ||
|
|
ad3d08f0ee | ||
|
|
f7a3157174 | ||
|
|
7de8218e4a | ||
|
|
0aeb6f1eab | ||
|
|
08beffb945 | ||
|
|
ff6a314cf8 | ||
|
|
5a9c5b4b67 | ||
|
|
0d6fbf063b | ||
|
|
b9a56c48b1 | ||
|
|
b9d42053b2 | ||
|
|
00cd110fae | ||
|
|
36ed659b17 | ||
|
|
be3b4cc3bc | ||
|
|
da26ee2422 | ||
|
|
92d0d6f4e1 | ||
|
|
44992f9b69 | ||
|
|
c9bcb73636 | ||
|
|
cd865a256b | ||
|
|
01c34eb0be | ||
|
|
c9c2bbef1d | ||
|
|
606e0d8e80 | ||
|
|
bedcc2fc64 | ||
|
|
c7db47d528 | ||
|
|
f50d35ce3f | ||
|
|
112adbef8f | ||
|
|
0d917cfdcc | ||
|
|
8f03e6cd24 | ||
|
|
e507f90276 | ||
|
|
dae71d0b7a | ||
|
|
5b2be7903c | ||
|
|
6389b16609 | ||
|
|
902f8918a3 | ||
|
|
73d19ef0a3 | ||
|
|
80ab9a98bb | ||
|
|
7837e4d3a1 | ||
|
|
423490e1c8 | ||
|
|
deae2de0eb | ||
|
|
821cc3ec54 | ||
|
|
9cb5f47805 | ||
|
|
c51848db5b | ||
|
|
20c30d541c | ||
|
|
d9e4d13d69 | ||
|
|
1822dfd896 | ||
|
|
8df7df145b | ||
|
|
f89a1210df | ||
|
|
50c30fce23 | ||
|
|
ad56d1c879 | ||
|
|
65aa6d6b43 | ||
|
|
6aa32def11 | ||
|
|
7be20d9c4d | ||
|
|
3cf1792bec | ||
|
|
d1a79c2a66 | ||
|
|
5b06661835 | ||
|
|
a7e950e7c2 | ||
|
|
341cfc0cf7 | ||
|
|
ba6aa3368d | ||
|
|
81e5a85a36 | ||
|
|
050d0ac294 | ||
|
|
c0c4830ed4 | ||
|
|
9eed4e19f2 | ||
|
|
e8c2895042 |
No files matched your search
@@ -106,7 +106,6 @@ 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);
|
||||||
@@ -116,20 +115,12 @@ 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);
|
||||||
@@ -142,10 +133,6 @@ 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=4;
|
public static final int revisionVersion=3;
|
||||||
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
|
||||||
+ */
|
+ */
|
||||||
+ public static void setBurnProperties(int id, int encouragement, int flammability)
|
+ protected static void setBurnRate(int id, int encouragement, int flammability)
|
||||||
+ {
|
+ {
|
||||||
+ blockFireSpreadSpeed[id] = encouragement;
|
+ blockFireSpreadSpeed[id] = encouragement;
|
||||||
+ blockFlammability[id] = flammability;
|
+ blockFlammability[id] = flammability;
|
||||||
|
|||||||
@@ -20,21 +20,20 @@
|
|||||||
setTickOnLoad(true);
|
setTickOnLoad(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -38,11 +38,10 @@
|
@@ -39,12 +39,6 @@
|
||||||
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)
|
||||||
{
|
{
|
||||||
@@ -49,7 +48,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 +96,23 @@
|
@@ -99,23 +91,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))
|
||||||
{
|
{
|
||||||
@@ -81,22 +80,14 @@
|
|||||||
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 +152,23 @@
|
@@ -155,9 +147,14 @@
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
+ /*
|
- private void tryToCatchBlockOnFire(World world, int i, int j, int k, int l, Random random, int i1)
|
||||||
+ * Added for backwards compatibility, should not be called by anyone who is making a mod for forge
|
+ private void tryToCatchBlockOnFire(World world, int i, int j, int k, int l, Random random, int i1, int face)
|
||||||
+ */
|
|
||||||
+ @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)
|
||||||
@@ -106,7 +97,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 +193,27 @@
|
@@ -182,27 +179,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)
|
||||||
{
|
{
|
||||||
@@ -140,7 +131,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 +224,12 @@
|
@@ -213,12 +210,12 @@
|
||||||
return 0;
|
return 0;
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
@@ -159,24 +150,19 @@
|
|||||||
return l;
|
return l;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -227,15 +238,43 @@
|
@@ -228,14 +225,25 @@
|
||||||
{
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
-
|
|
||||||
+
|
|
||||||
+ /*
|
|
||||||
+ * 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)
|
|
||||||
{
|
|
||||||
- return chanceToEncourageFire[iblockaccess.getBlockId(i, j, k)] > 0;
|
|
||||||
+ return canBlockCatchFire(iblockaccess, i, j, k, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
- 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)
|
+ public boolean canBlockCatchFire(IBlockAccess world, int i, int j, int k, int face)
|
||||||
+ {
|
{
|
||||||
|
- int i1 = chanceToEncourageFire[world.getBlockId(i, j, k)];
|
||||||
+ Block block = Block.blocksList[world.getBlockId(i, j, k)];
|
+ Block block = Block.blocksList[world.getBlockId(i, j, k)];
|
||||||
+ if (block != null)
|
+ if (block != null)
|
||||||
+ {
|
+ {
|
||||||
@@ -185,16 +171,6 @@
|
|||||||
+ 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;
|
||||||
@@ -206,7 +182,7 @@
|
|||||||
if(i1 > l)
|
if(i1 > l)
|
||||||
{
|
{
|
||||||
return i1;
|
return i1;
|
||||||
@@ -247,12 +286,12 @@
|
@@ -247,12 +255,12 @@
|
||||||
|
|
||||||
public boolean canPlaceBlockAt(World world, int i, int j, int k)
|
public boolean canPlaceBlockAt(World world, int i, int j, int k)
|
||||||
{
|
{
|
||||||
@@ -221,7 +197,7 @@
|
|||||||
{
|
{
|
||||||
world.setBlockWithNotify(i, j, k, 0);
|
world.setBlockWithNotify(i, j, k, 0);
|
||||||
return;
|
return;
|
||||||
@@ -268,7 +307,7 @@
|
@@ -268,7 +276,7 @@
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -230,7 +206,7 @@
|
|||||||
{
|
{
|
||||||
world.setBlockWithNotify(i, j, k, 0);
|
world.setBlockWithNotify(i, j, k, 0);
|
||||||
return;
|
return;
|
||||||
@@ -285,7 +324,7 @@
|
@@ -285,7 +293,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);
|
||||||
}
|
}
|
||||||
@@ -239,7 +215,7 @@
|
|||||||
{
|
{
|
||||||
for(int l = 0; l < 3; l++)
|
for(int l = 0; l < 3; l++)
|
||||||
{
|
{
|
||||||
@@ -297,7 +336,7 @@
|
@@ -297,7 +305,7 @@
|
||||||
|
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
@@ -248,7 +224,7 @@
|
|||||||
{
|
{
|
||||||
for(int i1 = 0; i1 < 2; i1++)
|
for(int i1 = 0; i1 < 2; i1++)
|
||||||
{
|
{
|
||||||
@@ -308,7 +347,7 @@
|
@@ -308,7 +316,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -257,7 +233,7 @@
|
|||||||
{
|
{
|
||||||
for(int j1 = 0; j1 < 2; j1++)
|
for(int j1 = 0; j1 < 2; j1++)
|
||||||
{
|
{
|
||||||
@@ -319,7 +358,7 @@
|
@@ -319,7 +327,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -266,7 +242,7 @@
|
|||||||
{
|
{
|
||||||
for(int k1 = 0; k1 < 2; k1++)
|
for(int k1 = 0; k1 < 2; k1++)
|
||||||
{
|
{
|
||||||
@@ -330,7 +369,7 @@
|
@@ -330,7 +338,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -275,7 +251,7 @@
|
|||||||
{
|
{
|
||||||
for(int l1 = 0; l1 < 2; l1++)
|
for(int l1 = 0; l1 < 2; l1++)
|
||||||
{
|
{
|
||||||
@@ -341,7 +380,7 @@
|
@@ -341,7 +349,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 getFireSpreadSpeed(World world, int x, int y, int z, int metadata, int face)
|
+ public int chanceToEncourageFire(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
|
||||||
+ */
|
+ */
|
||||||
+ public static void setBurnProperties(int id, int encouragement, int flammability)
|
+ protected static void setBurnRate(int id, int encouragement, int flammability)
|
||||||
+ {
|
+ {
|
||||||
+ blockFireSpreadSpeed[id] = encouragement;
|
+ blockFireSpreadSpeed[id] = encouragement;
|
||||||
+ blockFlammability[id] = flammability;
|
+ blockFlammability[id] = flammability;
|
||||||
|
|||||||
@@ -20,21 +20,20 @@
|
|||||||
setTickOnLoad(true);
|
setTickOnLoad(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -38,11 +38,10 @@
|
@@ -39,12 +39,6 @@
|
||||||
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)
|
||||||
{
|
{
|
||||||
@@ -49,7 +48,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 +96,23 @@
|
@@ -99,23 +91,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))
|
||||||
{
|
{
|
||||||
@@ -81,24 +80,14 @@
|
|||||||
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++)
|
||||||
@@ -154,10 +151,24 @@
|
@@ -155,9 +147,14 @@
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
-
|
|
||||||
+
|
- 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)
|
||||||
@@ -108,7 +97,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 +193,27 @@
|
@@ -182,27 +179,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)
|
||||||
{
|
{
|
||||||
@@ -142,7 +131,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 +224,12 @@
|
@@ -213,12 +210,12 @@
|
||||||
return 0;
|
return 0;
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
@@ -161,24 +150,19 @@
|
|||||||
return l;
|
return l;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -227,15 +238,43 @@
|
@@ -228,14 +225,24 @@
|
||||||
{
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
-
|
|
||||||
+
|
|
||||||
+ /*
|
|
||||||
+ * 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)
|
|
||||||
{
|
|
||||||
- return chanceToEncourageFire[iblockaccess.getBlockId(i, j, k)] > 0;
|
|
||||||
+ return canBlockCatchFire(iblockaccess, i, j, k, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
- 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)
|
+ public boolean canBlockCatchFire(IBlockAccess world, int i, int j, int k, int face)
|
||||||
+ {
|
{
|
||||||
|
- int i1 = chanceToEncourageFire[world.getBlockId(i, j, k)];
|
||||||
+ Block block = Block.blocksList[world.getBlockId(i, j, k)];
|
+ Block block = Block.blocksList[world.getBlockId(i, j, k)];
|
||||||
+ if (block != null)
|
+ if (block != null)
|
||||||
+ {
|
+ {
|
||||||
@@ -187,28 +171,18 @@
|
|||||||
+ 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.getFireSpreadSpeed(world, i, j, k, world.getBlockMetadata(i, j, k), face);
|
+ i1 = block.chanceToEncourageFire(world, i, j, k, world.getBlockMetadata(i, j, k), face);
|
||||||
+ }
|
+ }
|
||||||
if(i1 > l)
|
if(i1 > l)
|
||||||
{
|
{
|
||||||
return i1;
|
return i1;
|
||||||
@@ -247,12 +286,12 @@
|
@@ -247,12 +254,12 @@
|
||||||
|
|
||||||
public boolean canPlaceBlockAt(World world, int i, int j, int k)
|
public boolean canPlaceBlockAt(World world, int i, int j, int k)
|
||||||
{
|
{
|
||||||
@@ -223,7 +197,7 @@
|
|||||||
{
|
{
|
||||||
world.setBlockWithNotify(i, j, k, 0);
|
world.setBlockWithNotify(i, j, k, 0);
|
||||||
return;
|
return;
|
||||||
@@ -268,7 +307,7 @@
|
@@ -268,7 +275,7 @@
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -8,6 +8,6 @@ set PATH=E:\cygwin\bin;%PATH%
|
|||||||
|
|
||||||
cd forge
|
cd forge
|
||||||
|
|
||||||
sh package.sh 1.2.4
|
sh package.sh 1.2.2
|
||||||
|
|
||||||
pause
|
pause
|
||||||
Reference in new issue
Block a user