I got a problem, but i dont know where it comes from
* Gets the biome for a given set of x/z coordinates
*/
public BiomeGenBase getBiomeGenForCoords(int par1, int par2)
{
if (this.blockExists(par1, 0, par2))
{
Chunk var3 = this.getChunkFromBlockCoords(par1, par2);
if (var3 != null)
{
return var3.getBiomeGenForWorldCoords(par1 & 15, par2 & 15, this.worldProvider.worldChunkMgr);
}
}
return this.worldProvider.worldChunkMgr.getBiomeGenAt(par1, par2);
}
it says there is a error in this part of the code: getBiomeGenForWorldCoords
the error is in world.java, but its a notch file..
i have modloader, forge, and dimension api installed, the problem came after i made a custom rendered block, but i dont think that this is the problem maybe i deletet something? by the way i updatet my mod from 1.1 to 1.2.5
oh ok yeah now i see it the prob is u don't want to have the rendertype as lanternid you want a different variable for the modelid that the render engine checks for! look at the tut again
oh and for the guy who had something to do with the placement, remove the stuff from on block activated and add this
public void onBlockPlaced(World world, int i, int j, int k, int l)
{
EntityPlayer par5EntityPlayer = ModLoader.getMinecraftInstance().thePlayer;
int p = MathHelper.floor_double((double)((par5EntityPlayer.rotationYaw * 4F) / 360F) + 0.5D) & 3; //this is a smart equation
byte byte0 = 3;
if (p == 0)
{
byte0 = 4;
}
if (p == 1)
{
byte0 = 3;
}
if (p == 2)
{
byte0 = 2;
}
if (p == 3)
{
byte0 = 1;
}
world.setBlockMetadataWithNotify(i, j, k, byte0);
}
Thanks but that doesn't seem to make the model move.
EDIT: Never mind. Fixed my own stupidity
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
Sorry you probably get this alot but I get some error, at first I didn't see my block it was all invisible and I tried to fix it but it turned in to a error.. this error:
Minecraft has stopped running because it encountered a problem.
--- BEGIN ERROR REPORT 7ff8050f --------
Generated 2012-07-09 11:15
Minecraft: Minecraft 1.2.5
OS: Windows 7 (amd64) version 6.1
Java: 1.7.0_02, Oracle Corporation
VM: Java HotSpot™ 64-Bit Server VM (mixed mode), Oracle Corporation
LWJGL: 2.4.2
OpenGL: GeForce GTX 460/PCIe/SSE2 version 4.2.0, NVIDIA Corporation
java.lang.NullPointerException
at net.minecraft.src.TileEntity.getBlockMetadata(TileEntity.java:137)
at net.minecraft.src.TileEntityFryerRenderer.renderAModelAt(TileEntityFryerRenderer.java:15)
at net.minecraft.src.TileEntityFryerRenderer.renderTileEntityAt(TileEntityFryerRenderer.java:55)
at net.minecraft.src.TileEntityRenderer.renderTileEntityAt(TileEntityRenderer.java:154)
at net.minecraft.src.mod_aesthetic.renderInvBlock(mod_aesthetic.java:29)
at net.minecraft.src.ModLoader.renderInvBlock(ModLoader.java:1720)
at net.minecraft.src.RenderBlocks.renderBlockAsItem(RenderBlocks.java:5703)
at net.minecraft.src.RenderItem.drawItemIntoGui(RenderItem.java:203)
at net.minecraft.src.RenderItem.renderItemIntoGUI(RenderItem.java:270)
at net.minecraft.src.GuiIngame.renderInventorySlot(GuiIngame.java:733)
at net.minecraft.src.GuiIngame.renderGameOverlay(GuiIngame.java:307)
at net.minecraft.src.EntityRenderer.updateCameraAndRender(EntityRenderer.java:970)
at net.minecraft.src.EntityRendererProxy.updateCameraAndRender(EntityRendererProxy.java:20)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:922)
at net.minecraft.client.Minecraft.run(Minecraft.java:801)
at java.lang.Thread.run(Unknown Source)
--- END ERROR REPORT e8fcfaf2 ----------
Here is my code!
mod_****:
package net.minecraft.src;
import java.util.Random;
public class mod_aesthetic extends BaseMod
{
public static final Block blockFryer = (new BlockFryer(203,0,net.minecraft.src.TileEntityFryer.class)).setBlockName("blockFryer");
public static final Item itemFryer = (new ItemReed(159, blockFryer)).setIconCoord(0, 0).setItemName("itemFryer");
public static int modelID;
public void load()
{
ModLoader.registerBlock(blockFryer);
ModLoader.addName(blockFryer, "Fryer");
ModLoader.addRecipe(new ItemStack(blockFryer,1), new Object[]{
"XXX", "X*X", "XXX", Character.valueOf('*'), Item.stick,
Character.valueOf('X'), Block.dirt});
TileEntityFryerRenderer tileent1 = new TileEntityFryerRenderer();
ModLoader.registerTileEntity(TileEntityFryer.class, "Fryer", tileent1);
modelID = ModLoader.getUniqueBlockModelID(this, true);
}
public void renderInvBlock(RenderBlocks var1, Block var2, int var3, int var4)
{
if (var4 == blockFryer.getRenderType())
{
TileEntityRenderer.instance.renderTileEntityAt(new TileEntityFryer(), 0.0D, 0.0D, 0.0D, 0.0F);
}
}
public String getVersion()
{
return "Alpha 0.1 for Minecraft 1.2.5";
}
}
Block****:
package net.minecraft.src;
import java.util.Random;
public class BlockFryer extends BlockContainer
{
public BlockFryer(int i, int j, Class class1)
{
super(i,j, Material.cloth);
anEntityClass = class1;
}
public int idDropped(int par1, Random par2Random, int par3)
{
return mod_aesthetic.blockFryer.blockID;
}
public int quantityDropped(Random random) {
return 1;
}
public boolean isOpaqueCube() {
return false;
}
public boolean renderAsNormalBlock() {
return false;
}
public int getRenderType() {
return mod_aesthetic.modelID;
}
public boolean blockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer){
int p = MathHelper.floor_double((double)((par5EntityPlayer.rotationYaw * 4F) / 360F) + 0.5D) & 3; //this is a smart equation
byte byte0 = 3;
if (p == 0)
{
byte0 = 4;
}
if (p == 1)
{
byte0 = 3;
}
if (p == 2)
{
byte0 = 2;
}
if (p == 3)
{
byte0 = 1;
}
par1World.setBlockMetadataWithNotify(par2, par3, par4, byte0);
return true;
}
public TileEntity getBlockEntity() {
return new TileEntityFryer();
}
private Class anEntityClass;
}
package net.minecraft.src;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
public class TileEntityFryerRenderer extends TileEntitySpecialRenderer
{
public TileEntityFryerRenderer(){
model = new ModelFryer();
}
public void renderAModelAt(TileEntityFryer tile, double d, double d1, double d2, float f)
{
//int i = tile.getBlockMetadata(); //this is for rotation
int i = tile.getBlockMetadata();
int j = 0;
if (tile.worldObj == null)
{
//[left]i = tile.getBlockMetadata();[/left];
i = 0;
}
if (i == 0)
{
j = 0;
}
if (i == 1)
{
j = 90;
}
if (i == 2)
{
j = 180;
}
if (i == 3)
{
j = 270;
}
bindTextureByName("/aestheticmore/deepfryer.png"); //texture
GL11.glPushMatrix(); //start
GL11.glTranslatef((float)d + 0.5F, (float)d1 + 1.5F, (float)d2 + 0.5F); //size
GL11.glRotatef(j, 0.0F, 1.0F, 0.0F); //rotate based on metadata
GL11.glScalef(1.0F, -1F, -1F); //if you read this comment out this line and you can see what happens
model.renderModel(0.0625F); //renders and yes 0.0625 is a random number
GL11.glPopMatrix(); //end
}
public void renderTileEntityAt(TileEntity tileentity, double d, double d1, double d2, float f) {
renderAModelAt((TileEntityFryer) tileentity, d, d1, d2, f); //where to render
}
private ModelFryer model;
}
Make Sure You Changed The Thing In The RenderTileEntity! I Changed It A Bit.
Hey ducky love your tutorials but I got this error and I was wondering whether you could help?
src\minecraft\net\minecraft\src\BlockPygmyEgg.java:12: package mod_PygmyEgg does
not exist
return mod_PygmyEgg.itemPygmyEgg.shiftedIndex;
^
src\minecraft\net\minecraft\src\mod_PygmyMod.java:5: cannot find symbol
symbol : constructor BlockPygmyEgg(int,int)
location: class net.minecraft.src.BlockPygmyEgg
public static final Block PygmyEgg = new BlockPygmyEgg(160, 0).setBlockName("any
PygmyEgg").setHardness(3F).setResistance(4F).setLightValue(1F);
^
src\minecraft\net\minecraft\src\TileEntityPygmyEggRenderer.java:41: cannot find
symbol
symbol : method renderModel(float)
location: class net.minecraft.src.ModelPygmyEgg
model.renderModel(0.0625F); //renders and yes 0.0625 is a random
number
^
i went through this and im having sooo many errors with ti, could you help me out?
error:
Mods loaded: 4
ModLoader 1.2.5
mod_Blocks WorldCraft Blocks V1 - MC 1.2.5
mod_DimensionAPI 1.5 for MC 1.2.5
mod_Items WorldCraft Items V1 - MC 1.2.53.14159265
Minecraft has crashed!
----------------------
Minecraft has stopped running because it encountered a problem.
--- BEGIN ERROR REPORT dc1da981 --------
Generated 7/26/12 2:37 PM
Minecraft: Minecraft 1.2.5
OS: Windows 7 (amd64) version 6.1
Java: 1.7.0_04, Oracle Corporation
VM: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
LWJGL: 2.4.2
OpenGL: GeForce GT 420/PCI/SSE2 version 4.0.0, NVIDIA Corporation
java.lang.Error: Unresolved compilation problems:
The type mod_SBlocks must implement the inherited abstract method BaseMod.load()
Syntax error on token(s), misplaced construct(s)
Syntax error on token "BlockSTorch", VariableDeclaratorId expected after this token
Syntax error on token "registerTileEntity", Identifier expected after this token
Syntax error on tokens, SimpleName expected instead
Syntax error on token "}", delete this token
at net.minecraft.src.mod_SBlocks.<init>(mod_SBlocks.java:6)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at net.minecraft.src.ModLoader.addMod(ModLoader.java:287)
at net.minecraft.src.ModLoader.readFromClassPath(ModLoader.java:1279)
at net.minecraft.src.ModLoader.init(ModLoader.java:849)
at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:157)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:85)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:12)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:424)
at net.minecraft.client.Minecraft.run(Minecraft.java:786)
at java.lang.Thread.run(Unknown Source)
--- END ERROR REPORT 897c8144 ----------
Minecraft has stopped running because it encountered a problem.
--- BEGIN ERROR REPORT 1e59182b --------
Generated 7/26/12 4:53 PM
Minecraft: Minecraft 1.2.5
OS: Windows 7 (amd64) version 6.1
Java: 1.7.0, Oracle Corporation
VM: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
LWJGL: 2.4.2
OpenGL: AMD Radeon HD 6570 version 4.1.10428 Compatibility Profile Context, ATI Technologies Inc.
java.lang.NullPointerException
at net.minecraft.src.BlockCcop.updateRender(BlockCcop.java:48)
at net.minecraft.src.BlockCcop.randomDisplayTick(BlockCcop.java:28)
at net.minecraft.src.World.randomDisplayUpdates(World.java:3659)
at net.minecraft.client.Minecraft.runTick(Minecraft.java:1874)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:819)
at net.minecraft.client.Minecraft.run(Minecraft.java:747)
at java.lang.Thread.run(Unknown Source)
--- END ERROR REPORT 4fd622c1 ----------
public static final Block Ccop = (new BlockCcop(203, 0, net.minecraft.src.TileEntityCcop.class)).setBlockName("Ccop");
public static final Item Ccopi = (new ItemReed(8019, Ccop)).setIconCoord(0, 0).setItemName("Ccopi");
public void load()
{
TileEntityRendererCcop tileent1 = new TileEntityRendererCcop();
ModLoader.registerTileEntity(TileEntityCcop.class, "Ccop", tileent1);
ModLoader.registerBlock(Ccop);
BlockCcop:
package net.minecraft.src;
import java.util.Random;
public class BlockCcop extends Block {
public BlockCcop(int i, int j, Class class1) {
super(i, j, Material.iron);
anEntityClass = class1;
}
public int idDropped(int par1, Random par2Random, int par3)
{
return mod_elementalcraft.Ccopi.shiftedIndex;
}
public int quantityDropped(Random random) {
return 1;
}
public boolean isOpaqueCube() {
return false;
}
public boolean renderAsNormalBlock() {
return false;
}
public int getRenderType() {
return -1;
}
public void randomDisplayTick(World par1World, int par2, int par3, int par4, Random par5Random) {
updateRender(par1World, par2, par3, par4); //For When The World Is Loaded
}
public void onNeighborBlockChange(World par1World, int par2, int par3, int par4, int par5){
updateRender(par1World, par2, par3, par4); //used For Cables Already There
}
public void onBlockAdded(World par1World, int par2, int par3, int par4) {
updateRender(par1World, par2, par3, par4); //Used For Blocks Just Added
}
private void updateRender(World par1World, int par2, int par3, int par4){
int block = mod_elementalcraft.Ccop.blockID;
TileEntityCcop TE = (TileEntityCcop)par1World.getBlockTileEntity(par2, par3, par4); //Get The TileEntity Of A SINGLE Block
if(par1World.getBlockId(par2, par3+1, par4) == block)TE.Up = true; //Check If It Is There
if(par1World.getBlockId(par2, par3-1, par4) == block)TE.Down = true;
if(par1World.getBlockId(par2+1, par3, par4) == block)TE.Left = true;
if(par1World.getBlockId(par2-1, par3, par4) == block)TE.Right = true;
if(par1World.getBlockId(par2, par3, par4+1) == block)TE.Front = true;
if(par1World.getBlockId(par2, par3, par4-1) == block)TE.Back = true;
if(par1World.getBlockId(par2, par3+1, par4) != block)TE.Up = false;
if(par1World.getBlockId(par2, par3-1, par4) != block)TE.Down = false;
if(par1World.getBlockId(par2+1, par3, par4) != block)TE.Left = false;
if(par1World.getBlockId(par2-1, par3, par4) != block)TE.Right = false;
if(par1World.getBlockId(par2, par3, par4+1) != block)TE.Front = false;
if(par1World.getBlockId(par2, par3, par4-1) != block)TE.Back = false;
}
public TileEntity getBlockEntity() {
return new TileEntityCcop();
}
private Class anEntityClass;
}
package net.minecraft.src;
public class TileEntityCcop extends TileEntity{
public boolean Up = false;
public boolean Down = false;
public boolean Left = false;
public boolean Right = false;
public boolean Back = false;
public boolean Front = false;
public TileEntityCcop(){
}
}
This may just be my OCD speaking, but I am anal when it comes to optimizing code, and I see a very easy way to optimize this function in your cables....
[color=#000088]private[/color][color=#000088]void[/color][color=#000000] updateRender[/color][color=#666600]([/color][color=#660066]World[/color][color=#000000] par1World[/color][color=#666600],[/color][color=#000088]int[/color][color=#000000] par2[/color][color=#666600],[/color][color=#000088]int[/color][color=#000000] par3[/color][color=#666600],[/color][color=#000088]int[/color][color=#000000] par4[/color][color=#666600]){[/color]
[color=#000000] [/color][color=#000088]int[/color][color=#000000] block [/color][color=#666600]=[/color][color=#000000] mod_[/color][color=#666600]****.****.[/color][color=#000000]blockID[/color][color=#666600];[/color][color=#000000] [/color][color=#880000]//Int To Check Agains[/color]
[color=#000000] [/color][color=#660066]TileEntity[/color][color=#666600]****[/color][color=#000000] TE [/color][color=#666600]=[/color][color=#000000] [/color][color=#666600]([/color][color=#660066]TileEntity[/color][color=#666600]****)[/color][color=#000000]par1World[/color][color=#666600].[/color][color=#000000]getBlockTileEntity[/color][color=#666600]([/color][color=#000000]par2[/color][color=#666600],[/color][color=#000000] par3[/color][color=#666600],[/color][color=#000000] par4[/color][color=#666600]);[/color][color=#000000] [/color][color=#880000]//Get The TileEntity Of A SINGLE Block[/color]
[color=#000000]TE[/color][color=#666600].[/color][color=#660066]Up = [/color][color=#666600]([/color][color=#000000]par1World[/color][color=#666600].[/color][color=#000000]getBlockId[/color][color=#666600]([/color][color=#000000]par2[/color][color=#666600],[/color][color=#000000] par3[/color][color=#666600]+[/color][color=#006666]1[/color][color=#666600],[/color][color=#000000] par4[/color][color=#666600])[/color][color=#000000] [/color][color=#666600]==[/color][color=#000000] block[/color][color=#666600]); [/color][color=#880000]//Check If a cable is there[/color]
[color=#000000]TE[/color][color=#666600].[/color][color=#660066]Down[/color][color=#000000] [/color][color=#666600]= [/color][color=#666600]([/color][color=#000000]par1World[/color][color=#666600].[/color][color=#000000]getBlockId[/color][color=#666600]([/color][color=#000000]par2[/color][color=#666600],[/color][color=#000000] par3[/color][color=#666600]-[/color][color=#006666]1[/color][color=#666600],[/color][color=#000000] par4[/color][color=#666600])[/color][color=#000000] [/color][color=#666600]==[/color][color=#000000] block[/color][color=#666600]);[/color]
[color=#000000]TE[/color][color=#666600].[/color][color=#660066]Left[/color][color=#000000] [/color][color=#666600]=[/color][color=#000000] [/color][color=#666600]([/color][color=#000000]par1World[/color][color=#666600].[/color][color=#000000]getBlockId[/color][color=#666600]([/color][color=#000000]par2[/color][color=#666600]+[/color][color=#006666]1[/color][color=#666600],[/color][color=#000000] par3[/color][color=#666600],[/color][color=#000000] par4[/color][color=#666600])[/color][color=#000000] [/color][color=#666600]==[/color][color=#000000] block[/color][color=#666600]);[/color]
[color=#000000]TE[/color][color=#666600].[/color][color=#660066]Right [/color][color=#666600]= [/color][color=#666600]([/color][color=#000000]par1World[/color][color=#666600].[/color][color=#000000]getBlockId[/color](par2-1, par3, par4) == block);
TE.Front = (par1World.getBlockId(par2, par3, par4+1) == block);
TE.Back = (par1World.getBlockId(par2, par3, par4-1) == block); }[/color]
Now, this probably wouldn't make much of a difference on its own, but for someone like me who adds about 50 mods to minecraft, if every mod creator spent time optimizing their code, you would defiantly see a difference!
it says there is a error in this part of the code: getBiomeGenForWorldCoords
the error is in world.java, but its a notch file..
i have modloader, forge, and dimension api installed, the problem came after i made a custom rendered block, but i dont think that this is the problem maybe i deletet something? by the way i updatet my mod from 1.1 to 1.2.5
The Prob Is your checking for the ID in the block class just check against the variable itself eg:
the block should have a furnace-like gui.
Thanks but that doesn't seem to make the model move.
EDIT: Never mind. Fixed my own stupidity
together they are powerful beyond imagination."
Make Sure You Changed The Thing In The RenderTileEntity! I Changed It A Bit.
src\minecraft\net\minecraft\src\BlockPygmyEgg.java:12: package mod_PygmyEgg does
not exist
return mod_PygmyEgg.itemPygmyEgg.shiftedIndex;
^
src\minecraft\net\minecraft\src\mod_PygmyMod.java:5: cannot find symbol
symbol : constructor BlockPygmyEgg(int,int)
location: class net.minecraft.src.BlockPygmyEgg
public static final Block PygmyEgg = new BlockPygmyEgg(160, 0).setBlockName("any
PygmyEgg").setHardness(3F).setResistance(4F).setLightValue(1F);
^
src\minecraft\net\minecraft\src\TileEntityPygmyEggRenderer.java:41: cannot find
symbol
symbol : method renderModel(float)
location: class net.minecraft.src.ModelPygmyEgg
model.renderModel(0.0625F); //renders and yes 0.0625 is a random
number
^
nvm first error I fixed that
nvm third error either I fixed that too
nvm I fixed all of them
error:
Mods loaded: 4
ModLoader 1.2.5
mod_Blocks WorldCraft Blocks V1 - MC 1.2.5
mod_DimensionAPI 1.5 for MC 1.2.5
mod_Items WorldCraft Items V1 - MC 1.2.53.14159265
Minecraft has crashed!
----------------------
Minecraft has stopped running because it encountered a problem.
--- BEGIN ERROR REPORT dc1da981 --------
Generated 7/26/12 2:37 PM
Minecraft: Minecraft 1.2.5
OS: Windows 7 (amd64) version 6.1
Java: 1.7.0_04, Oracle Corporation
VM: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
LWJGL: 2.4.2
OpenGL: GeForce GT 420/PCI/SSE2 version 4.0.0, NVIDIA Corporation
java.lang.Error: Unresolved compilation problems:
The type mod_SBlocks must implement the inherited abstract method BaseMod.load()
Syntax error on token(s), misplaced construct(s)
Syntax error on token "BlockSTorch", VariableDeclaratorId expected after this token
Syntax error on token "registerTileEntity", Identifier expected after this token
Syntax error on tokens, SimpleName expected instead
Syntax error on token "}", delete this token
at net.minecraft.src.mod_SBlocks.<init>(mod_SBlocks.java:6)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at net.minecraft.src.ModLoader.addMod(ModLoader.java:287)
at net.minecraft.src.ModLoader.readFromClassPath(ModLoader.java:1279)
at net.minecraft.src.ModLoader.init(ModLoader.java:849)
at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:157)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:85)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:12)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:424)
at net.minecraft.client.Minecraft.run(Minecraft.java:786)
at java.lang.Thread.run(Unknown Source)
--- END ERROR REPORT 897c8144 ----------
Mods loaded: 3
ModLoader 1.2.5
mod_elementalcraft elementalcraft
mod_MinecraftForge 3.1.3.105
Minecraft has crashed!
----------------------
Minecraft has stopped running because it encountered a problem.
--- BEGIN ERROR REPORT 1e59182b --------
Generated 7/26/12 4:53 PM
Minecraft: Minecraft 1.2.5
OS: Windows 7 (amd64) version 6.1
Java: 1.7.0, Oracle Corporation
VM: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
LWJGL: 2.4.2
OpenGL: AMD Radeon HD 6570 version 4.1.10428 Compatibility Profile Context, ATI Technologies Inc.
java.lang.NullPointerException
at net.minecraft.src.BlockCcop.updateRender(BlockCcop.java:48)
at net.minecraft.src.BlockCcop.randomDisplayTick(BlockCcop.java:28)
at net.minecraft.src.World.randomDisplayUpdates(World.java:3659)
at net.minecraft.client.Minecraft.runTick(Minecraft.java:1874)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:819)
at net.minecraft.client.Minecraft.run(Minecraft.java:747)
at java.lang.Thread.run(Unknown Source)
--- END ERROR REPORT 4fd622c1 ----------
Mod_elementalcraft:
BlockCcop:
ModelCcop:
TileEntityCcop:
TileEntityCcopRenderer:
What Do You Mean By That? What Specifically?
Help Please
This may just be my OCD speaking, but I am anal when it comes to optimizing code, and I see a very easy way to optimize this function in your cables....
[color=#000000] [/color][color=#000088]int[/color][color=#000000] block [/color][color=#666600]=[/color][color=#000000] mod_[/color][color=#666600]****.****.[/color][color=#000000]blockID[/color][color=#666600];[/color][color=#000000] [/color][color=#880000]//Int To Check Agains[/color]
[color=#000000] [/color][color=#660066]TileEntity[/color][color=#666600]****[/color][color=#000000] TE [/color][color=#666600]=[/color][color=#000000] [/color][color=#666600]([/color][color=#660066]TileEntity[/color][color=#666600]****)[/color][color=#000000]par1World[/color][color=#666600].[/color][color=#000000]getBlockTileEntity[/color][color=#666600]([/color][color=#000000]par2[/color][color=#666600],[/color][color=#000000] par3[/color][color=#666600],[/color][color=#000000] par4[/color][color=#666600]);[/color][color=#000000] [/color][color=#880000]//Get The TileEntity Of A SINGLE Block[/color]
[color=#000000]TE[/color][color=#666600].[/color][color=#660066]Up = [/color][color=#666600]([/color][color=#000000]par1World[/color][color=#666600].[/color][color=#000000]getBlockId[/color][color=#666600]([/color][color=#000000]par2[/color][color=#666600],[/color][color=#000000] par3[/color][color=#666600]+[/color][color=#006666]1[/color][color=#666600],[/color][color=#000000] par4[/color][color=#666600])[/color][color=#000000] [/color][color=#666600]==[/color][color=#000000] block[/color][color=#666600]); [/color][color=#880000]//Check If a cable is there[/color]
[color=#000000]TE[/color][color=#666600].[/color][color=#660066]Down[/color][color=#000000] [/color][color=#666600]= [/color][color=#666600]([/color][color=#000000]par1World[/color][color=#666600].[/color][color=#000000]getBlockId[/color][color=#666600]([/color][color=#000000]par2[/color][color=#666600],[/color][color=#000000] par3[/color][color=#666600]-[/color][color=#006666]1[/color][color=#666600],[/color][color=#000000] par4[/color][color=#666600])[/color][color=#000000] [/color][color=#666600]==[/color][color=#000000] block[/color][color=#666600]);[/color]
[color=#000000]TE[/color][color=#666600].[/color][color=#660066]Left[/color][color=#000000] [/color][color=#666600]=[/color][color=#000000] [/color][color=#666600]([/color][color=#000000]par1World[/color][color=#666600].[/color][color=#000000]getBlockId[/color][color=#666600]([/color][color=#000000]par2[/color][color=#666600]+[/color][color=#006666]1[/color][color=#666600],[/color][color=#000000] par3[/color][color=#666600],[/color][color=#000000] par4[/color][color=#666600])[/color][color=#000000] [/color][color=#666600]==[/color][color=#000000] block[/color][color=#666600]);[/color]
[color=#000000]TE[/color][color=#666600].[/color][color=#660066]Right [/color][color=#666600]= [/color][color=#666600]([/color][color=#000000]par1World[/color][color=#666600].[/color][color=#000000]getBlockId[/color](par2-1, par3, par4) == block);
TE.Front = (par1World.getBlockId(par2, par3, par4+1) == block);
TE.Back = (par1World.getBlockId(par2, par3, par4-1) == block);
}[/color]
Now, this probably wouldn't make much of a difference on its own, but for someone like me who adds about 50 mods to minecraft, if every mod creator spent time optimizing their code, you would defiantly see a difference!