Everything posted by Draco18s
-
[SOLVED] Change block properties in an if statement.
Use block metadata. When the block is placed, set its metadata to a value based on its position (etc.etc.) and then create a tile entity based on the metadata using: public TileEntity createTileEntity(World world, int metadata) { }
-
[SOLVED] Change block properties in an if statement.
You haven't actually used a TileEntity have you? When you (the modder) creates one, you don't have block coordinates. You only have the world: @Override public TileEntity createNewTileEntity(World world) { return new MyTileEntity(); } Vanilla code handles the rest.
-
Transparent block help
You've gone about things in a really weird way, took me almost 10 minutes to figure it out. And... I have no idea.
-
Transparent block help
Look at BlockIce to figure out what you're doing wrong. You gave the block a transparent texture, but didn't tell the rendering engine that it is a transparent block.
-
[SOLVED] Change block properties in an if statement.
if(!this.worldObj.isRemote) { //I am on the server, therefore all objects I can see are on the server }
-
Function called for Items in Chests?
I'm actually avoiding using events for this mod. I've decided to rename this "bug" as "feature."
-
Function called for Items in Chests?
This function is not called for item frames. It is only called for living entities as indicated by the parameter type passed (and tested anyway, no dice). Tested a few other functions, none of them are covered either.
-
Function called for Items in Chests?
I will look at that, thanks!
-
Function called for Items in Chests?
My signature arose from the fact that I tried to kindly remind someone that they shouldn't post in mod threads about updates. I was all "hey, I just found out myself, but your post is technically against the TOS, didn't want to get you in trouble, just thought I'd let you know." Someone decided I was being a total asshat. Flames ensued. I ended up reporting my own post to the mods for calling myself an asshole. So I created my signature in an effort to deter such events in the future.
-
Function called for Items in Chests?
You mean the one I'm working on? At last check I have over 67 million different items which may or may not have enchantments.
-
[SOLVED (Maybe)] Tile entity field not setting
Welcome to client-server disparity. The alternations you're seeing are Client: not-set, Server: set, Client: not-set, Server: set You need to start using packets.
-
Forge and FML
If you are using any of the FML (or ModLoader) classes, you're doing it wrong. You need to find out the correct Forge class/method to call (use Eclipse's navigation tools to go look at the FML method to find the Forge method it calls, then change your code).
-
Next use on X Time
So add a variable which is a timer that gets decremented to 0 every onUpdate. If the timer is 0 when the player interacts with it, set the timer to 6000 (5 minutes) or whatever
-
[SOLVED] Change block properties in an if statement.
if(player.getHeldItem() == new ItemStack(MagicLights.lightStaff)){ That is not how you check to see if two item stacks are equal. You need to use the ItemStack.equal(stack, stack) function.
-
ROD{Version 1 for Minecraft 1.6.4} [The Realm Of Domarne Mod] (bin) Unloaded->E
package worldiswar28.Domarne.client does not match ROD.client.RODClientProxy
-
[SOLVED] Change block properties in an if statement.
This is where your IDE comes in. If you look at the error it tells you that the objects don't match and to add a cast. player = (EntityPlayer) w.get(i);
-
ROD{Version 1 for Minecraft 1.6.4} [The Realm Of Domarne Mod] (bin) Unloaded->E
java.lang.ClassNotFoundException: ROD.client.RODClientProxy It can't find your client proxy class.
-
Questions about Proxies and main class
Proxies allow you to register renderers, because the server doesn't HAVE a renderer, so trying to do so will throw class not found errors.
- Next use on X Time
-
Forge and FML
Forge is an API, of sorts, to allow mods to work without creating conflicts due to all the base-class editing. Instead Forge does it once and mods just use hooks to make the changes they need. ModLoader is an API, of sorts, that allows mods to work without creating conflicts, blah blah blah, written by different authors with a slightly different feature set. FML (Forge ModLoader) is an API-API that allows Forge to run ModLoader mods without needing ModLoader installed.
-
[SOLVED] Change block properties in an if statement.
That locates every player inside a 65x65x65 cube (I meant to make it smaller, forgot) and then loops through the list of players inside that volume, and gets their currently active item. All you have to do then is look at that item and decide if that's the item you want to have break the block or not.
-
[SOLVED] Change block properties in an if statement.
His problem is figuring out if the player is holding a given item. Which is harder. Your best bet is to poll the world for all Players in interaction range (4 blocks) and then check their active item. Here's the hard part: AxisAlignedBB aabb = AxisAlignedBB.getAABBPool().getAABB(xCoord-32, yCoord-32, zCoord-32, xCoord+32, yCoord+32, zCoord+32); List w = worldObj.getEntitiesWithinAABB(EntityPlayer.class, aabb); if(w.size() > 0) { //at least one player in range EntityPlayer player; for(int i = 0; i < w.size; i++) { player = w.get(i); player.getHeldItem();//active item as ItemStack } }
-
Function called for Items in Chests?
And then read that item's NBT data. This isn't "oh, Item ID 1322 increases your health" it "Item ID 1322 {["onOwned":"increaseHealth"}]" vs. "Item ID 1322 {["onOwned":"increaseSpeed"}]" vs. "Item ID 1322 {["onUpdate":"heal1"}]" vs. "Item ID 1322 {["onRightClick":"causeLightning"}]" vs.... Anyway, if we're going to call things features, I think it would be a more interesting "feature" that items in frames are permanent boosts. It's like a litch's phylactery! It just isn't meaningful in SSP: no one can try and sneak into your base and "destroy" your powerbase.
-
Function called for Items in Chests?
It's not triggered before OR after, none of the item's functions are called. How would you make an item that gives the player bonus health while they are carrying it? I am trying to do this without events, but if I have to for this case I will.
-
Function called for Items in Chests?
Actually, it's not. I checked.
IPS spam blocked by CleanTalk.