Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

HuskyBlueFire

Members
  • Posts

    13
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

HuskyBlueFire's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Many thanks for the reply, I look forward to checking out your tutorials. --- Also, apologies for posting in the wrong subforum
  2. Hi guys, Bit of a hypothetical question here but, what is the scope for implementing your own custom mob AI? I guess the main questions are; How much of the original mob AI can be easily overridden? Have many people done this in the past? I have a fairly well sketched out logic and prioritisation pseudo-code for a new mob AI and figured I'd ask what I may be getting myself into before heading down a potentially painful path. Cheers!
  3. Would this not limit you to already existing mobs within Vanilla (or any modpacks the clients on your server have in common)?
  4. Best thing to do is supply something like: short summary of the basic principle you are trying to achieve how you have approached the problem so far the code you have used in this approach what you believe the problem is with your code any error reports relating to the problem a thank you ahead of time
  5. @Override public int onBlockPlaced(World world, int x, int y, int z, int a, float b, float c, float d, int e) fixes it perfectly Thank you very much , and another Java lesson learned for me today!
  6. Haha perfect timing! I'd just finished fudging it with multiple blocks, it worked but it made me feel dirty. Thankyou, however I'm still not quite there. After popping @Override above the Public int onBlockPlaced, i receive the error: The method onBlockPlaced(World, int, int, int) of type BlockNumenorStone must override or implement a supertype method I think that this is likely just me being very noobish with the Java language, so I understand if I don't get a reply to how to resolve that.
  7. Ok, after a bit of headscratching I can think of a workaround... If I have two blocks, same texture, however one is placed by the player and one is the spawned one. Call them block1 and block2 with position x y z being the initial placement position of block1. on placement of block1 place block2 at (x, y, z) for counter = 1 to countercap if (x,y+counter,z) = air then place block2 at (x, y+counter, z) else break Where countercap is the max distance for the blocks to go. It's pretty messy, but until i figure out how to differentiate between the player placing a block and it just being added it'll have to do...
  8. Ok, I broke it down to absolute basic level to debug and these are the two I have: public void onBlockAdded(World world, int x, int y, int z) { System.out.println("I Added"); world.setBlock(x, y+1, z, this); } public void onBlockPlaced(World world, int x, int y, int z) { System.out.println("I Placed"); world.setBlock(x, y+1, z, this); } Now, the onBlockAdded works no problem (except making a never ending pillar into the sky of course), but the onBlockPlaced doesn't even run it's debug print. I'm clearly using it incorrectly but I can't figure out how it would be used. Moreover, I can't say for sure that I know that onBlockPlaced only runs on player placement (I'm kinda just going off the name), which lead me to believe I may need onBlockPlacedBy, for which the syntax becomes less clear.
  9. Hi, I have searched the death out of this for a few hours now and come up empty. Basic principle of what I'm doing is that if a player places a block, that block will place a number of other blocks relative to it's position. I can get onBlockAdded to work no problem, except that's called every time the block is added in game even if it's not by the player, as you can imagine this doesn't end well with each block replicating into more and more. So I found onBlockPlaced but I simply cannot get it to work no matter what I do. does anyone have an example usage of onBlockPlaced? or even onBlockPlacedBy if that would be the more correct approach? Many thanks in advance kind people
  10. Excellent news, I was just far to glued to doing what I was told like a complete sheep. I suspected as much! Many thanks!
  11. Hi guys, Bit of an embarrassing one this one... I like to think of myself as not a complete idiot, however this has me stumped and I'm falling at the first hurdle! I have followed (various) setup instructions to get up and running with a forge modding environment. This is what I've done and where I'm stuck: - have JDK sorted (jdk-7u65-windows-x64) - downloaded "forge-1.7.10-10.13.0.1180-src" - unzipped forge to new folder & renamed folder to "forgeModding" - ran command window inside said folder - typed gradlew.bat setupDecompWorkspace --refresh-dependencies - let it do it's thing - typed gradlew.bat eclipse - let it do it's thing - downloaded standard version of Eclipse (eclipse-standard-luna-R-win32-x86_64) - unzipped to new folder - ran Eclipse and selected the workspace as the "Eclipse" folder within my "forgeModding" folder - Within eclipse, following various tutorials instructions I go to Run > Run Configurations - Right click on Java Application and select new - renamed the new one as "runClient" and then (this is where I fail) try to "Choose the 'Forge' project as the Project and either type or find 'net.minecraft.launchwrapper.Launch' as the 'Main class'" I cannot choose the forge project, nor can i subsequently find net.minecraft.launchwrapper.Launch From this http://www.minecraftforum.net/forums/mapping-and-modding/mapping-and-modding-tutorials/1571599-1-7-2-modding-with-forge-1-jdk-eclipse-forge-and Any help with this would be very welcome, I know it's tedious answering the repetitive noob questions so I very much appreciate your time. I have searched but as yet found nothing to solve my problem. Many thanks
  12. Simple as that... >.< Haha, I guess I've been battling with it for long enough I expect it to be more difficult. Can't wait to get home and try this out! Have a relaxing day of VBA programming until then though Thanks guys Glad I signed up here now. Husky EDIT: So the coding might be like this: public int getBlockTextureFromSide(int sideNumber) { if(sideNumber==0) { return 6; } if(sideNumber==1) { return 7; } if(sideNumber==2) { return 8; } if(sideNumber==3) { return 9; } Else { return 10; } } I'm quite new to Java programming and wrote the above in notepad so forgive any errors. I'm wondering if there is more elegant way of writing this, perhaps select case? I found some code by googling, adapted it, and wonder if this is right? public int getBlockTextureFromSide(int sideNumber) { Switch (sideNumber) { Case 0: return 6; Case 1: return 7; Case 2: return 8; Case 3: return 9; Case 4: Case 5: default: return 10; } }
  13. Hi I'm currently trying to figure out how to get different textures on different sides of a block, while using the infinite terrain / sprite index. I did this before in modloader fine, but in forge using the terrain.png style approach I'm a bit stumped. I have tried for hours scouring the net for answers and the few I found were just vague. Maybe I'm being blind and/or stupid but hopefully someone can help. I have the textures working fine using the mods terrain.png, I just need to know the code that applies a different index number for each side of the block in question. Thanks in advance, Husky NB: Work I've referenced http://www.minecraftforge.net/wiki/How_to_use_infinite_terrain_and_sprite_indexes
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.