Jump to content

swordjjjkkk

Members
  • Posts

    9
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

swordjjjkkk's Achievements

Tree Puncher

Tree Puncher (2/8)

1

Reputation

  1. I want to get a random number from server, and add the number to entityplayer class. here is my simple thought public void Prepare() { java.util.Random random=new java.util.Random(); int MaxPlayer=Minecraft.getMinecraft().theWorld.playerEntities.size(); int result=random.nextInt(MaxPlayer); EntityPlayer ply; for(int i=0;i<MaxPlayer;i++) { ply=(EntityPlayer)Minecraft.getMinecraft().theWorld.playerEntities.get(i); ply.addChatComponentMessage(new ChatComponentTranslation(ply.getDisplayName(), new Object[0])); if(i!=result) { ply.getEntityData().setInteger("Team", 1); } else { ply.getEntityData().setInteger("Team", 2); } } } of course it's not working. maybe the reason is client or server stuff,i don't know how to fix this. could you tell me the property way to make it , thanks a lot PS: i know networking send messages can do that,but it seems a little complicated, is there any easier way to do that?
  2. public class Main { public final static String ID = "FirstMod"; public final static String NAME = "Gamemode"; public final static String VERSION = "1.0"; public static Block BlockTable; public static Item itemTable; @EventHandler public void preInit(FMLPreInitializationEvent event) { itemTable=new ItemTable().setUnlocalizedName("ItemTable").setTextureName("FirstMod:itemtable"); GameRegistry.registerItem(itemTable, itemTable.getUnlocalizedName().substring(5)); } @EventHandler public void load(FMLInitializationEvent event) { } @EventHandler public void postInit(FMLPostInitializationEvent event) { } } here is my code,and picture locate in "resources\assets\FirstMod\textures\items\itemtable.png" i have been working on this for hours. a few days ago,i make it correctly. today i watch again the tutorial,i think all the same. please help me!
  3. yes, i want player to build like creative and die like survival ,sorry about my english
  4. hello everyone,i want to play in creative game mode but player still can die like survive game mode. i have no idea how to do , could you give me any suggestion? thank you by the way,any version is okay.
  5. hey guys,i'm trying to make a block and when click right button on it ,i can set the current location as respawn point. here is my code public boolean onBlockActivated(World p_149727_1_, int x, int y, int z, EntityPlayer player, int p_149727_6_, float p_149727_7_, float p_149727_8_, float p_149727_9_) { player.setSpawnChunk(player.playerLocation, true); player.addChatComponentMessage(new ChatComponentTranslation("tile.bed.occupied", new Object[0])); return true; } but it doesn't work. please help me, thank you!
  6. that's really helpful to me, but one little question ,when i export javadoc ,it only export the code i used, how can i export all forge code javadoc?
  7. that's really a stupid question and i'm sorry to ask here as my first question. at the website ,there are several different version forge, some have javadoc download some doesn't have. i download a forge version that have javadoc, in javadoc there are only methods without description , but in eclipse when i hang mouse on methods, there are fully description. uhhh i talk too much nonsense. here is the question,how can i get javadoc with methods description? thank you very much
×
×
  • Create New...

Important Information

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