
opssemnik
Members-
Posts
269 -
Joined
-
Last visited
Everything posted by opssemnik
-
Porting my mod (Does Forge have what it needs?)
opssemnik replied to Dayanto's topic in Modder Support
i know there is a hook but i dont remember the name, do some search (if u dont find, u can always use asm). -
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); } } } }
-
or use if(FMLCommonHandler.instance().getEffectiveSide().isClient()){ //stuff }
-
EnumToolMaterial - Custom Tool Material Crash
opssemnik replied to HydroBane's topic in Modder Support
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. -
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.
-
[SOLVED] Is it possible to check the biome when placing a block?
opssemnik replied to LutzBlox's topic in Modder Support
bu @Just idk if he is using n++ ? -
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; }
-
EnumToolMaterial - Custom Tool Material Crash
opssemnik replied to HydroBane's topic in Modder Support
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); -
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; }
-
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); } }
-
[1.4.7] How to correctly check redstone power on sides of my block?
opssemnik replied to Nyandoma's topic in Modder Support
its useless code just to check the side, and getting an instance of the powering block etc .... -
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?
-
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)
-
[1.4.7] How to correctly check redstone power on sides of my block?
opssemnik replied to Nyandoma's topic in Modder Support
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) -
Why does trace result differs between ClientSide and ServerSide?
opssemnik replied to WeAthFolD's topic in Modder Support
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 -
an ability to not render the rider of a spesific entity
opssemnik replied to Ninjusk's topic in Suggestions
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 -
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?
-
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)
-
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)
-
did u tried setSize in the entity class constructor???
-
an ability to not render the rider of a spesific entity
opssemnik replied to Ninjusk's topic in Suggestions
but remember we always will have asm. -
i understand u(i think) but u can do this with vannila code.
-
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)
-
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