Jump to content

[1.12.2] I am new to coding. How do I add baseblock to a beacon and what does the code mean?


Recommended Posts

Posted

I just started learning how to mod and I am very confused. My mod is simply adding platinum to the game as a hello world type of project. I am learning about block properties and I think that my platinum block should be able to be the base of a beacon. I have seen many things on the internet but they don't seem to work. Can someone please help me by showing me what I should insert into my code and what it means so I can learn from this. I would be very appreciative of your time and work. Below is my code for my specific Platinum Block class:

package com.Melon9191.PlatinumMod.blocks;

import net.minecraft.block.SoundType;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.world.World;
import net.minecraft.block.*;

public class PlatinumBlock extends BlockBase 
{
	
	public PlatinumBlock(String name, Material material) 
	{
		super(name, material);
		
		setCreativeTab(CreativeTabs.BUILDING_BLOCKS);
		setSoundType(SoundType.METAL);
		setHardness(5.5F);
		setResistance(30.0F);
		setHarvestLevel("pickaxe", 2);
		
	}
}

Thank you for whatever answers you can give me!

Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.