#[RESOLVED] My Logic Gates crash the game

34 messages ยท Page 1 of 1 (latest)

ruby hemlock
#

I'm trying to make a logic gate, in this case, a NOT gate. This block should behave roughly like a repeater, without the delay option, or the locked option, and inverting the signal it gets (input > 0 makes output = 0, and input = 0 gives output = 15). For some reason though, the game first off all, doesn't really wire the redstone to my NOT gate, and the NOT gate doesn't emit power either, and it tends to crash the game too, with the message: Caused by: java.lang.IllegalArgumentException: Cannot get property BooleanProperty{name=powered, clazz=class java.lang.Boolean, values=[true, false]} as it does not exist in Block{turingcomplete:not_gate_block}. The code for my block is included below.

Can someone help me out and point out the things I'm doing wrong?

#

I feel like I don't really know what I'm doing ๐Ÿ˜…

cunning rune
#

you must add the property to the block with I think it is appendBlockProperties or similar

ruby hemlock
#

So this would happen in the builder? That means outside of this file, right? In another file that essentially calls this class?

ruby hemlock
#

This worked, thank you! Only problem is now that I don't want redstone to connect to the side of this block. How do I stop this?

ruby hemlock
#

And I have black pixels from the redstone torch texture I've placed similarly to the torches placed on a comparator. The corners of the redstone torch activated texture is black, when it should be see-through

ruby hemlock
#

I figured out the Redstone connecting, but I still have the black pixels

ruby hemlock
#

My Logic Gates crash the game

ruby hemlock
#

I almost have it, but not quite, I'm using client entrypoint to try to set rendertype, but I can't seem to figure out how to refer to my block from there?

sand gull
ruby hemlock
#

What do you mean?

#

I tried that, but it then errors

#

Probably doing it wrong somehow ๐Ÿ˜…

ruby hemlock
#

Oh, right, I ran into this error: error: package net.fabricmc.fabric.api.blockrenderlayer.v1 does not exist. Think that was the only issue from here on out ๐Ÿ˜…

sand gull
#

!!splitsources maybe?

urban cedarBOT
#
Split Sources

Split Sources provide a compile-time guarantee against calling client only Minecraft code or client only API on the server.

Client-only code can be placed in client, and code that is common to client and server can be placed in main. Client-only code can refer code in main, but not the other way.

Read more: Split Client and Common code - Fabric Loom

ruby hemlock
#

How do I implement this? and probably more importantly, where? ๐Ÿ˜‚

#

oh, I can't read

#

But it's already in my build.gradle file

#

So it's not that?

sand gull
#

If it's not in the client module, I shouldn't work

ruby hemlock
#

Ah

#

So this is wrong

#

Move that over to client > java > name.turingcomplete?

sand gull
#

If your project came with split sources, you should already have a client module with a client mod initializer. If you try there, it should work

ruby hemlock
#

Indeed it was already there!

#

And that worked, so it's all functional now!

#

Thank you so much, this post is now Resolved :)

#

[RESOLVED] My Logic Gates crash the game

sand gull
#

Thank you for tagging it as solved

ruby hemlock
#

No problem :)