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

Dijkstra

Forge Modder
  • Content Count

    89
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Dijkstra

  • Rank
    Stone Miner

Converted

  • Gender
    Male
  • Location
    The Nether
  • Personal Text
    Dyslexic Minecraft Modder

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Well it works, but after the player is in their new spot the can't break anything think it must be syncing cause reloging and dying fixes it Edit: Don't know if it only being on the server side makes a difference
  2. is there a way to set the player's spawn point to the block they are standing on, I thought this would do it but still end up at world spawn when I die player.setSpawnPoint(player.getPosition(), true);
  3. Is there way on some first joins the server to tp them random pos with a given range of chunks from 0,0 like the spread player command i am cruelty thinking is on ent joined world see if its a player and then see if got an nbt tag if it does not have tp and random x and random z cord set their spawn there give them the tag. The only issue is i am sure how to get surface y
  4. hence my start script downloading it if does not exists would this get me any installer or will it just work with 1.11 http://files.minecraftforge.net/maven/net/minecraftforge/forge/${MCVER}-${FORGEVER}/forge-${MCVER}-${FORGEVER}-installer.jar"
  5. was think that there is a pattern to file names and locations then
  6. I working on a server startup script and there be a big upset over curse not allowing pack to have minecraft jar in so now my start script downloads by wget or curl if it not found, was wondering if i could do the same with the forge jar and it libs just for overkill.
  7. First of all, XML is much better than JSON and would much better in my situation And thanks one little thing is all it takes
  8. Unfortunately no i need to a packet of basic config data in form of XML, from the server to the client so that they both have the same settings
  9. Looking up package management, trying to send a string later to be some XML from the server to the player when they join only found 1.10.2/1.9 tutorials, would though it has not changed that much any most where from client to server so had to change a little, so the encoding is working, but when it get around sending it, i get this from the log a disconnect from the world as if it was server. My code: Clearly, I have done something wrong along the way but do not know now where
  10. So got this and it works if (player.inventory.addItemStackToInventory(rewrad)){ player.inventoryContainer.detectAndSendChanges(); } else{ playerMP.worldObj.spawnEntityInWorld(new EntityItem(playerMP.worldObj, playerMP.posX, playerMP.posY, playerMP.posZ, rewrad)); } but will look into ItemHandlerHelper.giveItemToPlayer when i get an chance.
  11. So i am guessing player.inventory.addItemStackToInventory(item) player.inventory.detectAndSendChanges() not being at my development environment although it end yo being something more like this if (player.inventory.addItemStackToInventory(item)) { player.inventory.detectAndSendChanges() } else{ playerMP.worldObj.spawnEntityInWorld(new EntityItem(playerMP.worldObj, playerMP.posX, playerMP.posY, playerMP.posZ, item)); }
  12. this is what the method getReward does public ItemStack getReward() { return reward.copy(); } This is in my ModdedAchievement class, item stacks are set in the constructor Is it fine having copying the item stack there or should i do public ItemStack getReward() { return reward; } ItemStack rewrad = moddedAchievement.getReward().copy(); To me it does not seem to make much different
  13. So this is all guess work bu i have up with this for NBT NBTTagCompound nbt = new NBTTagCompound(); nbt.setString("modle", "blockDiamond"); nbt.setString("owner",player.getDisplayNameString()); nbt.setString("date", String.format("%1$td/%1$tm/%1$tY", System.currentTimeMillis())); ItemStack item= moddedAchievement.item(); item= new ItemStack(item.getItem(), item.stackSize, iem.getMetadata(), nbt); This is obviously wrong but this is my first attempt of giving a item
  14. I have method that is called on only the server side that result player.inventory.addItemStackToInventory(item) be called if all conditions are meet, but because it is only called on the server side the client does not update util you click in the slot it put in. If there away to invoke this update, right after player.inventory.addItemStackToInventory(item) is called.
  15. I got something that works!, Draco18s hope the method parameters are more to your liking, I do not know if there is any way to make this more efficient, if there is I would be more than happy to find out. private void checkAchivment(Achievement achievement, ItemStack item, EntityPlayer player) { if (!player.worldObj.isRemote && player instanceof EntityPlayerMP && achievement instanceof ModdedAchievement) { EntityPlayerMP playerMP = ((EntityPlayerMP) player); StatisticsManagerServer file = playerMP.getStatFile(); if (!file.hasA
×
×
  • Create New...

Important Information

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