Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

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

Featured Replies

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!

I'm afraid you're using an unsupported version of Minecraft, it would be best to update to 1.14 or 1.15 in order to receive support.

Read this for more info.

I'm eager to learn and am prone to mistakes. Don't hesitate to tell me how I can improve.

Guest
This topic is now closed to further replies.

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.