Jump to content

seppitm

Members
  • Posts

    17
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

seppitm's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. I don't want to make any of these things. i have a tiny webserver in my Mod and i want to include the files in my jar. can i use the standart java resloader? i'm using the assets system because it's vanilla and all assets for a mod should be there.
  2. Hi, is there a way to get resourcepacks on a server? i'm using : FMLClientHandler.instance().getResourcePackFor but it crashes on a Cauldron Server
  3. No, i know how i translate my items. I want a method to read these translations.
  4. Hi, is there a way to translate the unlocalized names of liquids, blocks and items ? e.q. i have the unlocalized name of an item as String (not the instance of the item). I want to build a method like this getTranslation("tile.whatever.a.block.or.item"); Is there any method to translate these Strings ? or is there a method to find Items via the name?
  5. Nope. not in eclipse, i mean later when forge runs.
  6. Hello, is there a way to add new libarys to the libs folder of minecraft and make forge to load them? I want to use a mysql Connector on the serverside of my mod. I know that Grandle can include the lib in my mod, but i don't want to conflict with other mods who also include the mysql into the jar. when i'm placing the jar in the libs folder of minecraft, it's not going to be loaded. What is the best way to include the mysql connector?
  7. Okay THX then i have to use a handler ^^. i will notice u in my credits when i release the mod
  8. Yes i know this. i do the checks on the server not on the client. The informations are only for the GUI. i used the SimleNetworkWrapper now to send Changes to the client who stores the informations in the entity, is that a good way?
  9. Ich gehe mal davon aus das du Deutsch bist (wegen dem Namen) Nee ich setze in dem Entity den Namen des Spielers dem der Block gehört. Derjenige kann mit nem bestimmten Gegenstand den Block aktivieren und andere nicht. Darum muss ich den Owner zum Client syncen.
  10. Hello, i'm trying to read strings from NBT. i have attached the code for read and write. My problem is that he reads the both Strings groupName and ownerName and set the fields in the entity. but when i acces them in the onBlockActivated method, they are empty. For the Inventory stuff, everything work fine but i'm using the same method for the groupName and the ownerName. Can someone explain me the odd behavior or say me how to fix this ? public void writeToNBT(NBTTagCompound par1) { super.writeToNBT(par1); NBTTagList itemList = new NBTTagList(); for (int i = 0; i < inv.length; i++) { ItemStack stack = inv[i]; if (stack != null) { NBTTagCompound tag = new NBTTagCompound(); tag.setByte("Slot", (byte) i); stack.writeToNBT(tag); itemList.appendTag(tag); } } par1.setTag("Inventory", itemList); NBTTagList theMatterSettings = new NBTTagList(); NBTTagCompound baseMatter = new NBTTagCompound(); baseMatter.setString("groupName", groupName); baseMatter.setString("ownerName", ownerName); theMatterSettings.appendTag(baseMatter); par1.setTag("thematter", theMatterSettings); NBTTagList groupMembers2 = new NBTTagList(); for(String name:groupMembers) { NBTTagCompound tagName = new NBTTagCompound(); tagName.setString("name", name); groupMembers2.appendTag(tagName); } par1.setTag("themattergroupmembers", groupMembers2); System.out.println("Write to NTB"); System.out.println(groupName); } @Override public void readFromNBT(NBTTagCompound par1) { super.readFromNBT(par1); NBTTagList tagList = par1.getTagList("Inventory",par1.getId()); for (int i = 0; i < tagList.tagCount(); i++) { NBTTagCompound tag = (NBTTagCompound) tagList.getCompoundTagAt(i); byte slot = tag.getByte("Slot"); if (slot >= 0 && slot < inv.length) { inv[slot] = ItemStack.loadItemStackFromNBT(tag); } } NBTTagList theMatterSettings = par1.getTagList("thematter",par1.getId()); if(theMatterSettings.tagCount() > 0) { NBTTagCompound baseMatter =theMatterSettings.getCompoundTagAt(0); groupName = baseMatter.getString("groupName"); ownerName = baseMatter.getString("ownerName"); NBTTagList groupTagList = par1.getTagList("themattergroupmembers",par1.getId()); groupMembers.clear(); for (int i = 0; i < groupTagList.tagCount(); i++) { groupMembers.add(groupTagList.getCompoundTagAt(i).getString("name")); } } System.out.println("Read from NTB"); System.out.println(this.groupName); } //EDIT: Found the bug. The values are only set on the server (world.isRemote=false). is there a way to automatically sync the entity with the client?
  11. Oh... https://github.com/MinecraftForge/MinecraftForge/pull/147 11 months ago Muckk made a pull request for that... i thought it is merged now. Is there any workaround without overriting the forge classes??
  12. Hello, Where can i get a list of the events from the current release? The list in the wiki is verry old I whant to subscripte to events like BlockBreak ^^
  13. Works thx
  14. i dont have any entity... i have only X, Y & Z Coordinates and i whant to find out if there is a entity in this "block"
  15. i have the following problem: public static boolean setBlock(EntityPlayer player, int x, int y, int z, int id, int meta) { boolean rv = false; if(player.worldObj.isAirBlock(x, y, z) && player.canPlayerEdit(x, y, z)) { player.worldObj.setBlockAndMetadataWithNotify(x,y,z,id,meta); return true; } return rv; } it checks if the block is air but i cant check if an entity stands on the block. how can i check this?
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.