How to make Rotatable Block [VIDEO TUTORIAL]

Started by Nuparu00 on

Topic category: User side tutorials

Joined Aug 2013
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to make Rotatable Block [VIDEO TUTORIAL]
Wed, 01/04/2017 - 20:31 (edited)

Hi. Because there is not his feature in MCreater itself and many of you need it for your mod , I decided to make a video tutorial how to make custom block rotatable , using PropertyDirection.
LINK

 

 

Edited by Klemen on Wed, 01/04/2017 - 20:31
Joined Apr 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hi again. This time, I
Sat, 12/31/2016 - 02:04

Hi again. This time, I watched the video multiple times and wrote out all the code, but it still won't work. I tried it and got this huge error

[spoiler] 

Executing gradle command: build
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.
C:\Pylo\MCreator172>cd forge
C:\Pylo\MCreator172\forge>SET "JAVA_HOME=C:\Pylo\MCreator172\jdk64\"
C:\Pylo\MCreator172\forge>SET JAVA_EXE=%JAVA_HOME%\bin\java.exe
C:\Pylo\MCreator172\forge>SET PATH=%JAVA_HOME%\bin\;%PATH%
C:\Pylo\MCreator172\forge>gradlew -Dorg.gradle.jvmargs="-Xms128m -Xmx2519m" build
To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: http://gradle.org/docs/2.0/userguide/gradle_daemon.html.
****************************
 Powered By MCP:             
 http://modcoderpack.com/    
 Searge, ProfMobius, Fesh0r, 
 R4wk, ZeuX, IngisKahn, bspkrs
 MCP Data version : unknown
