Jump to content
  • Home
  • Files
  • Docs
Status Updates
  • All Content

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Quarg

Quarg

Members
 View Profile  See their activity
  • Content Count

    31
  • Joined

    December 23, 2012
  • Last visited

    April 5, 2016

Community Reputation

2 Neutral

About Quarg

  • Rank
    Tree Puncher

Converted

  • Gender
    Undisclosed
  1. Quarg

    Building a mod with referenced libraries

    Quarg posted a topic in ForgeGradle

    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.
    • February 6, 2016
    • 1 reply
  2. Quarg

    Block "name" from Block object.

    Quarg replied to Quarg's topic in Modder Support

    Yep, that's it, thanks!
    • February 1, 2016
    • 2 replies
  3. Quarg

    Block "name" from Block object.

    Quarg posted a topic in Modder Support

    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!
    • February 1, 2016
    • 2 replies
  4. Quarg

    Making an add-on mod / Using an API

    Quarg replied to Quarg's topic in Modder Support

    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.
    • November 2, 2015
    • 4 replies
  5. Quarg

    Making an add-on mod / Using an API

    Quarg replied to Quarg's topic in Modder Support

    Thanks for the reply, but I'm unable to make much use of that tutorial.
    • November 2, 2015
    • 4 replies
  6. Quarg

    Making an add-on mod / Using an API

    Quarg posted a topic in Modder Support

    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.
    • November 2, 2015
    • 4 replies
  7. Quarg

    Entity Syncronisation

    Quarg replied to Quarg's topic in Modder Support

    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.
    • July 23, 2014
    • 8 replies
  8. Quarg

    Entity Syncronisation

    Quarg replied to Quarg's topic in Modder Support

    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);
    • July 22, 2014
    • 8 replies
  9. Quarg

    Entity Syncronisation

    Quarg replied to Quarg's topic in Modder Support

    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());
    • July 22, 2014
    • 8 replies
  10. Quarg

    Entity Syncronisation

    Quarg replied to Quarg's topic in Modder Support

    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.
    • July 22, 2014
    • 8 replies
  11. Quarg

    Entity Syncronisation

    Quarg posted a topic in Modder Support

    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!
    • July 22, 2014
    • 8 replies
  12. Quarg

    [1.5.2][SOLVED] Simple Entity hit / interact not occuring

    Quarg posted a topic in Modder Support

    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 return boundingBox; } @Override public void onEntityUpdate() { worldObj.spawnParticle("magiccrit", posX, posY, posZ, 0, 0, 0); super.onEntityUpdate(); } @Override public boolean interact(EntityPlayer par1EntityPlayer) { System.out.println("clicked!"); return true; } @Override public boolean attackEntityFrom(DamageSource par1DamageSource, int par2) { System.out.println("poke!"); return super.attackEntityFrom(par1DamageSource, par2); } @Override protected void entityInit() { } [... other code relating purely to my interface ...] } I think it may be a bounding box related issue since arrows fly straight through the entity, although using F3+B still makes it show the bounding box I was expecting. EDIT: as a most likely unrelated problem, the entity appears to sometimes glitch up/down about half a block, (but always remaining in one of the two up/down states, never going any further) EDIT2: making canBeCollidedWith() return true fixed it entirely, the getBoundingBox() and getCollisionBox() functions can freely return null without preventing this.
    • July 15, 2013
  13. Quarg

    Strange Itemstack NBT behaviour

    Quarg posted a topic in Modder Support

    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("charge", new NBTTagFloat("charge",0)); return out; } } The problem is that the "charge" nbt value doesn't always change, specifically it only that the getFloat function only returns the latest set value after opening a GUI (ie: it only seems to upate the value after opening a GUI), and I have absoluetly no idea why or how this happens.
    • June 23, 2013
    • 1 reply
  14. Quarg

    [SOLVED] GUI Items in player inventory behaving awkwardly

    Quarg replied to intermediateuser's topic in Modder Support

    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.
    • June 16, 2013
    • 23 replies
  15. Quarg

    [SOLVED] GUI Items in player inventory behaving awkwardly

    Quarg replied to intermediateuser's topic in Modder Support

    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 used for opening the GUI for me: @Override public boolean onBlockActivated(World world, int i, int j, int k, EntityPlayer player, int a, float b, float c, float d) { TileEntity tileEntity = world.getBlockTileEntity(i, j, k); if (tileEntity == null || player.isSneaking()) { return false; } player.openGui(Alchemagic.instance, 0, world, i, j, k); return true; }
    • June 16, 2013
    • 23 replies
  • All Activity
  • Home
  • Quarg
  • Theme

Copyright © 2019 ForgeDevelopment LLC · Ads by Longitude Ads LLC Powered by Invision Community