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

Quarg

Members
  • Content Count

    31
  • Joined

  • Last visited

Everything posted by Quarg

  1. Hi; I have been trying to work out a method by which I can build a mod that uses an external library (in this case I am using LuaJ). I have everything running fine from eclipse; however, of course the provided forge build scripts do not know about the referenced library, and as such fail to build the mod. What should I do to build this mod for distribution? **EDIT:** Ok, so having looked through the "build.gradle" file I realised I simply wanted to put the referenced library's jar file into "./libs", which has worked.
  2. I've been doing some stuff with using Lua for making Scriptable item effects, but I've hit a bit of a peculiar issue. I'd thought that it would be sensible to use the "name" format (eg: "minecraft:dirt") for blocks in the Lua scripts, and I have found it easy to obtain the Block from the name using the following: Block.getBlockFromName("minecraft:dirt"); However I cannot find a sensible way to do the reverse; obtaining the "name" from the Block instance. Thanks in advance!
  3. After a bit of experimentation, I've found a method that works somewhat. What I have done is put the de-obfuscated mod jar in "/run/mods/" so that the mod is included when running, and the API source in "/src/main/java/" so it shows up in eclipse Unfortunately some APIs (such as the Thaumcraft API) have compile-time missing-reference errors that I am not sure what to do about. Presumably there is a way to make Eclipse ignore these errors, but I have no idea how.
  4. Thanks for the reply, but I'm unable to make much use of that tutorial.
  5. Hi, All the information that I can find about using APIs for other mods is incredibly unclear, and I was hoping someone could clarify things for me. It is obvious that I need two things: the API, and the De-obfuscated Jar for the mod, but no-where I have looked seems to distinguish between the two, making it unclear as to what I am expected to do with them. EDIT: I am trying to do so for 1.8 if that makes much difference.
  6. I've now hit a related issue. Put simply, I don't know how to synchronize variables inside the entity, (which usually would not be an issue unless they are used for rendering, which this is). In this particular case the variable is set when the entity is created and will never be changed.
  7. Ok, changing that has worked, thanks a bunch! for the sake of anyone wondering about my final solution: EntityRegistry.registerModEntity(EntityQuantumEssentia.class, "qfthaum_essentia", 0, this, 64, 1, true);
  8. Yes I have registered the entity in the init phase (do I need to do it in a specific phase?) EntityRegistry.registerGlobalEntityID(EntityQuantumEssentia.class, "qfthaum_essentia", EntityRegistry.findGlobalUniqueEntityId());
  9. At the moment, the entity only exists server-side. Is it that I am entering it into the world wrong? At the moment what I am doing is this: worldObj.spawnEntityInWorld(entity); Which only occurs server-side, and the entity is definitely ticking server-side so it definitely gets this far at the least.
  10. So, I am fairly sure that you only need to create/spawn entities server-side (to avoid having client-side "ghost" entities), but I don't know how to then make the client aware of the entities that are spawned server-side. (Note that I am not referring to mobs, just entities that inherit from the base entity class) Thanks in advance for any help!
  11. Put simply, the interact and attackEntityFrom methods appear to never be called. public class EntityMagicBuffer extends Entity implements IMagicEnergyProvider { protected float storedEnergy; public EntityMagicBuffer(World world) { super(world); setSize(1, 1); } @Override public boolean doesEntityNotTriggerPressurePlate() { return true; } @Override public boolean canBeCollidedWith() { return false; } @Override public AxisAlignedBB getBoundingBox() { return boundingBox; } @Override public AxisAlignedBB getCollisionBox(Entity par1Entity) { // TODO Auto-generated method stub ret
  12. I have a staff item that I want to have drain energy on usage, the current way I have it set up is that this function in the staff class is called via a tickhandler: public float doDrawEnergy(ItemStack item, EntityPlayer player, float energy) { if(item.getTagCompound().getFloat("charge") > energy) { item.setTagInfo("charge", new NBTTagFloat("charge",item.getTagCompound().getFloat("charge") - energy)); return energy; } else { float out = item.getTagCompound().getFloat("charge"); item.setTagInfo("
  13. I decided to use a few break points to see what actually happens when I open the gui, and I found that it wasn't opening the gui handler server-side because my @Mod file didn't have an @NetworkMod annotation, simply adding @NetworkMod after the @Mod annotation and it's parameters seems to have fixed it for me.
  14. I just updated my latest post in the other thread, it appears that (with my mod at least) the server thinks that the player has their regular inventory open while the client thinks that the tile inventory is open. (which explains all of these oddities, since the player inventory has nine additional slots, 4 armour, 4 crafting, and the crafting output, and adding more slots in the custom container class will move the slots that the client closer to those the server uses) As such; I guess there must be something we are both missing for the opening of the GUI. EDIT: here is the code use
  15. I had realised much the same thing, except adding additional slots *before* the inventory results in offsetting the slot taken from, (see my post here which goes into a bit more detail about it and some other odd behaviour.)
  16. Having noticed that the slots were always offset by the ammount of tile slots minus nine, I tried making it so I had nine tile slots (though some were duplicates) like so: addSlotToContainer(new Slot(tile,0,17,17)); //Water In addSlotToContainer(new Slot(tile,1,17,49)); //Water Out addSlotToContainer(new Slot(tile,2,143,49)); //Output Crystals for(int i = 0; i< 6;i++) { addSlotToContainer(new Slot(tile,2,-18,18*i)); //THESE ARE THE DUMMY SLOTS } for (j = 0; j < 3; ++j) { for (k = 0; k &l
  17. the mods folder is in a subfolder in the .zip, move it to the root of the zip and it should fix your problem.
  18. or better yet: if (this.kegItemStacks[0] != null && this.kegItemStacks[0].isItemEqual(new ItemStack(EatMe.yeast))) would work fine.
  19. you can't simply compare two itemstacks using the standard == or !=, it will always consider them not equal since they arn't the same object, you should either manually compare their item IDs and Metadata/Damage OR use item1.equals(item2)
  20. Considering that I am having the same problem, and that my tile entity does have the read and write functions (as well as simple packet code), and that their container doesn't actually create any slots for the tile, I would be quite surprised if that were the root of the problem. here is my tile code to be clear: package com.quargos.am.blocks.tiles; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.network.INet
  21. I'm already following (and have posted in) that thread.
  22. doing that appears to have made absolutely no difference.
  23. You've most likely got the mod files in a subfolder in the .zip file at a guess. If you could give us some idea of the structure of the files in the zip (so much as a screenshot would be good) then we might be able to give some more help.
  24. I appear to be having the same problem, and changing the equivilant code didn't work for me either.
×
×
  • Create New...

Important Information

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