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.

ColonSlash

Members
  • Joined

  • Last visited

  1. I'm new to modding, but I have knowledge of relatively basic java a la APCS. I'm working on a mod for a school project of sorts and I've tried looking at several different tutorials for creating blocks and I've basically copy/pasted this basic block code. package com.example.atm.blocks; import com.example.atm.ATM_Mod; import jdk.nashorn.internal.ir.Block; import net.minecraft.block.material.Material; import net.minecraftforge.common.ToolType; import net.minecraftforge.event.RegistryEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.registries.ObjectHolder; @Mod.EventBusSubscriber(modid = ATM_Mod.ID, bus = Mod.EventBusSubscriber.Bus.MOD) @ObjectHolder(ATM_Mod.ID) public class ATMBlock { public static final Block ATM = null; /** * The actual event handler that registers the custom blocks. * * @param event The event this event handler handles */ @SubscribeEvent public static void registerBlocks(RegistryEvent.Register<Block> event) { //In here you pass in all block instances you want to register. //Make sure you always set the registry name. event.getRegistry().registerAll( new Block(Block.Properties.create(Material.IRON).hardnessAndResistance(5).harvestLevel(2).harvestTool(ToolType.PICKAXE)).setRegistryName(ATM_Mod.ID, "atm") ); } } However, the Block in RegistryEvent.Register<Block> says that it isnt within bound, and Properties of Block.Properties cannot be resolved. I cant see any difference between this and many other tutorials for basic blocks, can anyone help? I can find very few resources on 1.14.4 and the ones I do look about the same as what I have. I'm using JDK 1.8.0_231, forge 1.14.4-28.1.0 (the recommended version on the downloads page), and intellij 2019.2.

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.