Everything posted by GotoLink
-
Help Stuck at TileEntity for my block (water lvl)
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.
-
[Solved] Manually set redstone power
You can always return your modified redstone block to the original one after some time using scheduled ticks.
-
Block set in code doesn't save
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.
-
TileEntity Inventory
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.
-
Block set in code doesn't save
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.
-
[1.6.2][Solved]Weird code in RenderMinecart class
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.
-
[Solved][16.2] Item Not Displaying Correct Particle Effects
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;
-
[1.6.2]Problem with Custom Crop
Why ? @SideOnly(Side.CLIENT) public Icon getIcon(int par1, int par2) { if (par2 < 7) { if (par2 == 6) { par2 = 5; }
-
[UNSOLVED]Try to remove a recipe
"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.
-
[SOLVED] [1.6.2] Texture not loading
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.
-
MCP + forge + Netbeans
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
-
[1.6.2] Fire doesn't extinguish correctly
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.
-
Help Stuck at TileEntity for my block (water lvl)
Now do packets for gui changes.
-
Help Stuck at TileEntity for my block (water lvl)
public static int waterLvl; It is static.
-
[Forge 1.6.2] Need help making crops grow
Change the block by overriding updateTick(args).
-
Where's the code handled for the Blindness effect?
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.
-
[SOLVED] [1.6.2] Texture not loading
"project"/assets/modid/...?
-
Sending packet to all players data lost
You don't have a break; between case 50 and case 51.
-
How to Hook Mod into Bukkit Plugin
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 ?
-
1 Device Not Closed in Eclipse
I think a mod called EE is telling you something is wrong.
-
Undefined Errors
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.
-
Add a field to a base class
You may want to look at the ChunkEvent.
-
Dungeon Loot?
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).
-
Rotate the block texture the way you placed it, storing in TE?
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.
-
Custom Slabs 1.6.2
What about this : protected ItemStack createStackedBlock(int par1) { return new ItemStack(Block.stoneSingleSlab.blockID, 2, par1 & 7); }
IPS spam blocked by CleanTalk.