
MineModder2000
Members-
Posts
298 -
Joined
-
Last visited
Everything posted by MineModder2000
-
(SOLVED) [1.14.4] Block Ticking and Properties
MineModder2000 replied to MineModder2000's topic in Modder Support
So....... no idea why the property doesn't get changed? -
(SOLVED) [1.14.4] Block Ticking and Properties
MineModder2000 replied to MineModder2000's topic in Modder Support
I see, I'll just make two blocks instead, much easier and better for my purposes. Anyways back to the boolean property, I figured out the issue. The line : worldIn.setBlockState(pos, state.with(LIT, true), 3); in the tick method doesn't set the value to true, as confirmed by println. So whatever value it's set to in the onBlockAdded method, is what it stays as. Hence the reason the if statement check in the animateTick method fails.... -
(SOLVED) [1.14.4] Block Ticking and Properties
MineModder2000 replied to MineModder2000's topic in Modder Support
I'll do this. I want to also know how to alter a block's color / texture without changing it's state, if possible. -
(SOLVED) [1.14.4] Block Ticking and Properties
MineModder2000 replied to MineModder2000's topic in Modder Support
Oh duh, I was thinking of starting with handIn and using its methods. This is functionally the same either way, I still changed it though. This did the trick, however I would still like to know why the other thing didn't work, it bothers me not knowing. Also I may have to do something like that in the future. -
(SOLVED) [1.14.4] Block Ticking and Properties
MineModder2000 replied to MineModder2000's topic in Modder Support
Okay I got rid of the Boolean.valueOf. The cast is necessary in order for that particular method to be accessible. I tried the hand parameter to begin with, but I couldn't see any way to get the held item from it. Yes, this code is temporary, and I am contemplating even having the block constantly on fire. The reason for the lit property is that I didn't want the block to start throwing particles until it was on fire. -
(SOLVED) [1.14.4] Block Ticking and Properties
MineModder2000 replied to MineModder2000's topic in Modder Support
That's already it, I just changed the 1 to a 3. -
(SOLVED) [1.14.4] Block Ticking and Properties
MineModder2000 replied to MineModder2000's topic in Modder Support
I have confirmed that all methods are being called. The if statement inside animateTick gets runs without the check for stateIn.get(LIT). The tick method is definitely called, as my block gets a fire on top of it when activated (after 60 ticks). -
(SOLVED) [1.14.4] Block Ticking and Properties
MineModder2000 replied to MineModder2000's topic in Modder Support
3 ain't working honey. -
(SOLVED) [1.14.4] Block Ticking and Properties
MineModder2000 replied to MineModder2000's topic in Modder Support
I did, and I thought I selected the correct int flag : 1. Tried 2 as well, the rest don't seem right. -
(SOLVED) [1.14.4] Block Ticking and Properties
MineModder2000 replied to MineModder2000's topic in Modder Support
-
(SOLVED) [1.14.4] Block Ticking and Properties
MineModder2000 replied to MineModder2000's topic in Modder Support
Ah, it's fillStateContainer actually. I am trying to make it do certain animations upon activation only, however nothing inside of my if statement within animateTick is run upon such. I set it to false on block added because its true by default. -
(SOLVED) [1.14.4] Block Ticking and Properties
MineModder2000 replied to MineModder2000's topic in Modder Support
How exactly do I get boolean properties to work in blocks? I tried this : But got this : Cannot set property BooleanProperty{name=lit, clazz=class java.lang.Boolean, values=[true, false]} as it does not exist in Block{mymod:copper} -
(SOLVED) [1.14.4] Block Ticking and Properties
MineModder2000 replied to MineModder2000's topic in Modder Support
I see, that is very helpful ? -
I want to update a block (change it's state) after a certain period of time, if an action has been done. This is what I did just as a test, I know it's wrong. This'll work for the first block and get it to turn into lava after 5 or however many ticks. I'm not sure what method to actually use, as the other tick ones are deprecated and don't work. I also need to be able to grab a capability in the method so that I can use that and not an instance variable that wont work when there are multiple instances. Or.....is there a better way altogether?
-
(SOLVED) [1.14.4] Textures no longer loading
MineModder2000 replied to MineModder2000's topic in Modder Support
That was it, its been so long since I made one, that I forgot all about blockstate json files ?♂️ -
Nevermind, I just forgot about blockstates.
-
[1.14.4] Modifying Vanilla Content
MineModder2000 replied to MineModder2000's topic in Modder Support
Back to the debugger, didn't really see anything in there that stood out. -
(SOLVED) [1.14.4] Need help with Capabilities
MineModder2000 replied to MineModder2000's topic in Modder Support
Thanks again, easy fixing knowing the problem. -
(SOLVED) [1.14.4] Need help with Capabilities
MineModder2000 replied to MineModder2000's topic in Modder Support
Actually not so quick. It doesn't work (cherts don't toss) when I exit and reload a file, only works on a new game. -
(SOLVED) [1.14.4] Need help with Capabilities
MineModder2000 replied to MineModder2000's topic in Modder Support
Oh wow I wasn't familiar with that distinction, easy fix and now it FINALLY works -
(SOLVED) [1.14.4] Need help with Capabilities
MineModder2000 replied to MineModder2000's topic in Modder Support
Report -
(SOLVED) [1.14.4] Need help with Capabilities
MineModder2000 replied to MineModder2000's topic in Modder Support
Oh my, morning brain fog is to blame. TickData data = playerIn.getCapability(TickDataProvider.capability).orElseThrow(IllegalStateException::new); if (!worldIn.isRemote) { if (playerIn.ticksExisted - data.get() >= 16) { data.set(playerIn.ticksExisted); But I am still getting null pointer on the line that initializes the data object. -
(SOLVED) [1.14.4] Need help with Capabilities
MineModder2000 replied to MineModder2000's topic in Modder Support
So.... TickData data = playerIn.getCapability(TickDataProvider.capability).orElseThrow(IllegalStateException::new); if (!worldIn.isRemote) { if (playerIn.ticksExisted - playerIn.getCapability(TickDataProvider.capability).orElse(data).get() >= 16) { playerIn.getCapability(TickDataProvider.capability).orElse(data).set(playerIn.ticksExisted); That seems way to redundant to be the correct way. Anyways the capability variable set in the provider class is null (as it was in the code I copied from this thread), so that gives a null pointer error when doing that. -
(SOLVED) [1.14.4] Need help with Capabilities
MineModder2000 replied to MineModder2000's topic in Modder Support
Yes I understood this, I was asking about how to get variables from the capability. Tried this : TickDataFactory data = new TickDataFactory(); if (playerIn.ticksExisted - playerIn.getCapability(TickDataProvider.capability).orElse(data).get() >= 16) { playerIn.getCapability(TickDataProvider.capability).orElse(data).set(playerIn.ticksExisted); ....... Not quite sure how to do it though.... -
(SOLVED) [1.14.4] Need help with Capabilities
MineModder2000 replied to MineModder2000's topic in Modder Support
Well in this case the one I made custom. But I'm not sure how to retrieve data from it....