****************************
:compileApiJava UP-TO-DATE
:processApiResources UP-TO-DATE
:apiClasses UP-TO-DATE
:sourceMainJava
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:21: error: package net.minecraft.block.properties does not exist
import net.minecraft.block.properties.IProperty;
                                     ^
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:22: error: package net.minecraft.block.properties does not exist
import net.minecraft.block.properties.PropertyDirection;
                                     ^
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:80: error: cannot find symbol
          public static final PropertyDirection FACING = PropertyDirection.create("facing", EnumFacing.Plane.HORIZONTAL);
                              ^
  symbol:   class PropertyDirection
  location: class BlockSmokyquartzPillar
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:153: error: cannot find symbol
public IBlockState getStateForEntityRender(IBlockState state) {
                                           ^
  symbol:   class IBlockState
  location: class BlockSmokyquartzPillar
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:153: error: cannot find symbol
public IBlockState getStateForEntityRender(IBlockState state) {
       ^
  symbol:   class IBlockState
  location: class BlockSmokyquartzPillar
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:159: error: cannot find symbol
public IBlockState getStateFromMeta(int meta) {
       ^
  symbol:   class IBlockState
  location: class BlockSmokyquartzPillar
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:170: error: cannot find symbol
public int getMetaFromState(IBlockState state) {
                            ^
  symbol:   class IBlockState
  location: class BlockSmokyquartzPillar
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:175: error: cannot find symbol
protected BlockState createBlockState() {
          ^
  symbol:   class BlockState
  location: class BlockSmokyquartzPillar
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:179: error: cannot find symbol
public IBlockState onBlockPlaced(World worldIn, BlockPos pos,
                                                ^
  symbol:   class BlockPos
  location: class BlockSmokyquartzPillar
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:180: error: cannot find symbol
EnumFacing facing, float hitX, float hitY, float hitZ, int meta,
^
  symbol:   class EnumFacing
  location: class BlockSmokyquartzPillar
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:181: error: cannot find symbol
EntityLivingBase placer) {
^
  symbol:   class EntityLivingBase
  location: class BlockSmokyquartzPillar
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:179: error: cannot find symbol
public IBlockState onBlockPlaced(World worldIn, BlockPos pos,
       ^
  symbol:   class IBlockState
  location: class BlockSmokyquartzPillar
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:80: error: package EnumFacing does not exist
          public static final PropertyDirection FACING = PropertyDirection.create("facing", EnumFacing.Plane.HORIZONTAL);
                                                                                                      ^
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:80: error: cannot find symbol
          public static final PropertyDirection FACING = PropertyDirection.create("facing", EnumFacing.Plane.HORIZONTAL);
                                                         ^
  symbol:   variable PropertyDirection
  location: class BlockSmokyquartzPillar
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:84: error: cannot find symbol
this.setDefaultState(blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH));
                                                                    ^
  symbol:   variable EnumFacing
  location: class BlockSmokyquartzPillar
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:84: error: cannot find symbol
this.setDefaultState(blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH));
                     ^
  symbol:   variable blockState
  location: class BlockSmokyquartzPillar
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:152: error: method does not override or implement a method from a supertype
@Override
^
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:155: error: cannot find symbol
return getDefaultState().withProperty(FACING, EnumFacing.SOUTH);
                                              ^
  symbol:   variable EnumFacing
  location: class BlockSmokyquartzPillar
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:155: error: cannot find symbol
return getDefaultState().withProperty(FACING, EnumFacing.SOUTH);
       ^
  symbol:   method getDefaultState()
  location: class BlockSmokyquartzPillar
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:158: error: method does not override or implement a method from a supertype
@Override
^
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:160: error: cannot find symbol
EnumFacing facing = EnumFacing.getFront(meta);
^
  symbol:   class EnumFacing
  location: class BlockSmokyquartzPillar
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:160: error: cannot find symbol
EnumFacing facing = EnumFacing.getFront(meta);
                    ^
  symbol:   variable EnumFacing
  location: class BlockSmokyquartzPillar
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:162: error: package EnumFacing does not exist
if(facing.getAxis()==EnumFacing.Axis.Y) {
                               ^
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:163: error: cannot find symbol
facing=EnumFacing.NORTH;
       ^
  symbol:   variable EnumFacing
  location: class BlockSmokyquartzPillar
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:166: error: cannot find symbol
return getDefaultState().withProperty(FACING, facing);
       ^
  symbol:   method getDefaultState()
  location: class BlockSmokyquartzPillar
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:169: error: method does not override or implement a method from a supertype
@Override
^
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:171: error: cannot find symbol
return ((EnumFacing) state.getValue(FACING)).getIndex();
         ^
  symbol:   class EnumFacing
  location: class BlockSmokyquartzPillar
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:174: error: method does not override or implement a method from a supertype
@Override
^
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:176: error: cannot find symbol
return new BlockState(this, new IProperty[]{FACING});
           ^
  symbol:   class BlockState
  location: class BlockSmokyquartzPillar
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:176: error: cannot find symbol
return new BlockState(this, new IProperty[]{FACING});
                                ^
  symbol:   class IProperty
  location: class BlockSmokyquartzPillar
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:178: error: method does not override or implement a method from a supertype
@Override
^
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:182: error: cannot find symbol
return getDefaultState().withProperty(FACING, placer.getHorizontalFacing().getOpposite());
       ^
  symbol:   method getDefaultState()
  location: class BlockSmokyquartzPillar
32 errors
:compileJava FAILED
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.
BUILD FAILED
Total time: 50.226 secs
Picked up _JAVA_OPTIONS: -Xmx256M
C:\Pylo\MCreator172\forge>
Task completed with return code 0 in 53958 milliseconds [/spoiler]

It looks to me like the gradle has a problem with literally everything I put into the code. I'm now using the new MCreator for minecraft 1.7.10. Does this code just not work in this version? I'm going to try it again with a different block, and if I get the same error I'll post the code.

Thanks

Joined Apr 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I tried it with a new block
Sat, 12/31/2016 - 02:17

I tried it with a new block named RotationTest and got the same error code.

Here is the edited code for this block:

[spoiler]

package mod.mcreator;

 

import net.minecraft.world.World;

import net.minecraft.world.IBlockAccess;

import net.minecraft.util.MathHelper;

import net.minecraft.util.IIcon;

import net.minecraft.item.ItemStack;

import net.minecraft.entity.player.EntityPlayer;

import net.minecraft.creativetab.CreativeTabs;

import net.minecraft.client.renderer.texture.IIconRegister;

import net.minecraft.client.Minecraft;

import net.minecraft.block.material.Material;

import net.minecraft.block.Block;

 

import java.util.Random;

 

import cpw.mods.fml.relauncher.SideOnly;

import cpw.mods.fml.relauncher.Side;

import cpw.mods.fml.common.registry.GameRegistry;

import cpw.mods.fml.common.event.FMLServerStartingEvent;

import cpw.mods.fml.common.event.FMLPreInitializationEvent;

import net.minecraft.block.properties.IProperty;

import net.minecraft.block.properties.PropertyDirection;

 

public class mcreator_rotationTest {

 

                public mcreator_rotationTest() {

                }

 

                public static BlockRotationTest block;

 

                public static Object instance;

 

                public int addFuel(ItemStack fuel) {

                                return 0;

                }

 

                public void serverLoad(FMLServerStartingEvent event) {

                }

 

                public void preInit(FMLPreInitializationEvent event) {

 

                                GameRegistry.registerBlock(block, "RotationTest");

                }

 

                public void registerRenderers() {

                }

 

                public void load() {

                }

 

                static {

 

                                block = (BlockRotationTest) (new BlockRotationTest().setHardness(2.0F).setResistance(10.0F).setLightLevel(0.0F).setBlockName("RotationTest")

                                                                .setBlockTextureName("jabberwock_egg").setLightOpacity(0).setStepSound(Block.soundTypeStone).setCreativeTab(CreativeTabs.tabBlock));

                                block.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);

                                Block.blockRegistry.addObject(417, "RotationTest", block);

                                block.setHarvestLevel("pickaxe", 0);

                }

 

                public void generateSurface(World world, Random random, int chunkX, int chunkZ) {

                }

 

                public void generateNether(World world, Random random, int chunkX, int chunkZ) {

                }

 

                static class BlockRotationTest extends Block {

 

                                int a1 = 0, a2 = 0, a3 = 0, a4 = 0, a5 = 0, a6 = 0;

 

                                Random field_149942_b = new Random();

 

                                IIcon gor = null, dol = null, st1 = null, st2 = null, st3 = null, st4 = null;

 

                                boolean red = false;

          public static final PropertyDirection FACING = PropertyDirection.create("facing", EnumFacing.Plane.HORIZONTAL);

 

                                protected BlockRotationTest() {

                                                super(Material.ground);

            this.setDefaultState(blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH));

 

                                }

 

                                public void onBlockAdded(World world, int i, int j, int k) {

                                                EntityPlayer entity = Minecraft.getMinecraft().thePlayer;

                                                if (entity != null && world != null) {

                                                                int le = MathHelper.floor_double((double) (entity.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3;

                                                                world.setBlockMetadataWithNotify(i, j, k, le, 2);

                                                }

 

                                                world.scheduleBlockUpdate(i, j, k, this, this.tickRate(world));

 

                                }

 

                                public int isProvidingStrongPower(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5) {

                                                return red ? 1 : 0;

                                }

 

                                @SideOnly(Side.CLIENT)

                                @Override

                                public IIcon getIcon(int i, int par2) {

 

                                                if (i == 0)

                                                                return gor;

 

                                                else if (i == 1)

                                                                return dol;

 

                                                else if (i == 2)

                                                                return st1;

 

                                                else if (i == 3)

                                                                return st2;

 

                                                else if (i == 4)

                                                                return st4;

 

                                                else if (i == 5)

                                                                return st3;

 

                                                else

                                                                return gor;

 

                                }

 

                                @SideOnly(Side.CLIENT)

                                @Override

                                public void registerBlockIcons(IIconRegister reg) {

                                                this.gor = reg.registerIcon("jabberwock_egg");

                                                this.dol = reg.registerIcon("NetherCore");

                                                this.st1 = reg.registerIcon("jabberwock_egg");

                                                this.st2 = reg.registerIcon("PearlBlock");

                                                this.st3 = reg.registerIcon("jabberwock_egg");

                                                this.st4 = reg.registerIcon("jabberwock_egg");

                                }

 

                                public int getRenderType() {

                                                return 0;

                                }

 

                                @Override

                                public int tickRate(World world) {

                                                return 10;

                                }

 

                                public int quantityDropped(Random par1Random) {

                                                return 1;

                                }

@Override

public IBlockState getStateForEntityRender(IBlockState state) {

 

return getDefaultState().withProperty(FACING, EnumFacing.SOUTH);

}

 

@Override

public IBlockState getStateFromMeta(int meta) {

EnumFacing facing = EnumFacing.getFront(meta);

 

if(facing.getAxis()==EnumFacing.Axis.Y) {

facing=EnumFacing.NORTH;

}

 

return getDefaultState().withProperty(FACING, facing);

}

 

@Override

public int getMetaFromState(IBlockState state) {

return ((EnumFacing) state.getValue(FACING)).getIndex();

}

 

@Override

protected BlockState createBlockState() {

return new BlockState(this, new IProperty[]{FACING});

}

@Override

public IBlockState onBlockPlaced(World worldIn, BlockPos pos,

EnumFacing facing, float hitX, float hitY, float hitZ, int meta,

EntityLivingBase placer) {

return getDefaultState().withProperty(FACING, placer.getHorizontalFacing().getOpposite());

}

                }

} [/spoiler]

Joined Aug 2013
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You are using 1.7.10 or lower
Sat, 12/31/2016 - 02:26

You are using 1.7.10 or lower , right? 1.8 was one ofbiggest changes in metadata system because of the new .json & BlockState system. So on lower version than 1.8 the code has not any chance to work. In 1.7.10- you manually check for the metadata and set IIcon for each face. 

Joined Apr 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Oh. I'm guessing that means I
Sat, 12/31/2016 - 02:28

Oh. I'm guessing that means I'll have to change the code somehow, or use a different code?

Or is there no way to get rotatable blocks in 1.7.10 at all?

Joined Aug 2013
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Ok , I have not coded in 1.7
Sat, 12/31/2016 - 20:47

Ok , I have not coded in 1.7.10 for long time , so the iconRegister part can look in some way different but you will need +- this:

[spoiler]

@SideOnly(Side.CLIENT) 
    protected Icon bottom;    
    @SideOnly(Side.CLIENT) 
    protected Icon top;
    @SideOnly(Side.CLIENT) 
    protected Icon side;
    @SideOnly(Side.CLIENT) 
    protected Icon front;

    @SideOnly(Side.CLIENT)
    @Override
    public void registerIcons(IconRegister iconRegister) {
        this.blockIcon = iconRegister.registerIcon("something_icon");
        this.bottom = iconRegister.registerIcon("something_bottom");
        this.top = iconRegister.registerIcon("something_top");
        this.side = iconRegister.registerIcon("something_side");
        this.front = iconRegister.registerIcon("something_front");
    }

    @SideOnly(Side.CLIENT)
    @Override
    public Icon getIcon(int side, int meta) {
        int k = getOrientation(meta);
        

        
         if(meta == 0){
          if(side == 0){
              return bottom;
          }
          if(side == 0){
              return top;
          }
          if (side == 2){
              return front;
          }
                
         }
         if(meta == 1){
          if(side == 0){
              return bottom;
          }
          if(side == 0){
              return top;
          }
          if (side == 4){
              return front;
          }
                
         }
              if(meta == 2){
          if(side == 0){
              return bottom;
          }
          if(side == 0){
              return top;
          }
          if (side == 3){
              return front;
          }
                
         }
          if(meta == 3){
          if(side == 0){
              return bottom;
          }
          if(side == 0){
              return top;
          }
          if (side == 5){
              return front;
          }
                
         }
            
            return blockIcon;
    }
    
    
    public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase entityLivingBase, ItemStack itemStack) {
int l = MathHelper.floor_double((double)(entityLivingBase.rotationYaw * 4.0F /360.0F) + 2.5D) & 3;

world.setBlockMetadataWithNotify(x,y,z,l,2);

 

}
[/spoiler]

Joined Apr 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Where does that go in the
Sun, 01/01/2017 - 18:23

Where does that go in the code? Sorry, but I know barely anything about java at all.

Joined Aug 2013
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
It is all in your block class
Sun, 01/01/2017 - 18:57

It is all in your block class (the one that extends Block)

Joined Apr 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I'm guessing thst's the last
Mon, 01/02/2017 - 15:12

I'm guessing thst's the last part of the code, where it starts with

 [spoiler] static class BlockSmokyquartzPillar extends Block {

        int a1 = 0, a2 = 0, a3 = 0, a4 = 0, a5 = 0, a6 = 0;

        Random field_149942_b = new Random();

        IIcon gor = null, dol = null, st1 = null, st2 = null, st3 = null, st4 = null;

        boolean red = false;

        protected BlockSmokyquartzPillar() {
            super(Material.ground); [/spoiler]

Does the code go somewhere in that string, or after all of the @overrides followed by if/else statements? Also, does the code need to be broken up like the one from the tutorial video, or do I simply insert that entire string somewhere?

 

Joined Aug 2013
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Technically you can paste it
Mon, 01/02/2017 - 15:39

Technically you can paste it anywhere in the class , but I recommend you put variable declarations before constructor and methods after constructor.

Joined Apr 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
RE:Technically you can paste it
Mon, 01/02/2017 - 17:38

I'm sorry, but what do you mean by variable declarations? Is that an @override statement, or something else?

Also, what and where is the constructor and methods you mentioned?

Joined Aug 2013
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
This is example of a class:
Mon, 01/02/2017 - 17:45

This is example of a class:

public static class BlockTardis extends Block{

int i = 0;
public BlockTardis(){

super(Material.ground);
}

}

The italic line is a variable.
The bold part is a constructor.

Joined Apr 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I tried pasting in the spot
Tue, 01/03/2017 - 16:34

I tried pasting in the spot in bold

protected BlockSmokyquartzPillar() {
            super(Material.ground);

        }
       RIGHT HERE  

        public void onBlockAdded(World world, int i, int j, int k) {
            EntityPlayer entity = Minecraft.getMinecraft().thePlayer;
            if (entity != null && world != null) {
                int le = MathHelper.floor_double((double) (entity.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3;
                world.setBlockMetadataWithNotify(i, j, k, le, 2);
            }

and got this error:

[spoiler] 

 Powered By MCP:             
 http://modcoderpack.com/    
 Searge, ProfMobius, Fesh0r, 
 R4wk, ZeuX, IngisKahn, bspkrs
 MCP Data version : unknown
****************************
:compileApiJava UP-TO-DATE
:processApiResources UP-TO-DATE
:apiClasses UP-TO-DATE
:sourceMainJava
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:83: error: cannot find symbol
    protected Icon bottom;    
              ^
  symbol:   class Icon
  location: class BlockSmokyquartzPillar
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:85: error: cannot find symbol
    protected Icon top;
              ^
  symbol:   class Icon
  location: class BlockSmokyquartzPillar
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:87: error: cannot find symbol
    protected Icon side;
              ^
  symbol:   class Icon
  location: class BlockSmokyquartzPillar
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:89: error: cannot find symbol
    protected Icon front;
              ^
  symbol:   class Icon
  location: class BlockSmokyquartzPillar
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:93: error: cannot find symbol
    public void registerIcons(IconRegister iconRegister) {
                              ^
  symbol:   class IconRegister
  location: class BlockSmokyquartzPillar
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:103: error: cannot find symbol
    public Icon getIcon(int side, int meta) {
           ^
  symbol:   class Icon
  location: class BlockSmokyquartzPillar
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:161: error: cannot find symbol
    public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase entityLivingBase, ItemStack itemStack) {
                                                                  ^
  symbol:   class EntityLivingBase
  location: class BlockSmokyquartzPillar
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:92: error: method does not override or implement a method from a supertype
    @Override
    ^
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:104: error: cannot find symbol
        int k = getOrientation(meta);
                ^
  symbol:   method getOrientation(int)
  location: class BlockSmokyquartzPillar
9 errors
FAILURE: Build failed with an exception.
:compileJava FAILED
* What went wrong:
Execution failed for task ':compileJava'.
BUILD FAILED
Total time: 3 mins 2.843 secs
> 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.
Picked up _JAVA_OPTIONS: -Xmx256M
C:\Pylo\MCreator172\forge>
Task completed with return code 0 in 186673 milliseconds [/spoiler]

and also here: 

protected BlockSmokyquartzPillar() {
          RIGHT HERE 
            super(Material.ground);

 

and got this error code

[spoiler] 

:compileApiJava UP-TO-DATE
:processApiResources UP-TO-DATE
:apiClasses UP-TO-DATE
:sourceMainJava
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:90: error: ';' expected
    public void registerIcons(IconRegister iconRegister) {
                             ^
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:90: error: ';' expected
    public void registerIcons(IconRegister iconRegister) {
                                                       ^
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:100: error: ';' expected
    public Icon getIcon(int side, int meta) {
                       ^
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:100: error:  expected
    public Icon getIcon(int side, int meta) {
                                 ^
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:100: error: not a statement
    public Icon getIcon(int side, int meta) {
                                      ^
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:100: error: ';' expected
    public Icon getIcon(int side, int meta) {
                                          ^
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:158: error: illegal start of expression
    public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase entityLivingBase, ItemStack itemStack) {
    ^
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:158: error: illegal start of expression
    public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase entityLivingBase, ItemStack itemStack) {
           ^
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:158: error: ';' expected
    public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase entityLivingBase, ItemStack itemStack) {
                               ^
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:158: error:  expected
    public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase entityLivingBase, ItemStack itemStack) {
                                            ^
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:158: error: not a statement
    public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase entityLivingBase, ItemStack itemStack) {
                                                 ^
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:158: error: ';' expected
    public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase entityLivingBase, ItemStack itemStack) {
                                                  ^
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:158: error:  expected
    public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase entityLivingBase, ItemStack itemStack) {
                                                          ^
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:158: error: not a statement
    public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase entityLivingBase, ItemStack itemStack) {
                                                               ^
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:158: error: ';' expected
    public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase entityLivingBase, ItemStack itemStack) {
                                                                ^
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:158: error: ';' expected
    public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase entityLivingBase, ItemStack itemStack) {
                                                                                                              ^
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:158: error: not a statement
    public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase entityLivingBase, ItemStack itemStack) {
                                                                                                               ^
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:158: error: ';' expected
    public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase entityLivingBase, ItemStack itemStack) {
                                                                                                                        ^
18 errors
:compileJava FAILED
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.
BUILD FAILED
Total time: 34.725 secs
Picked up _JAVA_OPTIONS: -Xmx256M
C:\Pylo\MCreator172\forge>
Task completed with return code 0 in 36877 milliseconds [/spoiler]

 

I just can't seem to figure out what is wrong with it.

Joined Aug 2013
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Heh.. seems like it is really
Tue, 01/03/2017 - 21:34

Heh.. seems like it is really long since I used 1.7.10. In this case I did mistakes here.
So fist change every Icon to IIcon (even in the IconRegister word) , and also remove this "int k = getOrientation(meta);"

Joined Apr 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I tried the revised code in
Wed, 01/04/2017 - 01:32

I tried the revised code in the same two spots as last, and got these error codes respectively:

[spoiler]

:compileApiJava UP-TO-DATE
:processApiResources UP-TO-DATE
:apiClasses UP-TO-DATE
:sourceMainJava
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:94: error: '(' expected
    public void register IIcons( IIconRegister  IIconRegister) {
                         ^
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:95: error: not a statement
        this.block IIcon =  IIconRegister.register IIcon("something_ IIcon");
            ^
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:95: error: ';' expected
        this.block IIcon =  IIconRegister.register IIcon("something_ IIcon");
                  ^
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:95: error: ';' expected
        this.block IIcon =  IIconRegister.register IIcon("something_ IIcon");
                                                  ^
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:96: error: ';' expected
        this.bottom =  IIconRegister.register IIcon("something_bottom");
                                             ^
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:97: error: ';' expected
        this.top =  IIconRegister.register IIcon("something_top");
                                          ^
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:98: error: ';' expected
        this.side =  IIconRegister.register IIcon("something_side");
                                           ^
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:99: error: ';' expected
        this.front =  IIconRegister.register IIcon("something_front");
                                            ^
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:103: error: ';' expected
    public  IIcon get IIcon(int side, int meta) {
                     ^
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:103: error: invalid method declaration; return type required
    public  IIcon get IIcon(int side, int meta) {
                      ^
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:156: error: ';' expected
            return block IIcon;
                        ^
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:156: error: not a statement
            return block IIcon;
                         ^
12 errors
:compileJava FAILED
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.
BUILD FAILED
Total time: 1 mins 1.687 secs
Picked up _JAVA_OPTIONS: -Xmx256M
C:\Pylo\MCreator172\forge>
Task completed with return code 0 in 66889 milliseconds [/spoiler]

[spoiler]

:compileApiJava UP-TO-DATE
:processApiResources UP-TO-DATE
:apiClasses UP-TO-DATE
:sourceMainJava
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:89: error: ';' expected
    public void register IIcons( IIconRegister  IIconRegister) {
                        ^
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:89: error: ')' expected
    public void register IIcons( IIconRegister  IIconRegister) {
                                              ^
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:89: error: illegal start of expression
    public void register IIcons( IIconRegister  IIconRegister) {
                                                             ^
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:89: error: ';' expected
    public void register IIcons( IIconRegister  IIconRegister) {
                                                              ^
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:90: error: not a statement
        this.block IIcon =  IIconRegister.register IIcon("something_ IIcon");
            ^
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:90: error: ';' expected
        this.block IIcon =  IIconRegister.register IIcon("something_ IIcon");
                  ^
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:90: error: ';' expected
        this.block IIcon =  IIconRegister.register IIcon("something_ IIcon");
                                                  ^
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:91: error: ';' expected
        this.bottom =  IIconRegister.register IIcon("something_bottom");
                                             ^
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:92: error: ';' expected
        this.top =  IIconRegister.register IIcon("something_top");
                                          ^
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:93: error: ';' expected
        this.side =  IIconRegister.register IIcon("something_side");
                                           ^
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:94: error: ';' expected
        this.front =  IIconRegister.register IIcon("something_front");
                                            ^
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:98: error: ';' expected
    public  IIcon get IIcon(int side, int meta) {
                     ^
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:98: error: invalid method declaration; return type required
    public  IIcon get IIcon(int side, int meta) {
                      ^
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:151: error: ';' expected
            return block IIcon;
                        ^
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:151: error: not a statement
            return block IIcon;
                         ^
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:162: error: illegal start of type
         super(Material.ground);
         ^
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:162: error:  expected
         super(Material.ground);
                              ^
C:\Pylo\MCreator172\forge\build\sources\java\mod\mcreator\mcreator_smokyquartzPillar.java:234: error: class, interface, or enum expected
}
^
:compileJava FAILED
18 errors
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.
BUILD FAILED
Total time: 38.371 secs
Picked up _JAVA_OPTIONS: -Xmx256M
C:\Pylo\MCreator172\forge>
Task completed with return code 0 in 41031 milliseconds [/spoiler]