2020.2 how to make cables

Started by danhowe0 on

Topic category: Help with Minecraft modding (Java Edition)

Active 1 year ago
Joined Apr 2020
Points:
655

User statistics:

  • Modifications: 0
  • Forum topics: 4
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 5
2020.2 how to make cables

Im looking to make a mod that deals with power and energy and cant seem to make a cable that connects to a block or other cable next to it. how would i do this in mcreator 2020.2

 

Active 1 year ago
Joined Apr 2020
Points:
655

User statistics:

  • Modifications: 0
  • Forum topics: 4
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 5
Also if anyone finds it…
Fri, 04/24/2020 - 21:03

Also if anyone finds it easier to do than explain then say and ill add you to collab on my project temporarily and then review it to see what you did.

Active 1 year ago
Joined May 2019
Points:
717

User statistics:

  • Modifications: 0
  • Forum topics: 9
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 18
I might have a solution, but…
Fri, 04/24/2020 - 21:13

I might have a solution, but i haven't tried it myself yet

 

Active 1 year ago
Joined Apr 2020
Points:
655

User statistics:

  • Modifications: 0
  • Forum topics: 4
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 5
Okay. Try it and let me know…
Sat, 04/25/2020 - 10:30

Okay. Try it and let me know then or explain the concept here please.

Active 11 months ago
Joined Dec 2017
Points:
1040

User statistics:

  • Modifications: 3
  • Forum topics: 50
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 138
Im currently making cables…
Sat, 04/25/2020 - 12:13

Im currently making cables that can transport items and energy and I found a way to make cables connect that can connect to all 6 sides (that would be 64 possibilities 2^6)

You would have to create 10-14 different models (if I calculated correctly) and enable D/U/N/S/W/E rotation to all of them dont know why but when I set it to Y-axis it crashes the game. (I made it able to connect with 0,1 or 2 cables currently) Then make a procedure that all cables trigger when neighbour block changed and on update tick that checks all 6 sides and replaces the block at XYZ with a new block and changes Rotation to make it connect. Now that procedure would take around 8000+ procedure blocks if it can also transport nbt or items but there is a way to compact it by making If else Statements that checks the block at Y+1 then in both (If and else) Segments you put another if else that checks it only for an other coordinate and repeat that for all 6 sides (X-1/X+1/Y-1/Y+1/Z+1/Z-1) and then put the [replace block at procedure block] and [Set Rotation of block at XYZ] there. You also need to enable tile Entity for all cable parts.

Here`s an Image of how I made it:

(Too large to fit in a single image)

 

Cable-System-prototype

You need a procedure [when block added] that sets a logic NBT true for every cable because if you dont you have to check for every cable part that would cost too much procedure parts ((~60)*64 = 3800+) just for checking.

I currently havent made all models so I just print to Chat that there is no model because else it would say "Missing if part"

 

Here`s how it currently looks in-game:

Cablesystem

I just trial and errored a bit to make the Rotation correct

Hope I could help :)

Active 1 year ago
Joined Jun 2015
Points:
1277

User statistics:

  • Modifications: 10
  • Forum topics: 32
  • Wiki pages: 0
  • MCreator plugins: 1
  • Comments: 543
Why are you making several…
Sat, 04/25/2020 - 13:24

Why are you making several blocks for your cable?
Just make several models and with NBT you can choose what model is displayed!
And you can also modify the hitbox according to this.

Active 11 months ago
Joined Dec 2017
Points:
1040

User statistics:

  • Modifications: 3
  • Forum topics: 50
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 138
How? I mean what do you mean…
Sat, 04/25/2020 - 14:07

How? I mean what do you mean by choosing what model is displayed using NBT? Is it even possible to make block states and if yes how?

Active 1 year ago
Joined Jun 2015
Points:
1277

User statistics:

  • Modifications: 10
  • Forum topics: 32
  • Wiki pages: 0
  • MCreator plugins: 1
  • Comments: 543
Yes it's possible. Look at…
Sat, 04/25/2020 - 22:09

Yes it's possible. Look at furnace : if the furnace is smelting something, its texture changes. Basically it's a boolean system inside your block's code. Every tick, you can check if your block's NBT tag is true and if yes, you turn your block's boolean true too.
Then, in the blockstate file of your block, you can add "bolean=true" and "boolean=false" and choose what model is displayed.
You can also do that with ints.

I have a friend good at making tutorials who will make one about that when his MCreator will be fixed (he has some unfortunate problems with it so...)

Active 11 months ago
Joined Dec 2017
Points:
1040

User statistics:

  • Modifications: 3
  • Forum topics: 50
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 138
Ok thx for help…
Sun, 04/26/2020 - 11:04

Ok thx for help unfortunately I cannot code so I`ll let my current system stay as it is and when your friend releases the tutorial I`ll try to optimize that.

So I think I will later make a number NBT that goes from 1 to 64 for every state and in the Code I have to check for every value and change the model and somehow also the rotation. Item or Energy transport could be done using that procedure I made that instead of setting a block and the rotation it checks its own number NBT and adds the own energy NBT to that of the neighbor cable plus an additional "import" logic NBT to see in which direction to send the items or Energy. And if one has multiple connections it will check which cable has the "import" NBT true and just split the amount of items to the other neighboring cables.

What do you think?

Could you also please send me a link to your friends tutorial when he`s done?

Active 5 years ago
Joined Jun 2020
Points:
628

User statistics:

  • Modifications: 0
  • Forum topics: 0
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 2
Hello , it's really cool…
Wed, 06/03/2020 - 12:57

Hello ,

it's really cool what you did. you can send me your cable procedure please

thank you. 😁

Active 1 year ago
Joined Jun 2015
Points:
1277

User statistics:

  • Modifications: 10
  • Forum topics: 32
  • Wiki pages: 0
  • MCreator plugins: 1
  • Comments: 543
I'm sorry Yusufhum3 I…
Wed, 06/03/2020 - 13:00

I'm sorry Yusufhum3 I totally forget to give u the link to the tutorial to change a block's texture without having multiple blocks elements. Here is the link : https://www.youtube.com/watch?v=M2ksabM0xR8

Active 9 months ago
Joined Jun 2019
Points:
2793

User statistics:

  • Modifications: 4
  • Forum topics: 48
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 3704
this looks promising.
Wed, 06/03/2020 - 13:07

this looks promising.

Active 5 years ago
Joined Jun 2020
Points:
628

User statistics:

  • Modifications: 0
  • Forum topics: 0
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 2
he is french like me. xD…
Wed, 06/03/2020 - 13:14

he is french like me. xD Max094_Reikeb

Active 3 years ago
Joined Sep 2017
Points:
823

User statistics:

  • Modifications: 6
  • Forum topics: 6
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 78
hey i have exactly the same…
Thu, 06/18/2020 - 15:17

hey i have exactly the same problem xD it seems that Mcreator doesn't handles the fact that a custom models (or a block) can be turn in the Y axis while he is facing up.

Active 4 years ago
Joined Aug 2020
Points:
621

User statistics:

  • Modifications: 0
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 3
hello, could you give me the…
Mon, 10/12/2020 - 17:00

hello, could you give me the procedure of your cable, thanks in advance