Everything posted by Alix_The_Alicorn
-
[1.7.2] Block drops item on right click - timed drop question
Use a tile entity and store the last day it was clicked in nbt. Then if day != last day clicked then spawn your item. also, instead of world.isRemote == false use !world.isRemote. And finally, I would recommend making a method to spawn items into the world, for organization.
-
[1.7.2] Sugar cane-like block?
public boolean canPlaceBlockAt(World w, int x, int y, int z) { Block block = w.getBlock(x, y - 1, z); return block.canSustainPlant(w, x, y - 1, z, ForgeDirection.UP, this) || block == this; }
-
[1.7.2] Using IExtendedEntityProperties
Please read the second post on this topic http://www.minecraftforum.net/topic/1952901-172164-eventhandler-and-iextendedentityproperties/ . Can confirm the whole thing works in 1.7.10-pre4 with no changes.
-
Cannot launch minecraft in idea for 1.7.10-pre4
Hey guys, I can't get IntelliJ to open minecraft in 1.7.10-pre4 forge. I had it working perfectly before, and I can't figure out this error. https://gist.github.com/alix-the-alicorn/b137088da0719a11c1d6
-
Biome generation questions.
Dangit. I'll leave this topic for just in case. Thanks for confirming my suspicions though :-P
-
Biome generation questions.
Hi, I have a few questions about biomes. The first one is, how do I set metadata to be used for the topBlock block in BiomeGenBase (set in my class extending BiomeGenBase)? The second one is the same, but for fillerBlock. I can't figure it out for the life of me, at least from the vanilla BiomeGenBase.
-
Change protected foodStats in an EntityPlayer?
This would make sense to me. Thanks for the explanation, wether it is valid or not I think it is though, as when I set things through the object gotten by the getter it worked.
-
How to use SimpleNetworkWrapper, IMessage and IMessageHandler
I understand the part where you say the last param is what side the handler is on, but what side should the handler be on? Sender or Receiver?
-
Change protected foodStats in an EntityPlayer?
Yes, but can't I modify foodStats with a getter?
-
Question: Adding Mods to an Existing Server
1) This is NOT the place to ask that. Try the user support. 2) Yes, you can add and remove any mods you would like at any time. If you are using a pre-1.7 version you will have to configure ids in minecraft folder/config/MyExampleMod.cfg. 3) Any worldgen added by said mods will not be found in existing terrain, explore to find it. 4) Do not trust any sites for mod download other than MinecraftForum.net, CurseForge, or a mod authors website that you are sure is legitimate. minecraftdl is known to package viruses, and advertise fake/outdated mods as updated to get people to install their viruses.
-
[1.7.2] IntelliJ IDEA
Pahimar recently made an excellent video covering this. youtube.com/Pahimar
-
Change protected foodStats in an EntityPlayer?
So what should I do, I can't find any methods for setting values in the foodStats. And foodStats is protected so I can't use any setter methods in FoodStats to change values.
-
[1.7.2] Creating an addon for Thaumcraft 4 and use classes of this mod
You don't need NEI but it's useful. You do need CodeChickenCore, as it runtime deobfuscates thaumcraft for you.
-
[1.7.2] Creating an addon for Thaumcraft 4 and use classes of this mod
1. Download the thaumcraft api zip from it's forum post. 2. Unzip 3. Put the source in with your mods source i.e.: source com mymod MyClass.java thaumcraft api AzanorClass.java 4. Download thaumcraft 5. Download dev versions of NEI and CodeChickenCore 6. Put all 3 mods in your dev environment's mod folder. 7. Use the api hooks in your code, launch the game, and enjoy There are quite a few more advanced things you can do regarding including apis in your mod (and not including them ) but that is it at the basic level.
-
Change protected foodStats in an EntityPlayer?
I have an item that I need to change/add too the player's food and saturation without it being eaten/food. All the methods I need are in foodStats (Which is a FoodStats object) but it has the protected modifier, and I don't see a setter, only a getter. Any ideas on how I could manipulate it?
-
[1.7.2] Making a Multi-sided and animated texture
Animated can be done with <texturefilename.png>.mcmeta. You can find info about that on resource pack section of MC wiki. Side 0=top 1=bottom (might be swapped) and 2-5 are sides. In 1.7.2 some sides are mirrored, but ignore that, it is fixed in vanilla in future versions.
-
Per-Player Item use cooldown with access from EntitiyPlayer Instance?
I was doing that, but how do I write? I get lots of console spam when re-registering, and I don't think that is the right thing to do. Also, I can't do think #1 I am writing to players.
-
[1.7.2]NBT data not being created when shift clicking out of Crafting Bench
Make a new class for your FML events, so they are separate from your forge events. Then register the class with this bus. FMLCommonHandler.instance().bus()
-
Whenever I run the install.cmd it Gives me an error
Use this forge version. http://files.minecraftforge.net/maven/net/minecraftforge/forge/1.6.4-9.11.1.964/forge-1.6.4-9.11.1.964-src.zip . It has grade which I will tell you how to install in one second. The 964 is forwards compatible with 965, etc. how to install: cd forgeFolder <mac: "./gradew"; windows: "gradlew"> setupDecompWorkspace <eclipse/idea> in the console/cmd. Also, I don't know why you would start a 1.6 mod now that 1.7.2 is so mature. Please post if you get any errors installing the grade way. Please not the steps to install are the same for 1.7, just download 1.7 sources instead.
-
Is there a better way? [Solved]
Or you could check if entity is undead.
-
[1.7.2]NBT data not being created when shift clicking out of Crafting Bench
@SubscribeEvent public void onCrafting(PlayerEvent.ItemCraftedEvent event) { } Have you thought of using events? That event is called on any crafting results getting pulled out. you can modify the output stack before it is given to the player. If you shift click a stack out, it will be called 64 times, one for each item.
-
[1.7.2] Creating a custom liquid
Try adding @Override annotations to all your methods that should be overriding methods in the superclass, you don't need this; but it won't hurt and it will give your errors when method names/args are wrong, helping you out.
-
[1.7.2]Custom Items / Custom Blocks
You could 1) be stupid and put everything in the constructor; 2) be smart and use chaining(i.e., when initializing your Item object, chain on methods to the end public static Item item = new ItemExample(ToolMaterialExample).setUnlocalizedName("name").method(args) ); 3) (this is if you already have 2 done) Cast your Item object to your item class when initializing it so you can chain on methods that you make for setters that you add, that aren't in the vanilla game, or change something for your item.; (and sequituri, I think his question was how to do multiple names and textures and such from one class. ^this answers that.)
-
Per-Player Item use cooldown with access from EntitiyPlayer Instance?
How exactly do I change and read the values from outside my IExtendedEntityProps though?
-
.obj Rendering Issues
In your block class. Override shouldRenderSide
IPS spam blocked by CleanTalk.