
statphantom
Members-
Posts
118 -
Joined
-
Last visited
Everything posted by statphantom
-
hello, I am trying to create a command that gets a bunch of IEEP data from the person who enters the command but I cant find any direct way to do this. I am casting it by using ExtendedPlayer player = ExtendedPlayer.get((EntityPlayer) sender.getCommandSenderEntity()); it seems to be ok but would like the opinion weather or not this is good / bad or is just plain stupid. thanks.
-
little confused about what you mean... if you want to drop a mod item, then the mod has to be included, you cant drop something that doesn't exist
-
don't check against the string, check against the Item class, public void onHarvestDropsEvent(HarvestDropsEvent event) { if(event.state.getBlock() == Blocks.log) { event.drops.clear(); event.drops.add(new ItemStack(Items.stick, random.nextInt(3)+1)); } } same idea for your own modded item, make sure you have a public static variable to your item such as public static Item sharpstick = new SharpStick(); (where the class SharpStick extends Item) then you add it using your main Mod class public void onHarvestDropsEvent(HarvestDropsEvent event) { if(event.state.getBlock() == Blocks.log) { event.drops.clear(); event.drops.add(new ItemStack(Items.stick, random.nextInt(3)+1)); event.drops.add(new ItemStack(ModClass.sharpstick, random.nextInt(3)+1)); } }
-
Hey everyone, thanks for the support so far. Question does onBlockDestroyedEvent(HarvestDropsEvent event) called on every block destroyed? e.g. creeper explosions, quarry, etc? also, how hard is it to add stuff to world gen? I would like to add some fibrous plants such as Jute etc. just wondering if it is something I could do soon or if it's really hard something I should do much later.
-
[1.8] FML event bus says class FMLEvent is not an event class
statphantom replied to jeffryfisher's topic in Modder Support
I am still learning but I have never heard of onMissing() method for 1.8 in the API, maybe it has been depreciated? what are you trying to do? -
[1.8][SOLVED] Custom Tool Sound On Break
statphantom replied to statphantom's topic in Modder Support
Thanks, no idea there was an event for that. -
[1.8][SOLVED] Custom Tool Sound On Break
statphantom replied to statphantom's topic in Modder Support
i 'rake' through grass, turning grass to dirt, doing this i also damage my item and play a sound when it breaks, however if i damage the item till it destroyes by 'breaking' blocks it wont play my sound since it uses its own methods to damage on block break. i would like my sound to be played when the tool breaks from block breaking. -
nop. hard to say without know where all your extracted files are, will need someone elses help with this,
-
in eclipse, the path should be: src>main>java>assets>MODNAME>(lang/models/sounds/textures)
-
eclipse is an IDE that comes included with the forge gradle install, if you don't know about it then you probably aren't using it.
-
are you using the included eclipse environment?
-
Hey all, I am looking for a partner developer to help develop this mod obviously I can't pay as it is a home project / non-profit mod etc, however I will DEFINITELY give you all the credit you deserve even if you don't ask for it. If you want to help in any way with the live development on my mod add me on skype 'statphantom' or post here thanks.
-
[1.8][SOLVED] Custom Tool Sound On Break
statphantom replied to statphantom's topic in Modder Support
this is my event handlers (onPlayerClickEvent is where I call my 'attemptToDamage' method and in there is where i do my checking and playing sounds etc): and this is my Tool Class (though probably not needed): -
[1.8] IEEP Variables kept through death?
statphantom replied to statphantom's topic in Modder Support
with epNew and epOld switched? cause that to me looks like it will write nothing to epNew and then get the data from epOld -
[1.8] IEEP Variables kept through death?
statphantom replied to statphantom's topic in Modder Support
great.... now I need to go through all my code and delete the ~100 lines of coding I did to get it working and just do that. can you show me your copyTo(ExtendedPlayer player) and sync() methods please? I have been using saveNBTData and loadNBTData to get the data and no sync method. the sync() was what was annoying me. using clone do I still need these NBT methods? ps: shouldn't we call opnew.copyFrom(epOld) ? or does it not really matter. -
[1.7.10] or [1.8] How possible to make infinite custom fluid?
statphantom replied to SteveKunG's topic in Modder Support
on the update, do a check of the blocks x+1 x-1 z+1 z-1 and if at least 2 of them are the correct fluids then turn the block location into the source block. I have not done this myself so unsure exactly how to implement it but I think it should work. -
I'm fairly new also but as far as I know you create initial 2D images and thne it uses certain calculations to twist and turn the 2D image so it looks 3D in certain view points 'dropped' 'placed' 'inhand' etc. there is an amazing tool that does all this for you and gives you the needed .json file that tells minecraft all the variables and calculations to make it 3D http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-tools/1265906-tool-mc-model-maker-design-custom-block-models
-
[1.8] IEEP Variables kept through death?
statphantom replied to statphantom's topic in Modder Support
how do you store the old instance? PS: I have noticed that this is working already but if I add a client GUI display of these variables they don't sync up -
I need help making IExtendedEntityProperties to persist through death, I have read a LOT of tutorials on this, read up about packet handling however none are working for me or I am just not understanding it. I have created a class that implements IGuiHandler that stores the data in a map as a NBTTagCompound, and have saved it through onLivingDeathEvent and load it through onEntityJoinWorld however I can't find a proper way to 'sync' the data from the server with the client and... well W.E. else needs to be done in this area. can someone help? this is what I have so far. Proxy to store the data: Event Handlers: My IEEP class Thanks for any information
-
Hey everyone, I have a tool that extends ItemTool since it is a custom tool that does custom things. however since it is custom I have made a custom damage function and custom break function and custom sound on break, this is due to my tool use doesn't destroy any blocks but now I have the problem that when I do use the tool to destroy a block it revers back to the normal onitemuse functions etc. basically since onitemuse does things like damage items and breaks items already the only thing I would like to override is the sound animation of a particular tool (or if possible a ToolMaterial since I am making a custom sound for each material) any help? thanks.
-
Really happy today, I decided to try and add a custom sound of my tools breaking, since again I have to set damage, set to null etc manually I also need to manually play a sound, so I downloaded one from a royalty free website and very first try, WORKED PERFECTLY. Really rare when that happens but when it does god its a wave of ecstasy (I really need a life). PS: should damaging tools be done server side only?
-
thanks! if I create a new function but call that function through a isRemote check is that function only run on server side then? No. In a way, this is what makes @SideOnly different from isRemote(). You can use isRemote() to run a part of the method on a specified side, or choose to only run it on one side (yet the method exists on both sides, unlike @SideOnly). This code has a block that is only called on the server. The method is called on both sides, but the block checks with side to execute on. public void example(World world) { System.out.println("This code is ran on both the client and the server (if the method is called that way I.E called on common)"); if(!world.isRemote) { System.out.println("This code is ran only on the server."); } } You shouldn't really need to do this - it will make your method fully server side but the method will exist on both sides public void example(World world) { if(world.isRemote) { return; } System.out.println("You will only see this code displayed through the server in the console, yet the method exists on both sides." } Yes I know it will also be compiled on client side but will it only RUN on server side if I do this? public void example(World world) { if(world.isRemote) { example2(); } System.out.println("You will only see this code displayed through the server in the console, yet the method exists on both sides." } public void example2() { System.out.println("This will only run on server?"); }
-
thanks! if I create a new function but call that function through a isRemote check is that function only run on server side then?