Everything posted by GotoLink
-
Forge Workspace Setup Issue
gradlew --refresh-dependencies eclipse That should set the libraries appropriately.
-
[How-To]Build multiple separate projects with Gradle
@dev909 You didn't follow my instructions for the "Independent setup" here. I see two mods in the same project folder, and the forge license, readme files...bad boy The problem you might not see, is that Gradle sets by default a test folder as src/test/java and src/test/resources, but this is for testing purposes and not supposed to be built with the 'main' sources. This probably conflicts with what you set into the build.gradle file. If you don't want to move out of the Forge folder, at least make a build.gradle file per mod. That is the easiest way to go. In your situation, put them into the "main" and "test" subfolders with: sourceSets.main{ java{ srcDirs 'java' } resources{ srcDirs 'resources' } }
-
[1.5.2] Custom Paintings for MC
You should really consider changing this.
-
[1.5.2]Random Textures for Mobs[SOLVED]
You are supposed to set the initial value in entityInit().
-
[1.6.4] [SOLVED] KeyBinding multiplayer problem
Look at the packet tutorials on the wiki.
-
Integration with other mods without being a dependency
What's reflection? How do I use it? Reflection is a soft dependency tool, its package is: java.lang.reflect. The main methods you are likely to use are: Class.forName(String)//load a class object from its path Class#getMethod(String, Class...)//get a method object from the class object, with name and parameters Method#invoke(Object, Object...)//call the method from the class object, with given parameters See an example here.
-
[1.6.4][solved]custom sapling
Well, read BlockSapling again, the answer is there.
-
[1.6.4][solved]custom sapling
Look at the bonemeal tutorial on the wiki.
-
Multiple Projects in Eclipse
You don't have to configure anything. Just add all the projects. You can import them all at the same time if they are in the same folder.
-
[1.6.4] setting harvest level of vanilla minecraft blocks
Man, breaking block by hand != breaking with a tool, that is as simple as that. By the way, the default ItemAxe harvest most things wooden independently of the block harvest level. You should use the BlockEvent(s) if the conditions are met.
-
Making blocks easily breakable with shears
Use IShearable interface.
-
Texture won't show.
You should use FMLPreInitializationEvent.
-
[1.6.4] mcmoc.info
Closing bracket ] is missing.
-
[1.6.4]Forge Block Event Handler and Tile entities
The HarvestDropsEvent only fires if the block can be harvested...i am not sure there is even a case where a player can harvest a mob spawner.
-
[Question] Is it possible to use blocks from other mods?
In the particular aspect of recipes, the OreDictionary is here for such a thing. Provided other mod blocks are registered in this dictionary, you can add recipes for them.
-
Mob throwing Potions[SOLVED]
EntityAIAttackOnCollide attackoncollide = null; this.tasks.removeTask(attackoncollide); This is really unlikely to work. You need to cache the task you want to change. public EntityAIBase cache; public void onUpdate{ ... EntityPlayer closePlayer = this.worldObj.getClosestPlayerToEntity(this, 4); if(closePlayer==null){ if(this.cache!=null){ this.tasks.removeTask(cache); this.cache = null; } }else if(this.cache ==null) { this.cache = new EntityAIAttackOnCollide(this, EntityPlayer.class, this.moveSpeed, false); this.tasks.addTask(3, cache); } }
-
Mob throwing Potions[SOLVED]
What? How i suppose to do that? Please give the code if you know something about it. See the line task.addTask ? Then this exist too task.removeTask Now, how to find a player ? EntityPlayer closePlayer = this.worldObj.getClosestPlayerToEntity(this, putSomeDistanceHere); if(closePlayer==null){ //forever alone }else{ //kill the bastard }
-
How to - edit core classes for debugging?
You can still put breakpoints and run client/server debug.
-
Missing Arguments Exception
You need to add something after --accessToken, as with --version and --tweakClass.
-
[1.7.2] sound bug with tick event with demostration video
@mrgreaper If you only want to make a funny sound for the player holding the item, client-side all the way. You don't even need to change the sound toggle, since there only is one player on client-side. @Ernio No, what he meant is, his sound toggle as of now, is not player sensitive. If two players equip the item, only the first one will trigger a sound. The flag will be false for the second one. Even more bizarre, if after that, one of the player unequip the item, the other will get a sound.
-
Forge Event for EXP Orb Pickup
With a player instance taken from LivingUpdateEvent: AxisAlignedBB aabb= null; if (player.ridingEntity != null && !player.ridingEntity.isDead) { aabb= player.boundingBox.func_111270_a(player.ridingEntity.boundingBox).expand(1.0D, 0.0D, 1.0D); } else { aabb= player.boundingBox.expand(1.0D, 0.5D, 1.0D); } List list = player.worldObj.getEntitiesWithinAABB(EntityXPOrb.class, aabb); if (list != null) { for (int i = 0; i < list.size(); ++i) { EntityXPOrb xpOrb = (EntityXPOrb)list.get(i); if (!xpOrb.isDead) { //We are sure the xp orb is colliding here } } }
-
[1.7.2] Drawing a string on the top-left corner of the screen.
The biggest help you can get is by your own doing: learn how to code. You make nearly one mistakes per line at the moment.
-
Mob throwing Potions[SOLVED]
Then remove the task when there is no player around.
-
[1.7.2] Mod Source and Repository locations
Anywhere you want. You don't need to use the forge folder, as long as: -you first ran (by command line in the forge folder) gradlew setupDevWorkspace -your mod folder contains the build.gradle file, gradlew files and gradle folder. By default, the build.gradle file sets things with: /src/main/java/your-packages-here /src/main/resources/your-resources-here Though you can change that.
-
Forge Event for EXP Orb Pickup
You can modify the values in xp orb without reflection. Just use the NBT methods: NBTTagCompound nbt = new NBTTagCompound(); xpOrb.writeEntityToNBT(nbt); nbt.setShort("Value", nbt.getShort("Value")*2);//beware out of Short range values xpOrb.readEntityFromNBT(nbt); I'd recommend using the LivingUpdateEvent and perform collision detection for xp orb around the player. This way you can be player specific
IPS spam blocked by CleanTalk.