Jump to content

olrustyeye

Members
  • Posts

    26
  • Joined

  • Last visited

  • Days Won

    1

olrustyeye last won the day on June 8 2017

olrustyeye had the most liked content!

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

olrustyeye's Achievements

Tree Puncher

Tree Puncher (2/8)

3

Reputation

  1. Perfect. Sounds like an ideal situation for me. I went to college and took HTML + CSS but mostly focused on Java and C++. I never quite got a niche anywhere with it and that wasn't my focus as far as degreewise. I now work for a technology company and I really really want to get much better at coding in general. Beyond arrays loops and methods. I think this is a good place to start for sure!
  2. Lol, I don't think you guys get what I'm saying. I'm literally just wanting to do this as an exercise to help me understand the more advanced features of java. Nothing more. In the process I simply was stating that it would be nice to have a reference guide similar to google does for their scripts. While i'm already going through the code I might as well do that. My question was is it actually going to teach me anything?
  3. I think you misunderstand. By dissect I mean go through the code and pull out the methods and how they work. Obviously anyone can see the code. I don't mean editting anything. Much like you'd diagram a sentence I want to do the same to the minecraft code.
  4. I modded minecraft back in 1.3 and 1.5. Fun fact I actually owned the One Stop Mod Shop way way long ago haha. Things have changed, but the syntax on the basic stuff like blocks are the same. Find what version the book is using and switch to that go through it and then all you'll need to do is update your syntax!
  5. I wish there was more documentation. Sadly it's severly lacking. Not for forge's lack of trying but things change so much and few people actually want to go through the code and find things. That being said there is some pretty useful stuff here. https://mcforge.readthedocs.io/en/latest/ Nothing like what you're looking for but it's a good resource for what is there.
  6. Welcome! A few important things. 1) It's best if you use the code quotations tool in the forum or use Pastebin to show us the code. 2) It's super helpful if you let us know what version you are running. It also does not work with me and the reason is there isn't a ChatComponentText in the Util's as far as I can see. Probably it was moved to a different name/function. My guess is that you'll need to find updated code for this particular portion. I see a "ChatAllowedCharacters" but thats it for chat under the Util's hierarchy. Sorry. Thats the best I can do for you :(. Hopefully someone smarter has a better idea!
  7. Hmm. I have ADHD and I hyperfocus, so unfortunately there is no stopping me. It's only prolonging the inevitable. My solution I think is to slam my head against my desk until I go into a coma. Then I wont have to deal with this... haha. No but seriously. I was afraid of that. Looks like a lot of hacking, which means I'll put it off for a while until I understand the biome/temperature/entire game mechanics a bit better. Also I never considered the impact a mod like this would have on the Nether and The End. Although it doesn't rain there or anything I edit in the overworld will be edited there and could cause issues later on. Why do I like coding again? Why can't I be into gardening or something?
  8. One thing I want to add in my mod is seasons. I remember a while back a seasons mod which actually had seperate season where you woke up out of bed and BAM it was winter. What I want to do is have a ease of transition and unpredictable. What I want to know is how hard is this going to be. I would say my java experience is about a 3/10. I've taken a few classes and made a text game, but I'm not experienced enough to really hard code something like a forge API. My initial thoughts on this project is to look at the temperature code already in the Biomes and begin there to run something every day which rerolls the temperature as it were. and depending on the biome it would fluctuate in a 28 day cycle of 4. The idea would be as it gets colder rain would become snow. Getting more advanced I'd like to turn the biome color brown in fall-spring then green in the spring-fall. So again my question is: Is this WAY above my head and should I spend more time coding other things for now while I learn? Or is this something that's pretty easy to code? I'd rather not post 100 topics on the modder support asking how to do this or that. Nor would I like to waste my time on a mod that I'm not ready to write. Thanks for the help!
  9. I'm very interested in dissecting the minecraft code for myself. I really want to learn more Java coding, and I figured going through the code and pulling out the methods and commenting how it works would be a great way to do this. I was just wondering about if this would be useful to others/the modding community? The obvious answer is yes of course, but I also don't know if someone has already done this, or if going through he code is even worth my time? I was wondering what people thought? Am I crazy and probably going to lose interest? Or is this something thats worth the effort?
  10. I'm currently working on a bit of code to access the drops for Granite, Diorite and Andesite. I little secret: I'm trying to make a geology type mod where theres a chance of dropping certain things while digging in the mines. Anyways. Here's my code right now. https://pastebin.com/GEV33S4j Here's what I've done for tests Created a new itemstack accessing the Granite by the metadata. It works applies to ALL stone rather then just granite. I've tried using the name Granite. Doesn't work either. I can't use idea because I believe (And I may be wrong) that the reason for meta data is many blocks under ONE id. I feel like the answer may be pretty simple. So I'm hoping someone can tell me I'm a noob and to use minecraftmagic.dowhatIwant(Granite);
  11. Holy crap... this is powerful stuff! It's funny how I'm not thinking in Java terms sometimes. I think I remember back in my college days (Now 4 years ago JEEZ) using lists. I totally forgot how easy they are. Thank you!!!! This is solved! For those wondering reading this in the future here is the key: if (event.getState().getBlock() == Blocks.BLOCK_YOU_WANT_TO_EDIT) { event.getDrops().add(new ItemStack(YourModItemOrBlock.Item_Or_Block, Number_Of_It)); //This adds the item or block you want to // You want to add to the block. ListIterator<ItemStack> drops = event.getDrops().listIterator(); //This Gets the drop and puts it into a list of ItemStacks while(drops.hasNext()) // Using a while loop so we don't get out of the bounds of the list { ItemStack element = drops.next(); //gets the next itemstack in the list if(element.getItem() == Block/Item.BLOCK_OR_ITEM_YOU_WANT_TO_EDIT) // Does the list Item also match the item you want gone? { drops.remove(); //remove it! } } } Now that is some pretty beautiful code. Thanks for the help everyone I learned a TON from this little exercise!
  12. Yes!!! I got it to work. I don't love the fact I'm casting "element" into an itemstack I feel like that can be refined. But I have another issue I encountered. This code does NOT work with redstone. It's only removing one of the redstone. It's interesting because it should be checking it over and over until it deletes all of them right? Everything else works like a charm! if (event.getState().getBlock() == Blocks.LIT_REDSTONE_ORE){ Utils.getLogger().info("IronBlock Accessed. This method is Working"); event.getDrops().add(new ItemStack(Blocks.DIAMOND_BLOCK, 1)); ListIterator drops = event.getDrops().listIterator(); while(drops.hasNext()){ Object element = drops.next(); Utils.getLogger().info(element); if(((ItemStack) element).getItem() == Items.REDSTONE){ event.getDrops().remove(element); Utils.getLogger().info("WE DID IT!"); } } } if (event.getState().getBlock() == Blocks.REDSTONE_ORE){ Utils.getLogger().info("IronBlock Accessed. This method is Working"); event.getDrops().add(new ItemStack(Blocks.DIAMOND_BLOCK, 1)); ListIterator drops = event.getDrops().listIterator(); while(drops.hasNext()){ Object element = drops.next(); Utils.getLogger().info(element); if(((ItemStack) element).getItem() == Items.REDSTONE){ event.getDrops().remove(element); Utils.getLogger().info("WE DID IT!"); } } } hehe well this isn't the ONLY issue actually. I"m also having an issue of trying to access the metadata of for dyes for lapis ore. I think I might be able to figure that one out, but if not I might be back.
  13. if (event.getState().getBlock() == Blocks.IRON_ORE){ Utils.getLogger().info("IronBlock Accessed. This method is Working"); event.getDrops().add(new ItemStack(Blocks.DIAMOND_BLOCK, 1)); ListIterator drops = event.getDrops().listIterator(); while(drops.hasNext()){ Object element = drops.next(); if(element == Item.getItemFromBlock(Blocks.IRON_ORE)){ event.getDrops().remove(element); Utils.getLogger().info("WE DID IT!"); } } } So I got the whileloop going now, my issue is I think I'm deleting the element rather then a block in the element. I'm not sure how to tell it to remove what I want it to at this point. Actually theres a problem with the If statement because it's not returning me...oh I think I might know what the issue might be. Element is an itemstack not an item... Still before I go test that. It's not returning true so theres an issue there.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.