mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-14 17:14:44 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
13af66b1ab |
No files matched your search
+9
-7
@@ -1,16 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
cd ..
|
||||
pushd ..
|
||||
|
||||
rm -rf src bin src_forge
|
||||
rm -rf src
|
||||
cp -a src_work src
|
||||
rm -rf bin
|
||||
|
||||
cp -a src_work src_forge
|
||||
popd
|
||||
|
||||
cp -a forge/forge_client/src/net/* src_forge/minecraft/net/
|
||||
cp -a forge/forge_common/net/* src_forge/minecraft/net/
|
||||
cp -a forge/forge_common/net/* src_forge/minecraft_server/net/
|
||||
cp -a forge_client/src/net/* ../src/minecraft/net/
|
||||
cp -a forge_common/net/* ../src/minecraft/net/
|
||||
cp -a forge_common/net/* ../src/minecraft_server/net/
|
||||
|
||||
cp -a src_forge src
|
||||
pushd ..
|
||||
|
||||
./recompile.sh
|
||||
|
||||
|
||||
@@ -1,131 +0,0 @@
|
||||
/**
|
||||
* This software is provided under the terms of the Minecraft Forge Public
|
||||
* License v1.0.
|
||||
*/
|
||||
|
||||
package net.minecraft.src.forge;
|
||||
|
||||
import net.minecraft.src.Block;
|
||||
import net.minecraft.src.ModLoader;
|
||||
import net.minecraft.src.RenderBlocks;
|
||||
import net.minecraft.src.Tessellator;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
public class ForgeHooksClient {
|
||||
public static boolean canRenderInPass(Block block, int pass) {
|
||||
if(block instanceof IMultipassRender) {
|
||||
IMultipassRender impr = (IMultipassRender) block;
|
||||
return impr.canRenderInPass(pass);
|
||||
}
|
||||
if(pass==block.getRenderBlockPass()) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
static HashMap tessellators=new HashMap();
|
||||
static HashMap textures=new HashMap();
|
||||
static boolean inWorld=false;
|
||||
static HashSet renderTextureTest=new HashSet();
|
||||
static ArrayList<List> renderTextureList=new ArrayList();
|
||||
|
||||
protected static void bindTessellator(int tex, int sub) {
|
||||
List key=Arrays.asList(tex,sub);
|
||||
Tessellator t;
|
||||
if(!tessellators.containsKey(key)) {
|
||||
t=new Tessellator();
|
||||
tessellators.put(key,t);
|
||||
} else {
|
||||
t=(Tessellator)tessellators.get(key);
|
||||
}
|
||||
if(inWorld && !renderTextureTest.contains(key)) {
|
||||
renderTextureTest.add(key);
|
||||
renderTextureList.add(key);
|
||||
t.startDrawingQuads();
|
||||
t.setTranslationD(Tessellator.firstInstance.xOffset,
|
||||
Tessellator.firstInstance.yOffset,
|
||||
Tessellator.firstInstance.zOffset);
|
||||
}
|
||||
Tessellator.instance=t;
|
||||
}
|
||||
|
||||
protected static void bindTexture(String name, int sub) {
|
||||
int n;
|
||||
if(!textures.containsKey(name)) {
|
||||
n=ModLoader.getMinecraftInstance().renderEngine
|
||||
.getTexture(name);
|
||||
textures.put(name,n);
|
||||
} else {
|
||||
n=(Integer)textures.get(name);
|
||||
}
|
||||
if(!inWorld) {
|
||||
Tessellator.instance=Tessellator.firstInstance;
|
||||
GL11.glBindTexture(3553 /* GL_TEXTURE_2D */,n);
|
||||
return;
|
||||
}
|
||||
bindTessellator(n,sub);
|
||||
}
|
||||
|
||||
protected static void unbindTexture() {
|
||||
Tessellator.instance=Tessellator.firstInstance;
|
||||
if(!inWorld) {
|
||||
GL11.glBindTexture(3553 /* GL_TEXTURE_2D */, ModLoader
|
||||
.getMinecraftInstance().renderEngine
|
||||
.getTexture("/terrain.png"));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
public static void beforeRenderPass(int pass) {
|
||||
Tessellator.instance=Tessellator.firstInstance;
|
||||
GL11.glBindTexture(3553 /* GL_TEXTURE_2D */, ModLoader
|
||||
.getMinecraftInstance().renderEngine
|
||||
.getTexture("/terrain.png"));
|
||||
renderTextureTest.clear();
|
||||
renderTextureList.clear();
|
||||
inWorld=true;
|
||||
}
|
||||
|
||||
public static void afterRenderPass(int pass) {
|
||||
inWorld=false;
|
||||
for(List l : renderTextureList) {
|
||||
// TODO: call appropriate client hooks
|
||||
Integer[] tn=(Integer[])l.toArray();
|
||||
GL11.glBindTexture(GL11.GL_TEXTURE_2D,tn[0]);
|
||||
Tessellator t=(Tessellator)tessellators.get(l);
|
||||
t.draw();
|
||||
}
|
||||
GL11.glBindTexture(3553 /* GL_TEXTURE_2D */, ModLoader
|
||||
.getMinecraftInstance().renderEngine
|
||||
.getTexture("/terrain.png"));
|
||||
Tessellator.instance=Tessellator.firstInstance;
|
||||
}
|
||||
|
||||
public static void beforeBlockRender(Block block,
|
||||
RenderBlocks renderblocks) {
|
||||
if (block instanceof ITextureProvider
|
||||
&& renderblocks.overrideBlockTexture == -1) {
|
||||
ITextureProvider itp=(ITextureProvider)block;
|
||||
bindTexture(itp.getTextureFile(),0);
|
||||
}
|
||||
}
|
||||
|
||||
public static void afterBlockRender(Block block,
|
||||
RenderBlocks renderblocks) {
|
||||
if (block instanceof ITextureProvider
|
||||
&& renderblocks.overrideBlockTexture == -1) {
|
||||
Tessellator.instance=Tessellator.firstInstance;
|
||||
}
|
||||
}
|
||||
|
||||
public static void overrideTexture (Object o) {
|
||||
if (o instanceof ITextureProvider) {
|
||||
GL11.glBindTexture(3553 /* GL_TEXTURE_2D */, ModLoader
|
||||
.getMinecraftInstance().renderEngine
|
||||
.getTexture(((ITextureProvider) (o))
|
||||
.getTextureFile()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,20 +12,41 @@ import net.minecraft.src.Tessellator;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class MinecraftForgeClient {
|
||||
public static void bindTexture(String name, int sub) {
|
||||
ForgeHooksClient.bindTexture(name,sub);
|
||||
}
|
||||
|
||||
public static void beforeBlockRender(Block block, RenderBlocks renderblocks) {
|
||||
if (block instanceof ITextureProvider
|
||||
&& renderblocks.overrideBlockTexture == -1) {
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
tessellator.draw();
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(0.0F, -1F, 0.0F);
|
||||
|
||||
public static void bindTexture(String name) {
|
||||
ForgeHooksClient.bindTexture(name,0);
|
||||
}
|
||||
GL11.glBindTexture(3553 /* GL_TEXTURE_2D */, ModLoader
|
||||
.getMinecraftInstance().renderEngine
|
||||
.getTexture(((ITextureProvider) (block)).getTextureFile()));
|
||||
|
||||
public static void unbindTexture() {
|
||||
ForgeHooksClient.unbindTexture();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void afterBlockRender(Block block, RenderBlocks renderblocks) {
|
||||
if (block instanceof ITextureProvider
|
||||
&& renderblocks.overrideBlockTexture == -1) {
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
tessellator.draw();
|
||||
tessellator.startDrawingQuads();
|
||||
|
||||
public static void preloadTexture(String texture) {
|
||||
ModLoader.getMinecraftInstance().renderEngine
|
||||
.getTexture(texture);
|
||||
}
|
||||
GL11.glBindTexture(3553 /* GL_TEXTURE_2D */, ModLoader
|
||||
.getMinecraftInstance().renderEngine
|
||||
.getTexture("/terrain.png"));
|
||||
}
|
||||
}
|
||||
|
||||
public static void overrideTexture (Object o) {
|
||||
if (o instanceof ITextureProvider) {
|
||||
GL11.glBindTexture(3553 /* GL_TEXTURE_2D */, ModLoader
|
||||
.getMinecraftInstance().renderEngine
|
||||
.getTexture(((ITextureProvider) (o))
|
||||
.getTextureFile()));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
/**
|
||||
* This software is provided under the terms of the Minecraft Forge Public
|
||||
* License v1.0.
|
||||
*/
|
||||
|
||||
package net.minecraft.src.forge;
|
||||
|
||||
import net.minecraft.src.EntityPlayer;
|
||||
import net.minecraft.src.World;
|
||||
|
||||
/**
|
||||
* This interface provides access to a number of secondary block properties through providing
|
||||
* overrides to methods within world.class.
|
||||
*/
|
||||
|
||||
public interface IBlockSecondaryProperties
|
||||
{
|
||||
/**
|
||||
* Return true if this block should be treated as a normal cube by game logic
|
||||
* (this is independant of rendering), false otherwise. This allows for things like secondary
|
||||
* blocks (torches, rails, redstone dust, etc.) being attached to the surface of
|
||||
* the block regardless of whether it is opaque, or posesses other rendering properties that
|
||||
* would not normally make this possible.
|
||||
*/
|
||||
public boolean isBlockNormalCube( World world, int i, int j, int k );
|
||||
|
||||
/**
|
||||
* Return true if this block can be replaced by another by the player, false otherwise. This provides
|
||||
* a means of allowing blocks to not be considered when the player attempts to place another within
|
||||
* their bounds, in the same way that water, lava, fire, and some other blocks behave within the game.
|
||||
* Provides an override to the coresponding section in canBlockBePlacedAt() in world.class
|
||||
*/
|
||||
public boolean isBlockReplaceable( World world, int i, int j, int k );
|
||||
|
||||
/**
|
||||
* Return true if this block should set fire and deal fire damage to entities coming into contact with
|
||||
* it, false otherwise. Provides an override to the related test within isBoundingBoxBurning() within
|
||||
* world.class
|
||||
*/
|
||||
public boolean isBlockBurning( World world, int i, int j, int k );
|
||||
|
||||
/**
|
||||
* Return true if this block should be treated as an air block by the rest of the code, false
|
||||
* otherwise. This method is primarily useful for creating pure logic-blocks that will be invisible
|
||||
* to the player and otherwise interact as air would.
|
||||
* Provides an override to isAirBlock() within world.class
|
||||
*/
|
||||
public boolean isAirBlock( World world, int i, int j, int k );
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
*** HOW TO INSTALL ***
|
||||
|
||||
The forge directory should have been uncompacted right under your MCP root
|
||||
directory.
|
||||
|
||||
You should a a fresh minecraft and minecraft_server.jar freshly decompiled
|
||||
with ModLoader and ModLoaderMP.
|
||||
|
||||
Just run the script install.bat. It will copy the Minecraft Forge source on your
|
||||
src directory, and modify the Minecraft source files.
|
||||
@@ -1,8 +0,0 @@
|
||||
set HOME=%CD%
|
||||
set MCP=%HOME%\..
|
||||
xcopy /Y /E src\* ..\src
|
||||
|
||||
cd %MCP%\src
|
||||
%MCP%\runtime\bin\python\python_mcp %HOME%\lfcr.py %HOME%\minecraft.patch %HOME%\minecraft-win.patch
|
||||
%MCP%\runtime\bin\applydiff.exe -uf -p2 < %HOME%\minecraft-win.patch
|
||||
pause
|
||||
@@ -1,8 +0,0 @@
|
||||
#! /usr/bin/env python
|
||||
|
||||
import sys, re, os
|
||||
data = open(sys.argv[1], "rb").read()
|
||||
newdata = re.sub("\r?\n", "\r\n", data)
|
||||
f = open(sys.argv[2], "wb")
|
||||
f.write(newdata)
|
||||
f.close()
|
||||
+76
-508
@@ -1,6 +1,6 @@
|
||||
diff -u -r --strip-trailing-cr ../src_base/minecraft/net/minecraft/src/BlockRedstoneWire.java ../src_work/minecraft/net/minecraft/src/BlockRedstoneWire.java
|
||||
--- ../src_base/minecraft/net/minecraft/src/BlockRedstoneWire.java 2011-08-04 20:51:16.000000000 -0400
|
||||
+++ ../src_work/minecraft/net/minecraft/src/BlockRedstoneWire.java 2011-08-05 07:07:18.000000000 -0400
|
||||
--- ../src_base/minecraft/net/minecraft/src/BlockRedstoneWire.java 2011-07-29 16:35:27.000000000 -0400
|
||||
+++ ../src_work/minecraft/net/minecraft/src/BlockRedstoneWire.java 2011-07-31 21:44:50.000000000 -0400
|
||||
@@ -3,6 +3,7 @@
|
||||
// Decompiler options: packimports(3) braces deadcode
|
||||
|
||||
@@ -21,8 +21,8 @@ diff -u -r --strip-trailing-cr ../src_base/minecraft/net/minecraft/src/BlockReds
|
||||
{
|
||||
return true;
|
||||
diff -u -r --strip-trailing-cr ../src_base/minecraft/net/minecraft/src/Chunk.java ../src_work/minecraft/net/minecraft/src/Chunk.java
|
||||
--- ../src_base/minecraft/net/minecraft/src/Chunk.java 2011-08-04 20:51:16.000000000 -0400
|
||||
+++ ../src_work/minecraft/net/minecraft/src/Chunk.java 2011-08-05 07:07:18.000000000 -0400
|
||||
--- ../src_base/minecraft/net/minecraft/src/Chunk.java 2011-07-29 16:35:26.000000000 -0400
|
||||
+++ ../src_work/minecraft/net/minecraft/src/Chunk.java 2011-07-31 21:44:50.000000000 -0400
|
||||
@@ -3,6 +3,7 @@
|
||||
// Decompiler options: packimports(3) braces deadcode
|
||||
|
||||
@@ -60,8 +60,8 @@ diff -u -r --strip-trailing-cr ../src_base/minecraft/net/minecraft/src/Chunk.jav
|
||||
if(j1 != 0)
|
||||
{
|
||||
diff -u -r --strip-trailing-cr ../src_base/minecraft/net/minecraft/src/EffectRenderer.java ../src_work/minecraft/net/minecraft/src/EffectRenderer.java
|
||||
--- ../src_base/minecraft/net/minecraft/src/EffectRenderer.java 2011-08-04 20:51:16.000000000 -0400
|
||||
+++ ../src_work/minecraft/net/minecraft/src/EffectRenderer.java 2011-08-05 07:07:18.000000000 -0400
|
||||
--- ../src_base/minecraft/net/minecraft/src/EffectRenderer.java 2011-07-29 16:35:27.000000000 -0400
|
||||
+++ ../src_work/minecraft/net/minecraft/src/EffectRenderer.java 2011-07-31 21:44:50.000000000 -0400
|
||||
@@ -7,6 +7,9 @@
|
||||
import java.util.*;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
@@ -205,8 +205,8 @@ diff -u -r --strip-trailing-cr ../src_base/minecraft/net/minecraft/src/EffectRen
|
||||
private Random rand;
|
||||
}
|
||||
diff -u -r --strip-trailing-cr ../src_base/minecraft/net/minecraft/src/EntityPlayer.java ../src_work/minecraft/net/minecraft/src/EntityPlayer.java
|
||||
--- ../src_base/minecraft/net/minecraft/src/EntityPlayer.java 2011-08-04 20:51:17.000000000 -0400
|
||||
+++ ../src_work/minecraft/net/minecraft/src/EntityPlayer.java 2011-08-05 07:07:18.000000000 -0400
|
||||
--- ../src_base/minecraft/net/minecraft/src/EntityPlayer.java 2011-07-29 16:35:27.000000000 -0400
|
||||
+++ ../src_work/minecraft/net/minecraft/src/EntityPlayer.java 2011-07-31 21:44:50.000000000 -0400
|
||||
@@ -6,6 +6,8 @@
|
||||
|
||||
import java.util.*;
|
||||
@@ -239,8 +239,8 @@ diff -u -r --strip-trailing-cr ../src_base/minecraft/net/minecraft/src/EntityPla
|
||||
int k = i * j + damageRemainder;
|
||||
inventory.damageArmor(i);
|
||||
diff -u -r --strip-trailing-cr ../src_base/minecraft/net/minecraft/src/Explosion.java ../src_work/minecraft/net/minecraft/src/Explosion.java
|
||||
--- ../src_base/minecraft/net/minecraft/src/Explosion.java 2011-08-04 20:51:16.000000000 -0400
|
||||
+++ ../src_work/minecraft/net/minecraft/src/Explosion.java 2011-08-05 07:07:18.000000000 -0400
|
||||
--- ../src_base/minecraft/net/minecraft/src/Explosion.java 2011-07-29 16:35:27.000000000 -0400
|
||||
+++ ../src_work/minecraft/net/minecraft/src/Explosion.java 2011-07-31 21:44:50.000000000 -0400
|
||||
@@ -3,6 +3,7 @@
|
||||
// Decompiler options: packimports(3) braces deadcode
|
||||
|
||||
@@ -269,8 +269,8 @@ diff -u -r --strip-trailing-cr ../src_base/minecraft/net/minecraft/src/Explosion
|
||||
if(f1 > 0.0F)
|
||||
{
|
||||
diff -u -r --strip-trailing-cr ../src_base/minecraft/net/minecraft/src/ItemBucket.java ../src_work/minecraft/net/minecraft/src/ItemBucket.java
|
||||
--- ../src_base/minecraft/net/minecraft/src/ItemBucket.java 2011-08-04 20:51:17.000000000 -0400
|
||||
+++ ../src_work/minecraft/net/minecraft/src/ItemBucket.java 2011-08-05 07:07:18.000000000 -0400
|
||||
--- ../src_base/minecraft/net/minecraft/src/ItemBucket.java 2011-07-29 16:35:27.000000000 -0400
|
||||
+++ ../src_work/minecraft/net/minecraft/src/ItemBucket.java 2011-07-31 21:44:50.000000000 -0400
|
||||
@@ -6,6 +6,8 @@
|
||||
|
||||
import java.util.Random;
|
||||
@@ -295,8 +295,8 @@ diff -u -r --strip-trailing-cr ../src_base/minecraft/net/minecraft/src/ItemBucke
|
||||
{
|
||||
world.setBlockWithNotify(i, j, k, 0);
|
||||
diff -u -r --strip-trailing-cr ../src_base/minecraft/net/minecraft/src/ItemPickaxe.java ../src_work/minecraft/net/minecraft/src/ItemPickaxe.java
|
||||
--- ../src_base/minecraft/net/minecraft/src/ItemPickaxe.java 2011-08-04 20:51:16.000000000 -0400
|
||||
+++ ../src_work/minecraft/net/minecraft/src/ItemPickaxe.java 2011-08-05 07:07:18.000000000 -0400
|
||||
--- ../src_base/minecraft/net/minecraft/src/ItemPickaxe.java 2011-07-29 16:35:26.000000000 -0400
|
||||
+++ ../src_work/minecraft/net/minecraft/src/ItemPickaxe.java 2011-07-31 21:44:50.000000000 -0400
|
||||
@@ -4,6 +4,8 @@
|
||||
|
||||
package net.minecraft.src;
|
||||
@@ -317,13 +317,13 @@ diff -u -r --strip-trailing-cr ../src_base/minecraft/net/minecraft/src/ItemPicka
|
||||
{
|
||||
return true;
|
||||
diff -u -r --strip-trailing-cr ../src_base/minecraft/net/minecraft/src/ItemRenderer.java ../src_work/minecraft/net/minecraft/src/ItemRenderer.java
|
||||
--- ../src_base/minecraft/net/minecraft/src/ItemRenderer.java 2011-08-04 20:51:16.000000000 -0400
|
||||
+++ ../src_work/minecraft/net/minecraft/src/ItemRenderer.java 2011-08-05 07:07:18.000000000 -0400
|
||||
--- ../src_base/minecraft/net/minecraft/src/ItemRenderer.java 2011-07-29 16:35:27.000000000 -0400
|
||||
+++ ../src_work/minecraft/net/minecraft/src/ItemRenderer.java 2011-07-31 21:44:50.000000000 -0400
|
||||
@@ -5,6 +5,8 @@
|
||||
package net.minecraft.src;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
+import net.minecraft.src.forge.ForgeHooksClient;
|
||||
+import net.minecraft.src.forge.MinecraftForgeClient;
|
||||
+
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@@ -332,24 +332,24 @@ diff -u -r --strip-trailing-cr ../src_base/minecraft/net/minecraft/src/ItemRende
|
||||
if(itemstack.itemID < 256 && RenderBlocks.renderItemIn3d(Block.blocksList[itemstack.itemID].getRenderType()))
|
||||
{
|
||||
GL11.glBindTexture(3553 /*GL_TEXTURE_2D*/, mc.renderEngine.getTexture("/terrain.png"));
|
||||
+ ForgeHooksClient.overrideTexture (Block.blocksList[itemstack.itemID]);
|
||||
+ MinecraftForgeClient.overrideTexture (Block.blocksList[itemstack.itemID]);
|
||||
renderBlocksInstance.renderBlockOnInventory(Block.blocksList[itemstack.itemID], itemstack.getItemDamage(), entityliving.getEntityBrightness(1.0F));
|
||||
} else
|
||||
{
|
||||
if(itemstack.itemID < 256)
|
||||
{
|
||||
GL11.glBindTexture(3553 /*GL_TEXTURE_2D*/, mc.renderEngine.getTexture("/terrain.png"));
|
||||
+ ForgeHooksClient.overrideTexture (Block.blocksList[itemstack.itemID]);
|
||||
+ MinecraftForgeClient.overrideTexture (Block.blocksList[itemstack.itemID]);
|
||||
} else
|
||||
{
|
||||
GL11.glBindTexture(3553 /*GL_TEXTURE_2D*/, mc.renderEngine.getTexture("/gui/items.png"));
|
||||
+ ForgeHooksClient.overrideTexture (Item.itemsList[itemstack.itemID]);
|
||||
+ MinecraftForgeClient.overrideTexture (Item.itemsList[itemstack.itemID]);
|
||||
}
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
int i = entityliving.getItemIcon(itemstack);
|
||||
diff -u -r --strip-trailing-cr ../src_base/minecraft/net/minecraft/src/ItemTool.java ../src_work/minecraft/net/minecraft/src/ItemTool.java
|
||||
--- ../src_base/minecraft/net/minecraft/src/ItemTool.java 2011-08-04 20:51:16.000000000 -0400
|
||||
+++ ../src_work/minecraft/net/minecraft/src/ItemTool.java 2011-08-05 07:07:18.000000000 -0400
|
||||
--- ../src_base/minecraft/net/minecraft/src/ItemTool.java 2011-07-29 16:35:27.000000000 -0400
|
||||
+++ ../src_work/minecraft/net/minecraft/src/ItemTool.java 2011-07-31 21:49:24.000000000 -0400
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
package net.minecraft.src;
|
||||
@@ -370,20 +370,9 @@ diff -u -r --strip-trailing-cr ../src_base/minecraft/net/minecraft/src/ItemTool.
|
||||
+ blocksEffectiveAgainst [blocksEffectiveAgainst.length-1] = block;
|
||||
+ }
|
||||
}
|
||||
diff -u -r --strip-trailing-cr ../src_base/minecraft/net/minecraft/src/MovingObjectPosition.java ../src_work/minecraft/net/minecraft/src/MovingObjectPosition.java
|
||||
--- ../src_base/minecraft/net/minecraft/src/MovingObjectPosition.java 2011-08-04 20:51:17.000000000 -0400
|
||||
+++ ../src_work/minecraft/net/minecraft/src/MovingObjectPosition.java 2011-08-06 14:29:35.000000000 -0400
|
||||
@@ -35,4 +35,7 @@
|
||||
public int sideHit;
|
||||
public Vec3D hitVec;
|
||||
public Entity entityHit;
|
||||
+
|
||||
+ // Added for RedPower subblocks.
|
||||
+ public int subHit=0;
|
||||
}
|
||||
diff -u -r --strip-trailing-cr ../src_base/minecraft/net/minecraft/src/PlayerController.java ../src_work/minecraft/net/minecraft/src/PlayerController.java
|
||||
--- ../src_base/minecraft/net/minecraft/src/PlayerController.java 2011-08-04 20:51:16.000000000 -0400
|
||||
+++ ../src_work/minecraft/net/minecraft/src/PlayerController.java 2011-08-05 07:07:18.000000000 -0400
|
||||
--- ../src_base/minecraft/net/minecraft/src/PlayerController.java 2011-07-29 16:35:27.000000000 -0400
|
||||
+++ ../src_work/minecraft/net/minecraft/src/PlayerController.java 2011-07-31 21:44:50.000000000 -0400
|
||||
@@ -3,6 +3,7 @@
|
||||
// Decompiler options: packimports(3) braces deadcode
|
||||
|
||||
@@ -406,14 +395,14 @@ diff -u -r --strip-trailing-cr ../src_base/minecraft/net/minecraft/src/PlayerCon
|
||||
if(i1 > 0 && Block.blocksList[i1].blockActivated(world, i, j, k, entityplayer))
|
||||
{
|
||||
diff -u -r --strip-trailing-cr ../src_base/minecraft/net/minecraft/src/RenderItem.java ../src_work/minecraft/net/minecraft/src/RenderItem.java
|
||||
--- ../src_base/minecraft/net/minecraft/src/RenderItem.java 2011-08-04 20:51:16.000000000 -0400
|
||||
+++ ../src_work/minecraft/net/minecraft/src/RenderItem.java 2011-08-05 07:07:18.000000000 -0400
|
||||
--- ../src_base/minecraft/net/minecraft/src/RenderItem.java 2011-07-29 16:35:27.000000000 -0400
|
||||
+++ ../src_work/minecraft/net/minecraft/src/RenderItem.java 2011-07-31 21:44:50.000000000 -0400
|
||||
@@ -5,6 +5,9 @@
|
||||
package net.minecraft.src;
|
||||
|
||||
import java.util.Random;
|
||||
+
|
||||
+import net.minecraft.src.forge.ForgeHooksClient;
|
||||
+import net.minecraft.src.forge.MinecraftForgeClient;
|
||||
+
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@@ -422,7 +411,7 @@ diff -u -r --strip-trailing-cr ../src_base/minecraft/net/minecraft/src/RenderIte
|
||||
{
|
||||
GL11.glRotatef(f3, 0.0F, 1.0F, 0.0F);
|
||||
loadTexture("/terrain.png");
|
||||
+ ForgeHooksClient.overrideTexture(Block.blocksList[itemstack.itemID]);
|
||||
+ MinecraftForgeClient.overrideTexture(Block.blocksList[itemstack.itemID]);
|
||||
float f4 = 0.25F;
|
||||
if(!Block.blocksList[itemstack.itemID].renderAsNormalBlock() && itemstack.itemID != Block.stairSingle.blockID && Block.blocksList[itemstack.itemID].getRenderType() != 16)
|
||||
{
|
||||
@@ -430,12 +419,12 @@ diff -u -r --strip-trailing-cr ../src_base/minecraft/net/minecraft/src/RenderIte
|
||||
if(itemstack.itemID < 256)
|
||||
{
|
||||
loadTexture("/terrain.png");
|
||||
+ ForgeHooksClient.overrideTexture(Block.blocksList[itemstack.itemID]);
|
||||
+ MinecraftForgeClient.overrideTexture(Block.blocksList[itemstack.itemID]);
|
||||
} else
|
||||
{
|
||||
loadTexture("/gui/items.png");
|
||||
- }
|
||||
+ ForgeHooksClient.overrideTexture(Item.itemsList[itemstack.itemID]);
|
||||
+ MinecraftForgeClient.overrideTexture(Item.itemsList[itemstack.itemID]);
|
||||
+ }
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
float f6 = (float)((i % 16) * 16 + 0) / 256F;
|
||||
@@ -452,7 +441,7 @@ diff -u -r --strip-trailing-cr ../src_base/minecraft/net/minecraft/src/RenderIte
|
||||
{
|
||||
int j1 = i;
|
||||
renderengine.bindTexture(renderengine.getTexture("/terrain.png"));
|
||||
+ ForgeHooksClient.overrideTexture (Block.blocksList[i]);
|
||||
+ MinecraftForgeClient.overrideTexture (Block.blocksList[i]);
|
||||
Block block = Block.blocksList[j1];
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(l - 2, i1 + 3, -3F);
|
||||
@@ -460,294 +449,17 @@ diff -u -r --strip-trailing-cr ../src_base/minecraft/net/minecraft/src/RenderIte
|
||||
if(i < 256)
|
||||
{
|
||||
renderengine.bindTexture(renderengine.getTexture("/terrain.png"));
|
||||
+ ForgeHooksClient.overrideTexture (Block.blocksList[i]);
|
||||
+ MinecraftForgeClient.overrideTexture (Block.blocksList[i]);
|
||||
} else
|
||||
{
|
||||
renderengine.bindTexture(renderengine.getTexture("/gui/items.png"));
|
||||
+ ForgeHooksClient.overrideTexture(Item.itemsList[i]);
|
||||
+ MinecraftForgeClient.overrideTexture(Item.itemsList[i]);
|
||||
}
|
||||
int k1 = Item.itemsList[i].getColorFromDamage(j);
|
||||
float f = (float)(k1 >> 16 & 0xff) / 255F;
|
||||
diff -u -r --strip-trailing-cr ../src_base/minecraft/net/minecraft/src/Tessellator.java ../src_work/minecraft/net/minecraft/src/Tessellator.java
|
||||
--- ../src_base/minecraft/net/minecraft/src/Tessellator.java 2011-08-04 20:51:16.000000000 -0400
|
||||
+++ ../src_work/minecraft/net/minecraft/src/Tessellator.java 2011-08-05 07:07:18.000000000 -0400
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
import java.io.PrintStream;
|
||||
import java.nio.*;
|
||||
+import java.util.*;
|
||||
import org.lwjgl.opengl.*;
|
||||
|
||||
// Referenced classes of package net.minecraft.src:
|
||||
@@ -14,8 +15,11 @@
|
||||
public class Tessellator
|
||||
{
|
||||
|
||||
- private Tessellator(int i)
|
||||
- {
|
||||
+ public int instanceNo;
|
||||
+ static int instanceTotal=0;
|
||||
+
|
||||
+ public Tessellator() {
|
||||
+ instanceNo=instanceTotal++;
|
||||
vertexCount = 0;
|
||||
hasColor = false;
|
||||
hasTexture = false;
|
||||
@@ -24,20 +28,10 @@
|
||||
addedVertices = 0;
|
||||
isColorDisabled = false;
|
||||
isDrawing = false;
|
||||
- useVBO = false;
|
||||
vboIndex = 0;
|
||||
- vboCount = 10;
|
||||
- bufferSize = i;
|
||||
- byteBuffer = GLAllocation.createDirectByteBuffer(i * 4);
|
||||
- intBuffer = byteBuffer.asIntBuffer();
|
||||
- floatBuffer = byteBuffer.asFloatBuffer();
|
||||
- rawBuffer = new int[i];
|
||||
- useVBO = tryVBO && GLContext.getCapabilities().GL_ARB_vertex_buffer_object;
|
||||
- if(useVBO)
|
||||
- {
|
||||
- vertexBuffers = GLAllocation.createDirectIntBuffer(vboCount);
|
||||
- ARBVertexBufferObject.glGenBuffersARB(vertexBuffers);
|
||||
- }
|
||||
+
|
||||
+ rawBuffer=null;
|
||||
+ rawBufferSize=0;
|
||||
}
|
||||
|
||||
public void draw()
|
||||
@@ -47,12 +41,20 @@
|
||||
throw new IllegalStateException("Not tesselating!");
|
||||
}
|
||||
isDrawing = false;
|
||||
- if(vertexCount > 0)
|
||||
- {
|
||||
+ int offs=0;
|
||||
+ while(offs < vertexCount) {
|
||||
+ int vtc;
|
||||
+ if(drawMode == 7 && convertQuadsToTriangles) {
|
||||
+ vtc=Math.min(vertexCount-offs,trivertsInBuffer);
|
||||
+ } else {
|
||||
+ vtc=Math.min(vertexCount-offs,nativeBufferSize>>5);
|
||||
+ }
|
||||
+
|
||||
intBuffer.clear();
|
||||
- intBuffer.put(rawBuffer, 0, rawBufferIndex);
|
||||
+ intBuffer.put(rawBuffer, offs*8, vtc*8);
|
||||
byteBuffer.position(0);
|
||||
- byteBuffer.limit(rawBufferIndex * 4);
|
||||
+ byteBuffer.limit(vtc*32);
|
||||
+ offs+=vtc;
|
||||
if(useVBO)
|
||||
{
|
||||
vboIndex = (vboIndex + 1) % vboCount;
|
||||
@@ -106,10 +108,10 @@
|
||||
GL11.glEnableClientState(32884 /*GL_VERTEX_ARRAY_EXT*/);
|
||||
if(drawMode == 7 && convertQuadsToTriangles)
|
||||
{
|
||||
- GL11.glDrawArrays(4, 0, vertexCount);
|
||||
+ GL11.glDrawArrays(4, 0, vtc);
|
||||
} else
|
||||
{
|
||||
- GL11.glDrawArrays(drawMode, 0, vertexCount);
|
||||
+ GL11.glDrawArrays(drawMode, 0, vtc);
|
||||
}
|
||||
GL11.glDisableClientState(32884 /*GL_VERTEX_ARRAY_EXT*/);
|
||||
if(hasTexture)
|
||||
@@ -125,6 +127,10 @@
|
||||
GL11.glDisableClientState(32885 /*GL_NORMAL_ARRAY_EXT*/);
|
||||
}
|
||||
}
|
||||
+ if(rawBufferSize>0x20000 && rawBufferIndex<(rawBufferSize<<3)) {
|
||||
+ rawBufferSize=0;
|
||||
+ rawBuffer=null;
|
||||
+ }
|
||||
reset();
|
||||
}
|
||||
|
||||
@@ -237,6 +243,15 @@
|
||||
|
||||
public void addVertex(double d, double d1, double d2)
|
||||
{
|
||||
+ if(rawBufferIndex >= rawBufferSize-32) {
|
||||
+ if(rawBufferSize==0) {
|
||||
+ rawBufferSize=0x10000;
|
||||
+ rawBuffer=new int[rawBufferSize];
|
||||
+ } else {
|
||||
+ rawBufferSize*=2;
|
||||
+ rawBuffer=Arrays.copyOf(rawBuffer,rawBufferSize);
|
||||
+ }
|
||||
+ }
|
||||
addedVertices++;
|
||||
if(drawMode == 7 && convertQuadsToTriangles && addedVertices % 4 == 0)
|
||||
{
|
||||
@@ -278,11 +293,6 @@
|
||||
rawBuffer[rawBufferIndex + 2] = Float.floatToRawIntBits((float)(d2 + zOffset));
|
||||
rawBufferIndex += 8;
|
||||
vertexCount++;
|
||||
- if(vertexCount % 4 == 0 && rawBufferIndex >= bufferSize - 32)
|
||||
- {
|
||||
- draw();
|
||||
- isDrawing = true;
|
||||
- }
|
||||
}
|
||||
|
||||
public void setColorOpaque_I(int i)
|
||||
@@ -335,9 +345,7 @@
|
||||
|
||||
private static boolean convertQuadsToTriangles = true;
|
||||
private static boolean tryVBO = false;
|
||||
- private ByteBuffer byteBuffer;
|
||||
- private IntBuffer intBuffer;
|
||||
- private FloatBuffer floatBuffer;
|
||||
+ private static boolean useVBO = false;
|
||||
private int rawBuffer[];
|
||||
private int vertexCount;
|
||||
private double textureU;
|
||||
@@ -350,16 +358,40 @@
|
||||
private int addedVertices;
|
||||
private boolean isColorDisabled;
|
||||
private int drawMode;
|
||||
- private double xOffset;
|
||||
- private double yOffset;
|
||||
- private double zOffset;
|
||||
+ public double xOffset;
|
||||
+ public double yOffset;
|
||||
+ public double zOffset;
|
||||
private int normal;
|
||||
- public static final Tessellator instance = new Tessellator(0x200000);
|
||||
private boolean isDrawing;
|
||||
- private boolean useVBO;
|
||||
- private IntBuffer vertexBuffers;
|
||||
private int vboIndex;
|
||||
- private int vboCount;
|
||||
- private int bufferSize;
|
||||
+
|
||||
+ private int rawBufferSize;
|
||||
+ private static int vboCount;
|
||||
+ private static IntBuffer vertexBuffers;
|
||||
+ private static int nativeBufferSize;
|
||||
+ private static int trivertsInBuffer;
|
||||
+ private static ByteBuffer byteBuffer;
|
||||
+ private static IntBuffer intBuffer;
|
||||
+ private static FloatBuffer floatBuffer;
|
||||
+ public static Tessellator instance;
|
||||
+ public static Tessellator firstInstance;
|
||||
+
|
||||
+ static {
|
||||
+ instance=new Tessellator();
|
||||
+ firstInstance=instance;
|
||||
+
|
||||
+ nativeBufferSize = 0x200000;
|
||||
+ trivertsInBuffer = (nativeBufferSize/48)*6;
|
||||
+ byteBuffer = GLAllocation.createDirectByteBuffer(nativeBufferSize * 4);
|
||||
+ intBuffer = byteBuffer.asIntBuffer();
|
||||
+ floatBuffer = byteBuffer.asFloatBuffer();
|
||||
+ useVBO = tryVBO && GLContext.getCapabilities().GL_ARB_vertex_buffer_object;
|
||||
+ vboCount = 10;
|
||||
+ if(useVBO)
|
||||
+ {
|
||||
+ vertexBuffers = GLAllocation.createDirectIntBuffer(vboCount);
|
||||
+ ARBVertexBufferObject.glGenBuffersARB(vertexBuffers);
|
||||
+ }
|
||||
+ }
|
||||
|
||||
}
|
||||
diff -u -r --strip-trailing-cr ../src_base/minecraft/net/minecraft/src/World.java ../src_work/minecraft/net/minecraft/src/World.java
|
||||
--- ../src_base/minecraft/net/minecraft/src/World.java 2011-08-04 20:51:16.000000000 -0400
|
||||
+++ ../src_work/minecraft/net/minecraft/src/World.java 2011-08-05 07:07:18.000000000 -0400
|
||||
@@ -7,6 +7,8 @@
|
||||
import java.io.PrintStream;
|
||||
import java.util.*;
|
||||
|
||||
+import net.minecraft.src.forge.IBlockSecondaryProperties;
|
||||
+
|
||||
// Referenced classes of package net.minecraft.src:
|
||||
// IBlockAccess, WorldProvider, WorldInfo, MapStorage,
|
||||
// ISaveHandler, ChunkProvider, EntityPlayer, ChunkProviderLoadOrGenerate,
|
||||
@@ -313,7 +315,25 @@
|
||||
|
||||
public boolean isAirBlock(int i, int j, int k)
|
||||
{
|
||||
- return getBlockId(i, j, k) == 0;
|
||||
+ int iBlockID = getBlockId( i, j, k );
|
||||
+
|
||||
+ if ( iBlockID == 0 )
|
||||
+ {
|
||||
+ return true;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ Block block = Block.blocksList[iBlockID];
|
||||
+
|
||||
+ if ( block instanceof IBlockSecondaryProperties )
|
||||
+ {
|
||||
+ return ((IBlockSecondaryProperties)block).isAirBlock( this, i, j, k );
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ return false;
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
|
||||
public boolean blockExists(int i, int j, int k)
|
||||
@@ -1608,6 +1628,18 @@
|
||||
{
|
||||
return true;
|
||||
}
|
||||
+ else
|
||||
+ {
|
||||
+ Block block = Block.blocksList[j2];
|
||||
+
|
||||
+ if ( block instanceof IBlockSecondaryProperties )
|
||||
+ {
|
||||
+ if ( ((IBlockSecondaryProperties)block).isBlockBurning( this, k1, i1, i2 ) )
|
||||
+ {
|
||||
+ return true;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1900,7 +1932,14 @@
|
||||
return false;
|
||||
} else
|
||||
{
|
||||
- return block.blockMaterial.getIsTranslucent() && block.renderAsNormalBlock();
|
||||
+ if ( block instanceof IBlockSecondaryProperties )
|
||||
+ {
|
||||
+ return ((IBlockSecondaryProperties)block).isBlockNormalCube( this, i, j, k );
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ return block.blockMaterial.getIsTranslucent() && block.renderAsNormalBlock();
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2425,6 +2464,16 @@
|
||||
{
|
||||
block = null;
|
||||
}
|
||||
+ else
|
||||
+ {
|
||||
+ if ( block instanceof IBlockSecondaryProperties )
|
||||
+ {
|
||||
+ if ( ((IBlockSecondaryProperties)block).isBlockReplaceable( this, j, k, l ) )
|
||||
+ {
|
||||
+ block = null;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
return i > 0 && block == null && block1.canPlaceBlockOnSide(this, j, k, l, i1);
|
||||
}
|
||||
|
||||
diff -u -r --strip-trailing-cr ../src_base/minecraft/net/minecraft/src/WorldRenderer.java ../src_work/minecraft/net/minecraft/src/WorldRenderer.java
|
||||
--- ../src_base/minecraft/net/minecraft/src/WorldRenderer.java 2011-08-04 20:51:17.000000000 -0400
|
||||
+++ ../src_work/minecraft/net/minecraft/src/WorldRenderer.java 2011-08-05 07:07:18.000000000 -0400
|
||||
--- ../src_base/minecraft/net/minecraft/src/WorldRenderer.java 2011-07-29 16:35:27.000000000 -0400
|
||||
+++ ../src_work/minecraft/net/minecraft/src/WorldRenderer.java 2011-07-31 21:44:50.000000000 -0400
|
||||
@@ -3,8 +3,12 @@
|
||||
// Decompiler options: packimports(3) braces deadcode
|
||||
|
||||
@@ -756,85 +468,43 @@ diff -u -r --strip-trailing-cr ../src_base/minecraft/net/minecraft/src/WorldRend
|
||||
|
||||
import java.util.*;
|
||||
+
|
||||
+import net.minecraft.src.forge.ForgeHooksClient;
|
||||
+import net.minecraft.src.forge.MinecraftForgeClient;
|
||||
+
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
// Referenced classes of package net.minecraft.src:
|
||||
@@ -125,8 +129,10 @@
|
||||
GL11.glTranslatef((float)(-sizeDepth) / 2.0F, (float)(-sizeHeight) / 2.0F, (float)(-sizeDepth) / 2.0F);
|
||||
GL11.glScalef(f, f, f);
|
||||
GL11.glTranslatef((float)sizeDepth / 2.0F, (float)sizeHeight / 2.0F, (float)sizeDepth / 2.0F);
|
||||
- tessellator.startDrawingQuads();
|
||||
- tessellator.setTranslationD(-posX, -posY, -posZ);
|
||||
+
|
||||
+ ForgeHooksClient.beforeRenderPass(i2);
|
||||
+ Tessellator.instance.startDrawingQuads();
|
||||
+ Tessellator.instance.setTranslationD(-posX, -posY, -posZ);
|
||||
@@ -138,14 +142,27 @@
|
||||
}
|
||||
if(i2 == 0 && Block.isBlockContainer[i3])
|
||||
{
|
||||
@@ -136,17 +142,17 @@
|
||||
tileEntityRenderers.add(tileentity);
|
||||
}
|
||||
}
|
||||
+
|
||||
Block block = Block.blocksList[i3];
|
||||
int j3 = block.getRenderBlockPass();
|
||||
- if(j3 != i2)
|
||||
- {
|
||||
- flag = true;
|
||||
- continue;
|
||||
- }
|
||||
- if(j3 == i2)
|
||||
- {
|
||||
- flag1 |= renderblocks.renderBlockByRenderType(block, l2, j2, k2);
|
||||
- }
|
||||
+ if(j3>i2) flag=true;
|
||||
+
|
||||
+ if(!ForgeHooksClient.canRenderInPass(block,i2))
|
||||
+ continue;
|
||||
+ if (block instanceof IMultipassRender) {
|
||||
+ if (j3 != i2) {
|
||||
+ flag = true;
|
||||
+ }
|
||||
+ IMultipassRender impr = (IMultipassRender) block;
|
||||
+ if (impr.canRenderInPass(i2)) {
|
||||
+ j3 = i2;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ ForgeHooksClient.beforeBlockRender(block, renderblocks);
|
||||
+ flag1 |= renderblocks.renderBlockByRenderType(block, l2, j2, k2);
|
||||
+ ForgeHooksClient.afterBlockRender(block, renderblocks);
|
||||
if(j3 != i2)
|
||||
{
|
||||
flag = true;
|
||||
continue;
|
||||
}
|
||||
if(j3 == i2)
|
||||
- {
|
||||
+ {
|
||||
+ MinecraftForgeClient.beforeBlockRender(block, renderblocks);
|
||||
flag1 |= renderblocks.renderBlockByRenderType(block, l2, j2, k2);
|
||||
+ MinecraftForgeClient.afterBlockRender(block, renderblocks);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -155,10 +161,11 @@
|
||||
|
||||
if(flag2)
|
||||
{
|
||||
- tessellator.draw();
|
||||
+ ForgeHooksClient.afterRenderPass(i2);
|
||||
+ Tessellator.instance.draw();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glEndList();
|
||||
- tessellator.setTranslationD(0.0D, 0.0D, 0.0D);
|
||||
+ Tessellator.instance.setTranslationD(0.0D, 0.0D, 0.0D);
|
||||
} else
|
||||
{
|
||||
flag1 = false;
|
||||
@@ -251,7 +258,6 @@
|
||||
|
||||
public World worldObj;
|
||||
private int glRenderList;
|
||||
- private static Tessellator tessellator;
|
||||
public static int chunksUpdated = 0;
|
||||
public int posX;
|
||||
public int posY;
|
||||
@@ -282,8 +288,4 @@
|
||||
public List tileEntityRenderers;
|
||||
private List tileEntities;
|
||||
|
||||
- static
|
||||
- {
|
||||
- tessellator = Tessellator.instance;
|
||||
- }
|
||||
}
|
||||
diff -u -r --strip-trailing-cr ../src_base/minecraft_server/net/minecraft/src/BlockRedstoneWire.java ../src_work/minecraft_server/net/minecraft/src/BlockRedstoneWire.java
|
||||
--- ../src_base/minecraft_server/net/minecraft/src/BlockRedstoneWire.java 2011-08-04 20:51:17.000000000 -0400
|
||||
+++ ../src_work/minecraft_server/net/minecraft/src/BlockRedstoneWire.java 2011-08-05 07:07:18.000000000 -0400
|
||||
--- ../src_base/minecraft_server/net/minecraft/src/BlockRedstoneWire.java 2011-07-29 16:35:28.000000000 -0400
|
||||
+++ ../src_work/minecraft_server/net/minecraft/src/BlockRedstoneWire.java 2011-07-31 21:44:50.000000000 -0400
|
||||
@@ -3,6 +3,7 @@
|
||||
// Decompiler options: packimports(3) braces deadcode
|
||||
|
||||
@@ -855,8 +525,8 @@ diff -u -r --strip-trailing-cr ../src_base/minecraft_server/net/minecraft/src/Bl
|
||||
{
|
||||
return true;
|
||||
diff -u -r --strip-trailing-cr ../src_base/minecraft_server/net/minecraft/src/Chunk.java ../src_work/minecraft_server/net/minecraft/src/Chunk.java
|
||||
--- ../src_base/minecraft_server/net/minecraft/src/Chunk.java 2011-08-04 20:51:17.000000000 -0400
|
||||
+++ ../src_work/minecraft_server/net/minecraft/src/Chunk.java 2011-08-05 07:07:18.000000000 -0400
|
||||
--- ../src_base/minecraft_server/net/minecraft/src/Chunk.java 2011-07-29 16:35:28.000000000 -0400
|
||||
+++ ../src_work/minecraft_server/net/minecraft/src/Chunk.java 2011-07-31 21:44:50.000000000 -0400
|
||||
@@ -3,6 +3,7 @@
|
||||
// Decompiler options: packimports(3) braces deadcode
|
||||
|
||||
@@ -894,8 +564,8 @@ diff -u -r --strip-trailing-cr ../src_base/minecraft_server/net/minecraft/src/Ch
|
||||
if(j1 != 0)
|
||||
{
|
||||
diff -u -r --strip-trailing-cr ../src_base/minecraft_server/net/minecraft/src/EntityPlayer.java ../src_work/minecraft_server/net/minecraft/src/EntityPlayer.java
|
||||
--- ../src_base/minecraft_server/net/minecraft/src/EntityPlayer.java 2011-08-04 20:51:17.000000000 -0400
|
||||
+++ ../src_work/minecraft_server/net/minecraft/src/EntityPlayer.java 2011-08-05 07:07:18.000000000 -0400
|
||||
--- ../src_base/minecraft_server/net/minecraft/src/EntityPlayer.java 2011-07-29 16:35:28.000000000 -0400
|
||||
+++ ../src_work/minecraft_server/net/minecraft/src/EntityPlayer.java 2011-07-31 21:44:50.000000000 -0400
|
||||
@@ -6,6 +6,8 @@
|
||||
|
||||
import java.util.*;
|
||||
@@ -928,8 +598,8 @@ diff -u -r --strip-trailing-cr ../src_base/minecraft_server/net/minecraft/src/En
|
||||
int k = i * j + damageRemainder;
|
||||
inventory.damageArmor(i);
|
||||
diff -u -r --strip-trailing-cr ../src_base/minecraft_server/net/minecraft/src/Explosion.java ../src_work/minecraft_server/net/minecraft/src/Explosion.java
|
||||
--- ../src_base/minecraft_server/net/minecraft/src/Explosion.java 2011-08-04 20:51:17.000000000 -0400
|
||||
+++ ../src_work/minecraft_server/net/minecraft/src/Explosion.java 2011-08-05 07:07:18.000000000 -0400
|
||||
--- ../src_base/minecraft_server/net/minecraft/src/Explosion.java 2011-07-29 16:35:28.000000000 -0400
|
||||
+++ ../src_work/minecraft_server/net/minecraft/src/Explosion.java 2011-07-31 21:44:50.000000000 -0400
|
||||
@@ -3,6 +3,7 @@
|
||||
// Decompiler options: packimports(3) braces deadcode
|
||||
|
||||
@@ -957,8 +627,8 @@ diff -u -r --strip-trailing-cr ../src_base/minecraft_server/net/minecraft/src/Ex
|
||||
if(f1 > 0.0F)
|
||||
{
|
||||
diff -u -r --strip-trailing-cr ../src_base/minecraft_server/net/minecraft/src/ItemBucket.java ../src_work/minecraft_server/net/minecraft/src/ItemBucket.java
|
||||
--- ../src_base/minecraft_server/net/minecraft/src/ItemBucket.java 2011-08-04 20:51:17.000000000 -0400
|
||||
+++ ../src_work/minecraft_server/net/minecraft/src/ItemBucket.java 2011-08-05 07:07:18.000000000 -0400
|
||||
--- ../src_base/minecraft_server/net/minecraft/src/ItemBucket.java 2011-07-29 16:35:28.000000000 -0400
|
||||
+++ ../src_work/minecraft_server/net/minecraft/src/ItemBucket.java 2011-07-31 21:44:50.000000000 -0400
|
||||
@@ -6,6 +6,8 @@
|
||||
|
||||
import java.util.Random;
|
||||
@@ -983,8 +653,8 @@ diff -u -r --strip-trailing-cr ../src_base/minecraft_server/net/minecraft/src/It
|
||||
{
|
||||
world.setBlockWithNotify(i, j, k, 0);
|
||||
diff -u -r --strip-trailing-cr ../src_base/minecraft_server/net/minecraft/src/ItemInWorldManager.java ../src_work/minecraft_server/net/minecraft/src/ItemInWorldManager.java
|
||||
--- ../src_base/minecraft_server/net/minecraft/src/ItemInWorldManager.java 2011-08-04 20:51:17.000000000 -0400
|
||||
+++ ../src_work/minecraft_server/net/minecraft/src/ItemInWorldManager.java 2011-08-05 07:07:18.000000000 -0400
|
||||
--- ../src_base/minecraft_server/net/minecraft/src/ItemInWorldManager.java 2011-07-29 16:35:28.000000000 -0400
|
||||
+++ ../src_work/minecraft_server/net/minecraft/src/ItemInWorldManager.java 2011-07-31 21:44:50.000000000 -0400
|
||||
@@ -3,6 +3,7 @@
|
||||
// Decompiler options: packimports(3) braces deadcode
|
||||
|
||||
@@ -1006,8 +676,8 @@ diff -u -r --strip-trailing-cr ../src_base/minecraft_server/net/minecraft/src/It
|
||||
if(i1 > 0 && Block.blocksList[i1].blockActivated(world, i, j, k, entityplayer))
|
||||
{
|
||||
diff -u -r --strip-trailing-cr ../src_base/minecraft_server/net/minecraft/src/ItemPickaxe.java ../src_work/minecraft_server/net/minecraft/src/ItemPickaxe.java
|
||||
--- ../src_base/minecraft_server/net/minecraft/src/ItemPickaxe.java 2011-08-04 20:51:17.000000000 -0400
|
||||
+++ ../src_work/minecraft_server/net/minecraft/src/ItemPickaxe.java 2011-08-05 07:07:18.000000000 -0400
|
||||
--- ../src_base/minecraft_server/net/minecraft/src/ItemPickaxe.java 2011-07-29 16:35:28.000000000 -0400
|
||||
+++ ../src_work/minecraft_server/net/minecraft/src/ItemPickaxe.java 2011-07-31 21:44:50.000000000 -0400
|
||||
@@ -4,6 +4,8 @@
|
||||
|
||||
package net.minecraft.src;
|
||||
@@ -1028,8 +698,8 @@ diff -u -r --strip-trailing-cr ../src_base/minecraft_server/net/minecraft/src/It
|
||||
{
|
||||
return true;
|
||||
diff -u -r --strip-trailing-cr ../src_base/minecraft_server/net/minecraft/src/ItemTool.java ../src_work/minecraft_server/net/minecraft/src/ItemTool.java
|
||||
--- ../src_base/minecraft_server/net/minecraft/src/ItemTool.java 2011-08-04 20:51:17.000000000 -0400
|
||||
+++ ../src_work/minecraft_server/net/minecraft/src/ItemTool.java 2011-08-05 07:07:18.000000000 -0400
|
||||
--- ../src_base/minecraft_server/net/minecraft/src/ItemTool.java 2011-07-29 16:35:28.000000000 -0400
|
||||
+++ ../src_work/minecraft_server/net/minecraft/src/ItemTool.java 2011-07-31 21:49:37.000000000 -0400
|
||||
@@ -4,6 +4,8 @@
|
||||
|
||||
package net.minecraft.src;
|
||||
@@ -1051,20 +721,9 @@ diff -u -r --strip-trailing-cr ../src_base/minecraft_server/net/minecraft/src/It
|
||||
+ blocksEffectiveAgainst [blocksEffectiveAgainst.length-1] = block;
|
||||
+ }
|
||||
}
|
||||
diff -u -r --strip-trailing-cr ../src_base/minecraft_server/net/minecraft/src/MovingObjectPosition.java ../src_work/minecraft_server/net/minecraft/src/MovingObjectPosition.java
|
||||
--- ../src_base/minecraft_server/net/minecraft/src/MovingObjectPosition.java 2011-08-04 20:51:17.000000000 -0400
|
||||
+++ ../src_work/minecraft_server/net/minecraft/src/MovingObjectPosition.java 2011-08-06 14:29:31.000000000 -0400
|
||||
@@ -35,4 +35,7 @@
|
||||
public int sideHit;
|
||||
public Vec3D hitVec;
|
||||
public Entity entityHit;
|
||||
+
|
||||
+ // Added for RedPower subblocks.
|
||||
+ public int subHit=0;
|
||||
}
|
||||
diff -u -r --strip-trailing-cr ../src_base/minecraft_server/net/minecraft/src/PlayerInstance.java ../src_work/minecraft_server/net/minecraft/src/PlayerInstance.java
|
||||
--- ../src_base/minecraft_server/net/minecraft/src/PlayerInstance.java 2011-08-04 20:51:17.000000000 -0400
|
||||
+++ ../src_work/minecraft_server/net/minecraft/src/PlayerInstance.java 2011-08-05 07:07:18.000000000 -0400
|
||||
--- ../src_base/minecraft_server/net/minecraft/src/PlayerInstance.java 2011-07-29 16:35:28.000000000 -0400
|
||||
+++ ../src_work/minecraft_server/net/minecraft/src/PlayerInstance.java 2011-07-31 21:44:50.000000000 -0400
|
||||
@@ -169,12 +169,11 @@
|
||||
sendPacketToPlayersInInstance(new Packet52MultiBlockChange(chunkX, chunkZ, blocksToUpdate, numBlocksToUpdate, worldserver));
|
||||
for(int k = 0; k < numBlocksToUpdate; k++)
|
||||
@@ -1081,94 +740,3 @@ diff -u -r --strip-trailing-cr ../src_base/minecraft_server/net/minecraft/src/Pl
|
||||
updateTileEntity(worldserver.getBlockTileEntity(j1, i2, k2));
|
||||
}
|
||||
}
|
||||
diff -u -r --strip-trailing-cr ../src_base/minecraft_server/net/minecraft/src/World.java ../src_work/minecraft_server/net/minecraft/src/World.java
|
||||
--- ../src_base/minecraft_server/net/minecraft/src/World.java 2011-08-04 20:51:17.000000000 -0400
|
||||
+++ ../src_work/minecraft_server/net/minecraft/src/World.java 2011-08-05 07:07:18.000000000 -0400
|
||||
@@ -7,6 +7,8 @@
|
||||
import java.io.PrintStream;
|
||||
import java.util.*;
|
||||
|
||||
+import net.minecraft.src.forge.IBlockSecondaryProperties;
|
||||
+
|
||||
// Referenced classes of package net.minecraft.src:
|
||||
// IBlockAccess, WorldProvider, MapStorage, ISaveHandler,
|
||||
// WorldInfo, ChunkProvider, IChunkProvider, IProgressUpdate,
|
||||
@@ -166,7 +168,25 @@
|
||||
|
||||
public boolean isAirBlock(int i, int j, int k)
|
||||
{
|
||||
- return getBlockId(i, j, k) == 0;
|
||||
+ int iBlockID = getBlockId( i, j, k );
|
||||
+
|
||||
+ if ( iBlockID == 0 )
|
||||
+ {
|
||||
+ return true;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ Block block = Block.blocksList[iBlockID];
|
||||
+
|
||||
+ if ( block instanceof IBlockSecondaryProperties )
|
||||
+ {
|
||||
+ return ((IBlockSecondaryProperties)block).isAirBlock( this, i, j, k );
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ return false;
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
|
||||
public boolean blockExists(int i, int j, int k)
|
||||
@@ -1409,6 +1429,18 @@
|
||||
{
|
||||
return true;
|
||||
}
|
||||
+ else
|
||||
+ {
|
||||
+ Block block = Block.blocksList[j2];
|
||||
+
|
||||
+ if ( block instanceof IBlockSecondaryProperties )
|
||||
+ {
|
||||
+ if ( ((IBlockSecondaryProperties)block).isBlockBurning( this, k1, i1, i2 ) )
|
||||
+ {
|
||||
+ return true;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1686,7 +1718,14 @@
|
||||
return false;
|
||||
} else
|
||||
{
|
||||
- return block.blockMaterial.getIsOpaque() && block.isACube();
|
||||
+ if ( block instanceof IBlockSecondaryProperties )
|
||||
+ {
|
||||
+ return ((IBlockSecondaryProperties)block).isBlockNormalCube( this, i, j, k );
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ return block.blockMaterial.getIsOpaque() && block.isACube();
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2178,6 +2217,16 @@
|
||||
{
|
||||
block = null;
|
||||
}
|
||||
+ else
|
||||
+ {
|
||||
+ if ( block instanceof IBlockSecondaryProperties )
|
||||
+ {
|
||||
+ if ( ((IBlockSecondaryProperties)block).isBlockReplaceable( this, j, k, l ) )
|
||||
+ {
|
||||
+ block = null;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
return i > 0 && block == null && block1.canPlaceBlockOnSide(this, j, k, l, i1);
|
||||
}
|
||||
|
||||
@@ -1,70 +0,0 @@
|
||||
diff -ru src/minecraft/net/minecraft/src/MLProp.java src_fix/minecraft/net/minecraft/src/MLProp.java
|
||||
--- src/minecraft/net/minecraft/src/MLProp.java 2011-08-04 20:10:17.000000000 -0400
|
||||
+++ src_fix/minecraft/net/minecraft/src/MLProp.java 2011-08-04 20:12:55.000000000 -0400
|
||||
@@ -1,20 +1,11 @@
|
||||
-// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
|
||||
-// Jad home page: http://www.kpdus.com/jad.html
|
||||
-// Decompiler options: packimports(3) braces deadcode
|
||||
-
|
||||
-package net.minecraft.src;
|
||||
-
|
||||
-import java.lang.annotation.Annotation;
|
||||
-
|
||||
-public interface MLProp
|
||||
- extends Annotation
|
||||
-{
|
||||
-
|
||||
- public abstract String name();
|
||||
-
|
||||
- public abstract String info();
|
||||
-
|
||||
- public abstract double min();
|
||||
-
|
||||
- public abstract double max();
|
||||
-}
|
||||
+package net.minecraft.src;
|
||||
+import java.lang.annotation.*;
|
||||
+
|
||||
+@Retention(RetentionPolicy.RUNTIME)
|
||||
+@Target(ElementType.FIELD)
|
||||
+public @interface MLProp {
|
||||
+ String name() default "";
|
||||
+ String info() default "";
|
||||
+ double min() default Double.NEGATIVE_INFINITY;
|
||||
+ double max() default Double.POSITIVE_INFINITY;
|
||||
+}
|
||||
diff -ru src/minecraft_server/net/minecraft/src/MLProp.java src_fix/minecraft_server/net/minecraft/src/MLProp.java
|
||||
--- src/minecraft_server/net/minecraft/src/MLProp.java 2011-08-04 20:10:17.000000000 -0400
|
||||
+++ src_fix/minecraft_server/net/minecraft/src/MLProp.java 2011-08-04 20:13:00.000000000 -0400
|
||||
@@ -1,20 +1,11 @@
|
||||
-// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
|
||||
-// Jad home page: http://www.kpdus.com/jad.html
|
||||
-// Decompiler options: packimports(3) braces deadcode
|
||||
-
|
||||
-package net.minecraft.src;
|
||||
-
|
||||
-import java.lang.annotation.Annotation;
|
||||
-
|
||||
-public interface MLProp
|
||||
- extends Annotation
|
||||
-{
|
||||
-
|
||||
- public abstract String name();
|
||||
-
|
||||
- public abstract String info();
|
||||
-
|
||||
- public abstract double min();
|
||||
-
|
||||
- public abstract double max();
|
||||
-}
|
||||
+package net.minecraft.src;
|
||||
+import java.lang.annotation.*;
|
||||
+
|
||||
+@Retention(RetentionPolicy.RUNTIME)
|
||||
+@Target(ElementType.FIELD)
|
||||
+public @interface MLProp {
|
||||
+ String name() default "";
|
||||
+ String info() default "";
|
||||
+ double min() default Double.NEGATIVE_INFINITY;
|
||||
+ double max() default Double.POSITIVE_INFINITY;
|
||||
+}
|
||||
+7
-15
@@ -46,26 +46,18 @@ rm -rf reobf
|
||||
|
||||
cd $build_dir
|
||||
|
||||
mkdir forge
|
||||
cd forge
|
||||
mkdir src
|
||||
mkdir src/minecraft
|
||||
mkdir src/minecraft_server
|
||||
cp -r ../forge_client/src/* src/minecraft
|
||||
cp -r ../forge_server/src/* src/minecraft_server
|
||||
cp -r ../forge_common/* src/minecraft
|
||||
cp -r ../forge_common/* src/minecraft_server
|
||||
cp ../minecraft.patch .
|
||||
cp ../lfcr.py .
|
||||
cp ../install/install.cmd .
|
||||
cp ../install/README.txt .
|
||||
cp -r ../doc .
|
||||
cp -r forge_client/src/* src/minecraft
|
||||
cp -r forge_server/src/* src/minecraft_server
|
||||
cp -r forge_common/* src/minecraft
|
||||
cp -r forge_common/* src/minecraft_server
|
||||
cp minecraft.patch src
|
||||
|
||||
cd src
|
||||
remove_svn .
|
||||
cd ..
|
||||
|
||||
cd ..
|
||||
|
||||
zip -r $dir/minecraftforge-src-$version.zip forge
|
||||
rm -rf forge
|
||||
zip -r $dir/minecraftforge-src-$version.zip src doc
|
||||
rm -rf src
|
||||
+1
-1
@@ -8,6 +8,6 @@ set PATH=E:\cygwin\bin;%PATH%
|
||||
|
||||
cd forge
|
||||
|
||||
sh package.sh 1.0.3
|
||||
sh package.sh 1.0.0
|
||||
|
||||
pause
|
||||
+4
-4
@@ -1,3 +1,5 @@
|
||||
set CYGWIN=E:\cygwin\bin
|
||||
|
||||
cd ..
|
||||
|
||||
rmdir /S /Q src
|
||||
@@ -8,8 +10,7 @@ rmdir /S /Q src_work
|
||||
) ELSE (
|
||||
cmd /C decompile.bat
|
||||
cd src
|
||||
..\runtime\bin\python\python_mcp ..\forge\lfcr.py ..\forge\modLoaderMP.patch ..\forge\modLoaderMP-win.patch
|
||||
..\runtime\bin\applydiff.exe -uf -p2 < ..\forge\modLoaderMP-win.patch
|
||||
%CYGWIN%\patch -u -p2 < ..\forge\modLoaderMP.patch
|
||||
cd ..
|
||||
cmd /C recompile.bat
|
||||
cmd /C updatemd5.bat
|
||||
@@ -20,6 +21,5 @@ mkdir src_work
|
||||
xcopy /Y /E src\* src_base
|
||||
xcopy /Y /E src\* src_work
|
||||
cd src_work
|
||||
..\runtime\bin\python\python_mcp ..\forge\lfcr.py ..\forge\minecraft.patch ..\forge\minecraft-win.patch
|
||||
..\runtime\bin\applydiff.exe -uf -p2 < ..\forge\minecraft-win.patch
|
||||
%CYGWIN%\patch -u -p2 < ..\forge\minecraft.patch
|
||||
pause
|
||||
@@ -1,49 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "MinecraftForge Linux Setup Program"
|
||||
echo
|
||||
|
||||
pushd .. > /dev/null
|
||||
|
||||
if [ -d src ] ; then
|
||||
echo "!!! WARNING !!!"
|
||||
echo
|
||||
echo "This setup will erase your src directory. Make sure to back up"
|
||||
echo "any changes before continuing."
|
||||
echo
|
||||
|
||||
read -p "Continue (y/n)? " var
|
||||
|
||||
if [ "$var" != "y" ]; then exit ; fi
|
||||
fi
|
||||
|
||||
rm -rf src src_work src_forge
|
||||
|
||||
if [ ! -d src_base ] ; then
|
||||
./decompile.sh
|
||||
pushd src > /dev/null
|
||||
|
||||
find -name *.java -exec sed -i 's/\r//g' \{\} \;
|
||||
patch -p2 -i ../forge/modLoaderMP.patch
|
||||
patch -p1 -i ../forge/mlprop.patch
|
||||
|
||||
popd > /dev/null
|
||||
|
||||
mv src src_base
|
||||
fi
|
||||
|
||||
cp -a src_base src_work
|
||||
pushd src_work > /dev/null
|
||||
patch -p2 -i ../forge/minecraft.patch
|
||||
popd > /dev/null
|
||||
|
||||
cp -a src_work src_forge
|
||||
|
||||
cp -a forge/forge_client/src/net/* src_forge/minecraft/net/
|
||||
cp -a forge/forge_common/net/* src_forge/minecraft/net/
|
||||
cp -a forge/forge_common/net/* src_forge/minecraft_server/net/
|
||||
|
||||
cp -a src_forge src
|
||||
|
||||
./updatemd5.sh
|
||||
|
||||
Reference in new issue
Block a user