Jump to content

Zetal

Members
  • Posts

    113
  • Joined

  • Last visited

Everything posted by Zetal

  1. This would be designed solely for fresh servers, so if I replace the vanilla crafting recipes with my own and add a handler for EntityItem joins world event, that should cover everything, right?
  2. I appreciate the effort lars, but that isn't what I'm looking for, as I explained in the original post. The method you describe sets the max damage for an Item, but I need to set the max damage of an ItemStack.
  3. I'm afraid that I very much would need this for vanilla items, but if there is no other way to do it without making my own items, then I could probably just duplicate every instance of a Minecraft item with durability and replace it with my own using Forge events. Obviously that wouldn't be ideal, so if there's another way I would appreciate a different method, but well... I'll do whatever I've got to do.
  4. public int getMaxDamage() { return this.item.getMaxDamage(this); } This method is located in the ItemStack class. It references the Item class, which then gets a universal maximum damage for all ItemStacks of an Item instance. In other words, if I want to set the maximum damage of just a specific ItemStack, I am unable to. I've hijacked the crafting events, so when something is crafted I can set it's current damage, but I would like to be able to set the ItemStacks MAXIMUM damage based on the Blacksmith level of the player who crafted it. In previous unreleased versions, I accomplished this by performing base-changes to the ItemStack class, but for 1.8 I'm turning over a new leaf and avoiding the use of base-class changes entirely. I've managed to solve the vast majority of my old features using varying methods, including Java reflection when needed or just flat-out replacing what I'm trying to change with a new class. In this case, even if I wanted to do that, it isn't an option since the ItemStack class is final. So! Given all of this, I wanted to check in with the forum, and hopefully you guys could help me with some suggestions on how I could accomplish what I need to accomplish? Workarounds are A-OK as well. Thanks!
  5. Well, anyway, is there a better way of getting the amount of something that has been smelted?
  6. Well! You learn something new every day. Thank you for helping me clear that up! Onwards! I don't see any reason to not just add a new variable to the ItemSmeltedEvent "amount" that takes in the "field_75228_b" variable. Would be a bit more work, but accomplish the same thing I had intended. And I'm almost positive it wouldn't affect anything, since "field_75228_b" is set to 0 immediately afterwards anyways.
  7. I've looked into it as much as anyone can be expected to and I don't see how that would affect anything. "stack" is a parameter passed in, so changing it wouldn't affect anything outside of the method. In this case, another solution would be adding an 'amount' variable to the "firePlayerSmeltedEvent" method but simply setting the stacksize to the "field_75228_b" is the easier solution. Thanks for the response. I'd appreciate an explanation, as extensive searching hasn't led to your conclusion.
  8. If anyone in Olympus (forge gods, hear me!) is interested in this issue, I believe it can be fixed in SlotFurnaceOutput at line 99 by changing this.field_75228_b = 0; net.minecraftforge.fml.common.FMLCommonHandler.instance().firePlayerSmeltedEvent(thePlayer, stack); to stack.stacksize = this.field_75228_b; net.minecraftforge.fml.common.FMLCommonHandler.instance().firePlayerSmeltedEvent(thePlayer, stack); this.field_75228_b = 0;
  9. ItemSmeltedEvent is called when a player takes the finished item out of the Furnace. They can do this by either clicking the item and picking it up on their cursor (this functions, and the stack size is reported correctly) or they can hold down shift and left-click the itemstack, which does not correctly report the stack size. I'm using Forge 1.8, Build 1433.
  10. Regular clicking when there are 3 stacks gives a stack size of 3. Shiftclicking when there are 3 stacks gives a stack size of 0. How can I get the true stacksize?
  11. Decided to use your PopulateChunkEvent but for some reason it left some trees randomly un-changed. I changed your code from 'Pre' to 'Post' and that fixed it. Thanks! If anyone knows why the substituteAlias thing didn't work though, I'm interested in that regardless just out of curiosity at this point.
  12. Went ahead and updated to the most recent version of Forge after seeing some posts about substitution alias not being complete in older versions, but it still does the same thing. It doesn't replace logs with my block, only destroys logs completely.
  13. After some poking around in general, I found the "addSubstitutionAlias" method, which seems like it might do what I want? Anyways, I set that up real quick and... well, it sorta... worked..? I replaced all of the logs. It's just... I apparently replaced them with nothing? All of the trees spawned without any logs whatsoever. And trying to place the logs using creative places... nothing.
  14. That would probably work for the logs but without a solution for the leaves I would need to pursue an ASM solution regardless. If I'm going to have to get ASM working no matter what then I may as well use it for both, right? Disabling leaf collision just for specific players... I can't think of a way to do that without touching the core code.
  15. I'm okay with that. Mine aren't really meant to work with other mods, but regardless if you have any suggestions for avoiding ASM in this case without reducing the gameplay value of the end-result then I'm all ears. Alternatives would be great, especially since ASM is being such a butt. But right now it's the best way to get the best results that I know of.
  16. Hey guys, I've been trying to make it so that a player can move through leaves and climb logs like a ladder if and only if the player climbing it is a certain class and level (using other stuff, don't worry about it) which worked great back when I was doing core mods, but I've seen the light and I'm now trying to update my mods for 1.8 using no core mods whatsoever. It's been pretty smooth sailing for the most part thanks to some of the new hooks that have been introduced, but I can't seem to think of a clever way to make the leaves and logs behave the way that I want them to. Obviously there are some hackish workarounds, such as hijacking the world gen completely and replacing all trees with my custom logs and leaves, but, not wanting to have to do something so extreme, I decided to take a look at ASM and see if I could just replace the blocks at the source. It hasn't been going that great. After some google searching I found an old topic for 1.7.2 with an easy-to-use method that they said worked. I copied it in, fixed up the errors, and it seems to work great right up until the game crashes. Debug shows that the blocks are successfully replaced with my new ones, but the game then promptly crashes because "availabilityMap references empty entries for id 198." which seems odd to me since I don't actually touch id 198 but what do I know. Full error: My code: Original 1.7.2 post/solution: http://www.minecraftforge.net/forum/index.php/topic,16692.msg84890.html#msg84890
  17. Scratch that, just looked at the new method required by commands. I'm willing to bet the '/help' command uses "public String getCommandUsage(ICommandSender icommandsender)" to populate its list- and since mine returns null, it causes an error. Just ran it and tried the command- it works fine now. Issue resolved.
  18. Hrm. I'll try. And all of the commands are empty copies of this: Except replace 'scm' with each commands unique tag, including (in order): "checkinv", "checkchests", "createshape", "acs", "econ", "scm", "ccs" All of the actual command logic is handled in a CommandEvent handler class, where I check to see which command it is by using "event.command instanceof CommandSpecializations" as an example. Obviously all of the others are the same but... that's about all that the commands do. Besides "/help" all of the commands I have work.
  19. I had an entity rendering just black earlier the other day, I believe it was because the block had the correct texture, but the entity did not. Of course, mine still isn't working properly... (it's all solid red, now...) so I guess I'm not in a position to give out help advice.
  20. Double-check that you have a texture located in (yourrootfolder)/src/main/resources/assets/textures/model/windmill.png
  21. Using the most recent 'Recommended' build for 1.7.10 Crash report: Haven't touched the core classes, so I'm a little dumbfounded as to why it would be crashing on a vanilla command. I'm assuming I've done something stupid with incorrectly registering my own, custom commands, but I'd appreciate some guidance here. It's a minor bug, but it is also one that crashes the game so... I'd like to get it worked out.
  22. Solved it. I had ContainerBrewingStand unmodified in my project, yet it was still being 'reobfuscated'. Since it was unmodified, I deleted it before remodding, and it works now. Hooray!
  23. Yea- Probably not. Ignoring the hassle of finding workarounds speeds up my workflow and serves the dual purpose of causing issues when working with other mods. This isn't meant to work with anything else. =P But moreso, it just lets me work faster. On a continuation of this topic, I still haven't been able to sort out the classdefnotfound error for ContainerBrewingStand. Everything works flawlessly in Eclipse, and I can actually join the eclipse server using the recompiled/reobfuscated client. Does anybody know what could be causing something like this? I'm at a loss.
  24. Haha. Maybe I am- It's a bit late now though, I should think. It was just faster to edit base classes than look up how to do it forges way, in most cases. Though I think the vast majority of them are necessary. As for the second question, well, it does quite a lot. I guess it should, with that many base edits. Just so I don't waste both of our time (I'm planning on posting an info summary topic relatively soon on the modpack) I'll keep it short: the mods revamp multiplayer MC. Adds a heightmod, a class system, fully animated bows with new arrow types, new armor, GUI's, protected zones with clientside hooks (ie, blocks don't even have cracks if the zone is protected), proper tool requirements, custom chat systems, and a lot of other more minor stuff. Things I have in the works; a full-blown economy (with custom GUI's and such) and player-made NPC villages designed to work with the economy and provide an income. TL;DR version is that it's meant to make multiplayer MC more viable as a longterm source of entertainment and encourage players to work as part of a community, instead of treating a server like a large communal bragging ground for who can build the largest golden e-peen. We're holding closed alpha testing with the mods we have now, and it's going really well! Uhhh, back on topic though, I finally got 1.6.2 to run (thanks to you! can't type enough hearts for you.) but when I start a singleplayer world, it says that... ContainerBrewingStand is missing? What. Bahaha. I'll probably sort this out eventually. Thank you so much!
  25. Do you have any place you recommend to start trying to learn how to coremod? Also, do you think it would be worth it for a mod with >140 vanilla classes modified in some way? I just want to make sure I spend my time in the most efficient way possible.
×
×
  • Create New...

Important Information

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