Jump to content

opssemnik

Members
  • Posts

    269
  • Joined

  • Last visited

Everything posted by opssemnik

  1. i know there is a hook but i dont remember the name, do some search (if u dont find, u can always use asm).
  2. public class LivingDropsEvent { import net.minecraftforge.event.entity.living.*; import net.minecraft.entity.player.*; public static double rand; @ForgeSubscribe public void onEntityDrop(LivingDropsEvent event) { if (event.source.getEntity() instanceof EntityPlayer) { rand = Math.random(); EntityPlayer killer = (EntityPlayer)event.source.getEntity(); //if u want the killer if (event.entity instanceof EntitySheep && !event.entity.worldObj.isRemote) { if (rand < 0.50d){ event.entity.dropItem(ParallelWorlds.LambChop.itemID, 3); } } } }
  3. or use if(FMLCommonHandler.instance().getEffectiveSide().isClient()){ //stuff }
  4. Sorry to say, but thats just bullshit. @HydroBane: can you post your complete mod file? i know but him´s code was right and if the code is right the problem is minecraft forge everyone needs to know.
  5. for the full moon time u will need to calculate manually the time (see in the render global at render sky method and render stars method) do some tests.
  6. Learn java. Really public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer){ if(par3EntityPlayer instanceof EntityPlayerMP && !par2World.isRemote){ ((EntityPlayerMP)par3EntityPlayer).displayGUIWorkbench((int)par3EntityPlayer.posX,(int)par3EntityPlayer.posY,(int)par3EntityPlayer.posZ); //hope that works } return par1ItemStack; }
  7. public static EnumToolMaterial AZURITETOOL = EnumHelper.addToolMaterial("AZURITETOOL", 2, 400, 6.0F, 2, 14); to static EnumToolMaterial AZURITETOOL = EnumHelper.addToolMaterial("AZURITETOOL", 2, 400, 6.0F, 2, 14);
  8. OMG he wants when right clicked, also pahimar workbench its a little different. to open use: public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer){ if(par3EntityPlayer instanceof EntityPlayerMP){ ((EntityPlayerMP)par3EntityPlayer).displayWorkbenchGUI((int)par3EntityPlayer.posX,(int)par3EntityPlayer.posY,(int)par3EntityPlayer.posZ); //hope that works } return par1ItemStack; }
  9. omg why a class?? just use @PreInit public void preInit(FMLPreInitializationEvent e){ MinecraftForge.EVENT_BUS.register(this); } @ForgeSubscribe public void onDeath(LivingDeathEvent e){ if(e.entity instanceof EntityPlayer && !e.entity.worldObj.isRemote){ EntityPlayer killed = e.entity; Entity killer = e.damageSource.getEntity();//if u want to know what killed the player //do stuff killed.dropItem(Item.aplleRed.itemID,2); } }
  10. u need to remove the mineWood from the list and then re register as yours
  11. its useless code just to check the side, and getting an instance of the powering block etc ....
  12. its just a string that names the crash thing. the problem is in your portal(i mean in the part that u calls the teleport code) can u post the code?
  13. in 1.4.7 the max u can use is 128x(forge added this), and also u dont need that function(my mod worked with hd textures without that code)
  14. world.isBlockIndirectlyProviderPowerAt(x,y,z,blockid,meta,side), i dont remember the correct arguments of this functions but caution it has 2 funtions in world that u can use: isBlockIndirectlyGettingPoweredAt isBlockIndirectlyGettingPowered but just the first check the side.(also search the correct names i dont remember then now, but they looks like these)
  15. because client lies, these things must be done in the server to fix u need to use a if(!world.isRemote){ //before u call the code
  16. whats asm? java byte code manipulating, basicly u can edify classes on runtime, adding, remove or event editing things take a look at asm tutorial on the forg wiki, code chickens core and nei src, also bukkit forge src
  17. i have ideas but if lex said that can be done with vannila code so it can be done with vannila code, but can u explain more?
  18. why people alawy want the easiest way??? people should use clipse when they are beginers(or when they will create an android program)i make my mods with n++ and its good, also the textures dont need to go into de jar just put in mcp/eclipse/minecraft/bin (if u start from eclipse) or mcp/bin/minecraft(if u start from startclient and startsever bat). "ALSO, YOU HAVE TO USE "recompile.bat" EVERYTIME YOU EDIT THE CODE!" wrong if he uses eclipse he can just copy and paste the recompiled code to the mcp/bin and then just use reobfuscate bat. ProTip: in your mod zip/jar u need to create a folder mods and then a folder yourmodname and then a folder called textures and then a folder called items (same for blocks just change items to blocks)
  19. the first answer as the correct, the second its a little correct... do public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { //only the server needs to know the position of the player if(!par2World.isRemote && par3EntityPlayer instanceof EntityPlayerMP){ //is instance of entity player mp? ((EntityPlayerMP)par3EntityPlayer).setPositionAndUpdate(par3EntityPlayer.posX, par3EntityPlayer.posY, par3EntityPlayer.posZ + 5 ); return --par1ItemStack; } else{ return par1ItemStack; } } ..... Wuut? Do a side (FMLCommonhandler.instance.getSide()) or instanceof check the get side returns dedicated server or client(integrated one)
  20. did u tried setSize in the entity class constructor???
  21. i understand u(i think) but u can do this with vannila code.
  22. but he haves a lot of code, so its better use func_94575_c, so he will not need to add arguments... (he dont want metadata)
  23. u can use asm to make the blocks that u want coord extends BlockContainer, inser the unimplemented Methods(by asm), create a tile entity and get the cords by the tile entity
×
×
  • Create New...

Important Information

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