Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

GotoLink

Members
  • Joined

  • Last visited

Everything posted by GotoLink

  1. It seems you haven't enough programming knowledge to solve your issue. Take some java courses, there are some available for free on the internet.
  2. You can always return your modified redstone block to the original one after some time using scheduled ticks.
  3. If you don't crash, that means your PacketHandler class doesn't even initialize. Which means you don't have packethandler=PacketHandler.class in your @NetworkMod annotation. By the way, correctly opening the GUI is essential, and might well be the source of your problem. It is impossible to send a packet from client to client without going through a server.
  4. Why would you need a Enum ? You have item id, NBT from the ItemStack...to identify an unique item. For easy conversion of inputs to outputs, you can use a Map with the data to convert.
  5. This code Minecraft.getMinecraft() is client side only. You will crash on server if you use it in a class which isn't client side only. Use player.openGui(args) to open a GUI, and handle it with a IGuiHandler. You can leave it to false, it probably isn't necessary. On the contrary, clientSide=true is necessary.
  6. This is probably a poor work-around to handle rare cases where minecarts would be at the same place simultaneously. So that a player would see it.
  7. Remove par3EntityPlayer.setEating(true); it is already done by setItemInUse(args); Also move methods in, and override: @Override public ItemStack onEaten(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { par1ItemStack.attemptDamageItem(2, new Random()); par2World.playSoundAtEntity(par3EntityPlayer, "random.burp", 0.5F, par2World.rand.nextFloat() * 0.1F + 0.9F); par3EntityPlayer.getFoodStats().addStats(2, 0.2F); return par1ItemStack;
  8. Why ? @SideOnly(Side.CLIENT) public Icon getIcon(int par1, int par2) { if (par2 < 7) { if (par2 == 6) { par2 = 5; }
  9. "Instance of" checks are completely useless for this. By the way this solution ItemStack output = currentRecipe.getRecipeOutput(); if (ItemStack.areItemStacksEqual(output, par1)){ recipeList.remove(i); } was already suggested by zedicus 10 posts ago. The moral of this story is that it is better to understand code and to listen to people.
  10. Yes, exactly. Don't ever touch the bin folder, it is the src folder you should change. You should have something like mcp/src/Keep of Metal and Gold/assets/komag/...then textures/blocks for blocks, textures/items for items... pack.mcmeta is completely optional.
  11. Translation: (this is untested by me) Start by decompiling Minecraft with MCP, then launch Netbeans. Create a new Java project with existing sources. Choose location, name...then select the games sources folder /mcp/src/minecraft Now go to your project properties. In libraries, add every library from Mojang, then in run/ compile tests/ run tests tabs, select "sources/compiled tests" and move this line on top of the list, then check the "Generate projects on classpath" box. Now in "run" tab add to the virtual machine options this line: -Djava.library.path=natives_folder_path Where natives_folder_path should be the complete path to the "natives" library folder. If you have below 1.6: In "main class" box, put net.minecraft.client.Minecraft and you are done. If you have 1.6 or further: You should already have included "LauncherWrapper" library. In "main class" box, put net.minecraft.launchwrapper.Launch and in "Arguments" --version 1.6 If you have Forge on top of it, in the "Arguments" box, add --tweakClass cpw.mods.fml.common.launcher.FMLTweaker
  12. When you send a packet, it is recommended to receive it yourself. It also make more sense to send it from your microphone handling class (which is client side) and perform checks and changes on server before sending back the changes to the client.
  13. Now do packets for gui changes.
  14. public static int waterLvl; It is static.
  15. Change the block by overriding updateTick(args).
  16. Blindness doesn't affect mobs. They are AI, not a living player. Blindness makes a player screen go dark, that is all. So what you want is to remove the player entity from the target entity list of surrounding mobs.
  17. "project"/assets/modid/...?
  18. You don't have a break; between case 50 and case 51.
  19. So, what is wrong, you can't include all sources to your project ? Basically, you would have mcpc-plus sources, your plugin sources and your new mod sources. Why use a compiled "plugin" as an external library ?
  20. I think a mod called EE is telling you something is wrong.
  21. Rule #0: Learning is a part of programming. Rule #1: Follow Java naming convention. Rule #2: When you don't know or understand something, search it.
  22. You may want to look at the ChunkEvent.
  23. And that's exactly what he would get with getItems(Random). It isn't a random selection of loot. It is a complete array of randomized loots. Read the code, don't just assume by the name or argument. By the way, one can also use WorldGenDungeons.field_111189_a (though this list is incomplete, as the enchanted book item is added later to the chests list).
  24. Man, when you subclass and rewrite a parent method, you are overriding it. If bukkit doesn't allow this, then it is really crappy. @Override is only a tool to keep in track with parent methods, telling you if code is correct. So yeah, you should have come to this conclusion yourself if you knew Java (1 year ? sure...) By the way, you can lock the thread yourself.
  25. What about this : protected ItemStack createStackedBlock(int par1) { return new ItemStack(Block.stoneSingleSlab.blockID, 2, par1 & 7); }

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.