[VIDEO TUTORIAL] - Log-like Block Rotation

Started by Nuparu00 on

Topic category: User side tutorials

Active 1 year ago
Joined Aug 2013
Points:
1162

User statistics:

  • Modifications: 4
  • Forum topics: 6
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 737
[VIDEO TUTORIAL] - Log-like Block Rotation

Hey guys!
I have created a short video about making a block rotate like logs/pillars, so if you are interested, you can check it HERE.

Active 6 years ago
Joined Oct 2018
Points:
681

User statistics:

  • Modifications: 0
  • Forum topics: 2
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 5
I got this error: C:\Pylo…
Sun, 10/28/2018 - 15:32

I got this error:

C:\Pylo\MCreator180\forge\build\sources\main\java\mod\mcreator\mcreator_logEucalyptus.java:74: error: constructor BlockLog in class BlockLog cannot be applied to given types;
            super(Material.WOOD);
            ^
  required: no arguments
  found: Material
  reason: actual and formal argument lists differ in length
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
 

Active 1 year ago
Joined Aug 2013
Points:
1162

User statistics:

  • Modifications: 4
  • Forum topics: 6
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 737
BlockLog has always as…
Sun, 10/28/2018 - 16:13

BlockLog has always as material wood, so you can not change it. You have to either replace super(Material.WOOD); by super(); or extend BlockRotatedPillar instead.

Active 5 years ago
Joined Mar 2016
Points:
1311

User statistics:

  • Modifications: 7
  • Forum topics: 76
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 310
well i did try but i get…
Tue, 10/30/2018 - 05:12

well i did try but i get error 

Active 1 year ago
Joined Aug 2013
Points:
1162

User statistics:

  • Modifications: 4
  • Forum topics: 6
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 737
Well, unless you paste the…
Tue, 10/30/2018 - 10:59

Well, unless you paste the log + your code, I can not really help.

Active 1 year ago
Joined Aug 2013
Points:
1162

User statistics:

  • Modifications: 4
  • Forum topics: 6
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 737
Ok. Keep calm. Just past…
Tue, 10/30/2018 - 21:24

Ok. Keep calm. Just past your code and/or error you got on pastebin.com and paste the link here, so I can know what error you got and then help you

Active 5 months ago
Joined Apr 2014
Points:
1223

User statistics:

  • Modifications: 2
  • Forum topics: 27
  • Wiki pages: 1
  • MCreator plugins: 0
  • Comments: 656
cool but how about furnace…
Tue, 10/30/2018 - 23:13

cool but how about furnace like rotation ? :)

Active 1 year ago
Joined Aug 2013
Points:
1162

User statistics:

  • Modifications: 4
  • Forum topics: 6
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 737
Oh, I see now what you mean…
Tue, 10/30/2018 - 23:30

Oh, I see now what you mean. The problem is not actually even in the block itself but in the structure. The MCreator code gets the default state from the log block, which is the one rotated along X-axis, but for trees, you almost always want Y-axis. One way to fix it should be replacing getDefaultState()  (that hopefully is somewhere in the code) with getStateFromMeta(0) in the code of the tree. You might possibly need to replace 0 with number 0 - 3, but at the end, that should do the trick.

Active 5 years ago
Joined Mar 2016
Points:
1311

User statistics:

  • Modifications: 7
  • Forum topics: 76
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 310
what 
Wed, 10/31/2018 - 02:13

what 

Active 1 year ago
Joined Aug 2013
Points:
1162

User statistics:

  • Modifications: 4
  • Forum topics: 6
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 737
I have already done a video…
Wed, 10/31/2018 - 13:23

I have already done a video about the 4-directional rotation, a few years ago, but I guess it is somehow outdated these days. Basically, the easiest approach is extending BlockHorizontal and then overriding several methods (the same that I had overridden in an example in some comment under the video). The .json file itself is pretty much the same as it was in the video.

Active 5 years ago
Joined Mar 2016
Points:
1311

User statistics:

  • Modifications: 7
  • Forum topics: 76
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 310
ok but i don't get it 
Thu, 11/01/2018 - 11:04

ok but i don't get it