October 15, 20195 yr 3 hours ago, MineModder2000 said: Well for example there is the Is_On_Fire flag for entities, where is the class that shows how this is used? You mean for how, when entities on fire die, they drop cooked meat? That's handled by the EntityHasProperty, EntityPredicate, and EntityFlagsPredicate classes. Its pretty complicated. EntityFlagsPredicate#test is probably what you're looking for. Edited October 15, 20195 yr by Draco18s Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
October 17, 20195 yr Author 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. Edited October 18, 20195 yr by MineModder2000
October 17, 20195 yr 30 minutes ago, MineModder2000 said: I don't know how to do what. The with() state.with(state.get(...)+1) VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
October 18, 20195 yr Author 12 minutes ago, Animefan8888 said: state.with(state.get(...)+1) Oh of course!
October 18, 20195 yr Author 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. Edited October 18, 20195 yr by MineModder2000
October 18, 20195 yr 4 hours ago, MineModder2000 said: It only works if comment out the line that sets the boolean property. setBlockState(state.with(integerProp, state.get() + 1)) // then setBlockState(state.with(booleanProp, false)) // is not the same as setBlockState(state.with(integerProp, state.get() + 1).with(booleanProp, false) Does that make sense? VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
October 18, 20195 yr Author 16 hours ago, Animefan8888 said: setBlockState(state.with(integerProp, state.get() + 1)) // then setBlockState(state.with(booleanProp, false)) // is not the same as setBlockState(state.with(integerProp, state.get() + 1).with(booleanProp, false) Does that make sense? Definitely does, only one state at a time, I reworked by logic around this and it works now ?
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.