Everything posted by Mctittles
-
100% chance of spawning a random item in dungeon chest
Made some progress, but now I'm stuck with a different problem. I can create my own WeightedRandomChestContent class and override generateChestContent which allows me to return item stacks I want added to the chest. So far so great, except there is a limit to the total number of items generated in a chest. I want to ADD more items, not just replace what is already there. I'd also like to add between 1 and 10 of my custom items, however some chests are only created with a couple items (that I override) so I can't have 10 items in the chest.
-
Maximum execution time When searching this forum
Just letting you know that search doesn't really work. I've never been able to get more than a partial page of results since I started browsing here. It times out with "Maximum execution time..." script error. Sometimes no results are shown and just the error. Might want to look into cleaning logs, optimizing database, or upping your maximum script exec time.
-
100% chance of spawning a random item in dungeon chest
I can use ChestGenHooks to add items to the list, however I created hundreds of collectible items that if I add a percent chance to spawn will still fill up the chests. Is there a simple way to pick a random item (from hundreds) and just put one of those in a dungeon chest?
-
EntityItemFrame?
Is there any information out there on Item Frames? I wanted to make a modified item frame that just removes the border and makes the item inside a little larger, but after finding the EntityItemFrame class I don't really know where to begin. I don't even see how I can register my item, because it's not an item or a block, but an entity? Anyone have any information or links on how these entities work?
-
Question on mergeItemStack parameters
Well, figured out the culprit but not the solution. It seems anything that is ItemRecord has a stackSize of 0. Other items, including non stackable items like Swords all have a stackSize of 1. I haven't been able to find where this is set or why.
-
Question on mergeItemStack parameters
Ooop, spoke to soon. It's often the case that as soon as I give up and go looking for help I find the answer. Setting k in the if statement sets it to the END parameter. Either way it subtracts one, the BOOLEAN is just so you can choose if it starts at the end of the slots or the beginning. The reason I'm trying to figure this out btw is I have an item that ItemRecord and it doesn't allow mergeItemStack to be used on it. At first I thought it was because it wasn't stackable, but neither are swords and they work, so trying to figure out what I need to change in my item to allow shift clicking to a crafting table
-
Question on mergeItemStack parameters
Ok so I've read up and watched two tutorial videos but can't seem to find anyone that knows exactly what the mergeItemStack parameters do. Either there is no explanation or they say "this is just how it works" . Anyway, trying to troubleshoot here and having a hard time understanding the code (especially with no real variable names in the fml class). So I figured this out: mergeItemStack(clickedStackObject, slotStart, slotEnd+ 1, BOOLEAN) First off I'm unsure why it only works when I add one to the end slot. I see this in the original code: if (p_75135_4_) { k = p_75135_3_ - 1; } Where p_75135_3_ is the slotEnd and p_75135_4_ is the BOOLEAN. This suggests it subtracts one from the end, but only if the BOOLEAN is set to true. As per the example I was looking at I set the BOOLEAN to false so this shouldn't get run. The other question I was wondering is what is the BOOL parameter for? True or False does not seem to make a difference? Any help is greatly appreciated!
-
What is blockParticleGravity used for?
Thanks I'll look into WorldSavedData.
-
What is blockParticleGravity used for?
I guess I wouldn't know how to save the set with the map though. Seems like I'd have to use a tileEntity somewhere to keep track of this information right?
-
What is blockParticleGravity used for?
Oh bummer. Well, that's disappointing . I suppose maybe I could make some sort of object you place that has a range and within that range you mark your blocks and the marked blocks are stored in the object. Lot more work than I was hoping, but could work... Thanks for the help!
-
What is blockParticleGravity used for?
Currently I'm tying it to the block that is on the ground. This is all in an effort to make it so I can use light switches in my house without coming home to a room full of zombies. So I came up with the idea of being able to use a wand or something to mark all blocks you don't want zombies to spawn then cancelling the spawn on those blocks. Since this could potentially be a lot of blocks tying it to the player might result in a rather large array, so that's when I started looking for alternatives like looking for existing variables on blocks I can change to use as a reference.
-
What is blockParticleGravity used for?
Oh wait you are referring to a hash or list type thing. Sorry, coming from C/C++ so don't instantly recognize the terms here . The reason I am trying to modify variables of the block instead of just saving them in an array is because I want this to be persistent with map saves etc. Basically I want the players to be able to use a wand to mark an indefinite amount of blocks that will change how things spawn on them while using as little overhead as possible.
-
What is blockParticleGravity used for?
Perhaps nothing? Sorry, I'm not familiar with Set<Block> . Where is this?
-
What is blockParticleGravity used for?
I was looking for a low overhead way to "mark" a bunch of placed vanilla blocks and I started looking for public variable I could change so I don't have the added space of a bunch of titleEntities. I ended up finding every block I checked had blockParticleGravity set to 1.0. Changing it to .9 allows me to keep track of which blocks I marked and so far has not caused any problems. But, I want to make sure I don't break anything by modifying this variable. When is this variable used, and will setting it to .9 break anything?
-
Modify Hostile Mob Spawn
Thanks for the help guys; both of these look like they will work great!
-
Modify Hostile Mob Spawn
So, all I'm looking to do is for the player to be able to specify a block or blocks and those blocks will not spawn hostile mobs on them. Been looking through the code and forums but really I don't know where to start. Is this possible? Can I modify the existing minecraft class or is there another way? Thanks!
-
Checking if jukebox sound is done
Thanks!
-
Checking if jukebox sound is done
So I've been looking into the soundhandler and it appears this would work but isSoundPlaying requires an "ISound" and I don't know how to get that using the playAuxSFXAtEntity for playing records.
-
Checking if jukebox sound is done
So I've been trying to do something when a song has finished playing on the jukebox and haven't been able to find a way to tell when the sound is completed. I've looked through soundmanager and forge events with little luck. Anyone know if there is a way to set up a listener or somewhere that calls back when the music has finished?
IPS spam blocked by CleanTalk.