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

Maexx

Forge Modder
  • Posts

    41
  • Joined

  • Last visited

Converted

  • Gender
    Male

Recent Profile Visitors

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

Maexx's Achievements

Tree Puncher

Tree Puncher (2/8)

12

Reputation

  1. Don't do that… Look at a minecraft.jar in your normal minecraft installation - the classes, methods and fields there have weird names - that's because mojang obfuscate their code, so nobody can really get what it all means by just looking at it. MCP deobfuscates it when you install it, so you can look at the minecraft code and see what it means. But when you want to use your mod with a normal minecraft installation again, you need to reobfuscate it again, so all the class, method and field names fit. So basically what you have to do is run recompile.bat (or .sh when on a mac), that file should be in your mcp folder. Then run reobfuscate_srg.bat (or .sh when on a mac). After that, all your class files should end up in "[mcp-root]/reobf/minecraft/". You need to copy your image files there yourself. It all should work, assuming you have a normal mcp installation and all your mod files are in "[mcp-root]/src/minecraft". If they aren't, you have to copy them there.
  2. Did you recompile and reobfuscate your mod before using it in normal minecraft?
  3. I am the creator of the Buildcraft-Tools add-on (link on my signature), and I would like to have the modder status. Thanks, Max
  4. Awesome! If I only had known this before splitting all the textures…I did it with GIMPs "Guillotine" feature, wasn't that bad either, but this is much faster. Thanks!
  5. Hello all! In the mod I am working on I have many recipes that use similar Items. Right now I am registering the recipes all manually, but I wanted to automate it a bit by using Lists. I would just do several List<ItemStack> that all contain the Items that are similar to each other and then register them all at once with a while of for loop. So far, so good. But because I have also included some alternative Recipes using the Items of other mods, I have to add some Recipes during PostInit. That's why I'd like to register all recipes, including the "mod-vanilla" ones during PostInit, but that's not the way people usually do it. I know it works, but I don't know if there will be any disadvantages when doing that. I just want to make sure that nothing is going to get messed up, so if you know any disadvantages, or if you know for sure that everything will be fine, please tell me Thanks and Greetings, Max
  6. If you've done it with a block before, you've probably done a check for the Blocks TileEntity in the GuiHandler and probably also used it in the Container class, the item doesn't have a TileEntity of course. You'll have to leave that check out and change the Container class around a bit.
  7. I guess I'll go with replicating the potion effects then
  8. Hello all, In my mod I have it so that when pressing a key under special circumstances the player gets a potion effect, or rather a lot of effects. I've been searching for methods to add Potion Effects without the annoying GUI-Display (which shifts your Inventory over to the right) for quite a long time, but I haven't found anything good yet. I tried removing the effects as soon as you open the Inventory, but it has a tiny very annoying delay, I tried doing it with ".performEffect", which doesn't work for all potions, and I tried replicating the effects of the potions, but there are some (like Night-vision) that are pretty hard to do. I know where the Inventory Render gets called (InventoryEffectRenderer.displayDebuffEffects), but I can't hinder minecraft from doing it… Now my question, is there any good way to add potion effects without the display in the Inventory? Thanks, Max
  9. Weird…try adding a different effect, it should work if you've done everything correctly, again, I am using pretty much exactly the same code… And yes I know how to do key bindings, I'll explain it if you want
  10. I suggest checking it with System.out.println(player.capabilities.allowFlying); I am doing it this way too, and it is working (although I'm not adding flight), so the problem has to be there…
  11. So you want the player to only be able to fly when he has the full set of armor on ? Did you do it in the server-tick handler and did you put onPlayerTick in the TickStart function like I wrote ? See if you registered the TickHandler properly. If that doesn't work, try something different besides allowFlying, like adding potions, maybe that doesn't work that way with the flight…
  12. You should just be able to do something like this: private void onPlayerTick(EntityPlayer player){ if (player.getCurrentItemOrArmor(4) != null) { ItemStack helmet = player.getCurrentItemOrArmor(4); if (helmet.getItem() == YOUR_ITEM) { player.getFoodStats().setFoodLevel(20); } } }
  13. In your CommonProxy do this: public void registerServerTickHandler() { TickRegistry.registerTickHandler(new ServerTickHandler(), Side.SERVER); } and then call it at Init in your main mod method with "proxy.registerServerTickHandler();" The create the ServerTickHandler class from the CommonProxy, it should already have a bunch of stuff in it and implemet ITickHandler, then change it to the following : @Override public void tickStart(EnumSet<TickType> type, Object... tickData) { if (type.equals(EnumSet.of(TickType.PLAYER))) { onPlayerTick((EntityPlayer)tickData[0]); } } @Override public EnumSet<TickType> ticks() { return EnumSet.of(TickType.PLAYER, TickType.SERVER); } Create a function in there called onPlayerTick like that: private void onPlayerTick(EntityPlayer player){} In there you can then check for the armor with "player.getCurrentItemOrArmor(4)" ore something similar. This will then get checked every tick Hope I could help
  14. You'll need to do it with a ServerTickHandler
×
×
  • Create New...

Important Information

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