Jump to content

MineModder2000

Members
  • Posts

    298
  • Joined

  • Last visited

Everything posted by MineModder2000

  1. I had tremendous difficulty trying to get the git method to work, so I ended up copying over the entire project folder into new work-space, I have 1TB HDD for a reason.
  2. I want to make a Halloween themed mod on time for the season, but I am currently working on a bigger mod that will take much longer to finish. I already copied the java and resource files over, its good to do so you have a back up. I am thinking I will just delete the current mod files out, and then add the other stuff in, as this smaller season mod will only use the main mod file probably. Then after I am done I will drag and drop and replace the files from my first mod. Is there any better way?
  3. Okay how about we at least try to solve the problem of it not rendering correctly while its being readied for a toss? The TridentItem class has a resource location titled "throwing", I need to replicate the same, and put whatever belongs in there. I already point to my own "mymod", "throwing" in my Spear class, but I'm not sure what exactly is next.
  4. I did it! Very easy, I was first messing around with the Respawn Event, quickly realizing that was the wrong one because its fired afterwards. Putting the code in the event did the trick ?
  5. Okay so this is working great for on load spawning, but the inventory items still respawn every time the player does. So the player will get more and more stuff the more they die...
  6. Definitely does, only one state at a time, I reworked by logic around this and it works now ?
  7. I have a problem. I can't use both this IntegerProperty and the BooleanProperty I made before. If I set the block state to the integer, then to the boolean later in the tick() method, the integer property is overriden, Instead of incrementing every time the method is called as desired, it starts from whatever I have the value set to in the constructor. It only works if comment out the line that sets the boolean property.
  8. Actually I figured out a different and more desirable way to do it. I need now, to learn how to use IntegerProperties. I made one but I want to either increment or decrement it based on some check in the tick() method, I don't know how to do that. The with() method inside of state will set it to a discrete value, whereas I want to basically i++ or i-- the value.
  9. Oh right...... duh.
  10. I should've added that I was already aware of this Event, and I have in fact have used it to spawn items on load. The problem is, as you mention, this will cause the item to be spawned every-time without some sort of a check. What I'm thinking is to include in that check, a persistent variable that keeps tracks of ticks, and then only if the number is below say 10, the spawn occurs. The variable would have to be tied to a capability, which I already have set up. I was just hoping there was a more direct way of doing this.
  11. No answer huh...... Well then what's the easiest way to make the player(s) start off with certain items? In other words the inventory already has a steak or something when the world is first started.
  12. Well for example there is the Is_On_Fire flag for entities, where is the class that shows how this is used?
  13. So I done diddly did this : And this in my main mod class : LootConditionManager.registerCondition(new Ready.Serializer()); So now how do I actually use it so that the boolean here changes when I need it to from my block class?
  14. I see the implementation examples in vanilla files, but I don't understand how to register. The docs say to use this method : LootConditionManager.registerCondition(), but it takes an instance of a class that cannot be instantiated.
  15. New Q. How could I make custom flags for drops? For example, pigs and other animals drop cooked rather than raw meat if they die while on fire, which is done by a flag check for "is_on_fire". I want to do something similar, so my block only drops something when a certain condition is met.
  16. How does it come out to 4 if it's two sides... maybe i shouldn't ask. Well that means tick() will be called 4 times as, worldIn.getPendingBlockTicks().scheduleTick(pos, this, 360, TickPriority.HIGH); is in that method, but this shouldn't affect anything. Whoops forgot all about that, I was so focused on that method.
  17. Actually Houston, I found the answer. I was able to get the variable to change in tick method, the problem is the onBlockAdded is called multiple times, four times or more I counted, so it resets the variable back to what I had it set to in there. I guess the solution is to not have it set in there, and just deal with it being true by default, easy adjustment. I'll call it UNREADY instead of READY. But anyways is multiple calls to that method with only one block created normal?
  18. Odd.... When I have this line : worldIn.setBlockState(pos, state.with(READY, 'value'), 3); in my onBlockAdded method, I can change the variable to true or false, as confirmed by println(). It just won't change inside of tick method. My original println() actually works fine by the way.
  19. Oh.. Well I did the new println() you gave me and it still shows false....
  20. Well hell with the prinln(), what should I do instead to change the variable state.
×
×
  • Create New...

Important Information

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