Everything posted by Draco18s
-
directional problem
world != World. The first is an instance the second is the class.
-
Changing the color of an item programmatically
Harder to determine a short-term average. *Shrug* Math.power(a,b); Stupider [sic] than **. Probably. I'm still waiting for a computer language that allows for Knuth up-arrow notation.
-
Chunk forgets about the player if they stop moving
Thanks, re-reported back to XCW.
-
[Solved]Configuration Trouble
"It doesn't work" is so...unuseful.
-
[Solved]Configuration Trouble
GameRegistry.registerBlock(fakeBlock, "Fake Block"); And just so you know: Every time it crashes, post the god damn error. It is impossible to solve a crash error without knowing what the error is.
-
directional problem
world.getBlockMetadata((int)x, (int)y, (int)z)?
-
Changing the color of an item programmatically
I meant besides you.
-
Rendering Items In-world
I have reimplemented the datawatcher to NO EFFECT. In the render class: TileEntityTrap te = (TileEntityTrap)world.getBlockTileEntity(x, y, z); if(te != null) { System.out.println("Rendering frame " + te.getRenderFrame()); //this runs once and only prints a 0. } In the tile entity class: public TileEntityTrap() { this.dataWatcher = new DataWatcher(); this.dataWatcher.addObject(0, Byte.valueOf((byte)0)); this.dataWatcher.addObject(1, Byte.valueOf((byte)0)); } public DataWatcher getDataWatcher() { return this.dataWatcher; } public void startSwordRender(int sword) { System.out.println("Starting sword render"); //this prints on activation, as expected this.dataWatcher.updateObject(0, Byte.valueOf((byte)10)); this.dataWatcher.updateObject(1, Byte.valueOf((byte)sword)); this.worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); } public byte getSwordRender() { return this.dataWatcher.getWatchableObjectByte(1); } public void setSwordRender(int s) { this.dataWatcher.updateObject(1, Byte.valueOf((byte)s)); } public byte getRenderFrame() { return this.dataWatcher.getWatchableObjectByte(0); } In the dispenser behavior (sword) class: TileEntityTrap te = (TileEntityTrap) par1IBlockSource.getBlockTileEntity(); if(te != null) { te.startSwordRender(1); }
-
[Solved]Configuration Trouble
Here's how I do things: @PreInit public void preInit(FMLPreInitializationEvent event) { Configuration config = new Configuration(event.getSuggestedConfigurationFile()); config.load(); int fakeID = config.getBlock("FakeBlock", 2000).getInt(); config.save(); fakeBlock = new FakeBlock(fakeID); }
-
Changing the color of an item programmatically
Oh yeah? Well, I predate you! (lol, hipster) I meant that I've overtaken 95% of the forum user base in posts in the last two months. My average posts per day is 3 times what it is for the other prolific users. Not that I see this as an accomplishment, it's just staggering. Math.power(a,b);
-
[Solved]Configuration Trouble
What is the error? (Random guess: you haven't fed your computer cheese lately)
-
[Solved]Configuration Trouble
ALL of his items will have this issue because he's declaring his ID variables twice!
-
[Solved]Configuration Trouble
//class level public static int aluminumIngotID; //function level int aluminumIngotID = NerdSpeakConfig.getBlock("ItemAluminumIngot", 713).getInt(); //a different function mod_NerdSpeak.aluminumIngot= (new aluminumIngotID(aluminumIngotID, Material.iron)); Which aluminumIngotID is being used? The class level one. Which is undefined.
-
Mod won't zip & mcmod.info problems
I've almost done it half a dozen times myself. As for copyrights: You have an intrinsic copyright on everything you create. It's automatic.
-
How do I do This...
That assumes two things: 1) Gravity. Minecraft doesn't really have....gravity. Any object which needs to fall handles its own falling motion, there's no global gravity effect, so a no-clip entity can still say "nope, not fallin'!" 2) That no-clip ignores the ground. It is not unreasonable to have only horizontally based collision ignoring.
-
Changing the color of an item programmatically
Why am I not surprised? Oh right. Leather armor does it. Who here thought to open up Leather Armor's java files and take a peek?
-
issue with detecting blocks
I give up. You need basic java help, which I cannot provide.
-
MC 1.4.7 Arrow texture missing in compiled mod
Check the error log (there's always a forge_log0) for any "texture not found" lines. Post that and your code, along with a screenshot of the folder structure inside your zip.
-
issue with detecting blocks
seriously? x+i y-j z+k
-
Changing the color of an item programmatically
I'd just like to point out that I'm ninth. And a newer user than ALL THE OTHER NINE.
-
issue with detecting blocks
...in place of your current loop..?
-
issue with detecting blocks
You have < 2 right now. Which means it will do 0 and 1, but not 2. Also, it's not centered on your pit trap. for(i=-1;i<=1;i++) { for(j=-1;j<=1;j++) { for(k=0;k<=3;k++ {
-
Adding items to blockcontainer Inventories created during worldgen
You'll never believe what fixed it. world.setBlockMetadataWithNotify((int)c.xCoord, (int)c.yCoord-1, (int)c.zCoord, 1, 3); Had to forcibly set the metadata after creating the block. Because dispensers do this: public void onBlockAdded(World par1World, int par2, int par3, int par4) { super.onBlockAdded(par1World, par2, par3, par4); this.setDispenserDefaultDirection(par1World, par2, par3, par4); } Even the vanilla dispenser has this "problem."
-
issue with detecting blocks
My bad. Ever since they changed things from "setBlock/setBlockWithNotify/setBlockAndMetadata/setBlockAndMetadataWithNotify" to only one function (actually, two) they've thrown me for a loop. You are correct, yours works and passes an implied metadata of 0 and a notify flag of 3. Just out of curiosity: You are doing this with the block on top of stone, yes? It's only clearing a 2x2x2 cube at the moment, and only stone. (Side note: new PitfallHandler(Minecraft.getMinecraft().theWorld, i, j, k); You can just use: new PitfallHandler(world, i, j, k); As the world is passed to the neighborChanged function)
-
Rendering Items In-world
Ah. Try using more than one AABB instead. One for the front of the tractor, one for the middle, one for the back.
IPS spam blocked by CleanTalk.