Jump to content

BlockInit Error


iCollin

Recommended Posts

I don't know what I've done but I've messed up some how and I don't know how to fix it 

package com.igc.sbpm.core.init;

import com.igc.sbpm.SBPM;

import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.SoundType;
import net.minecraft.world.level.material.Material;
import net.minecraft.world.level.material.MaterialColor;
import net.minecraftforge.fmllegacy.RegistryObject;
import net.minecraftforge.registries.DeferredRegister;
import net.minecraftforge.registries.ForgeRegistries;

public class BlockInit {
	public static final DeferredRegister<Block> BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS,
			SBPM.MOD_ID);

	public static final RegistryObject<Block> SLATE_BLOCK = BLOCKS
			.register("slate_block",
					() -> new Block(AbstractBlock.Properties.create(Material.STONE, MaterialColor.STONE)
							.hardnessAndResistance(1.5f, 0.7f).harvestTool(ToolType.PICKAXE).harvestLevel(2)
							.sound(SoundType.STONE)));
}

it shows a error under AbstractBlock, Properties and Tool Type

Link to comment
Share on other sites

join the forge discord server via link, go to the #bot-commands text channel
typ in the command above and replace "<class-name>" with the class name you want to know
for example:

!mcp -c moj AbstractBlock

the bot returns:

MC 1.16.5: net/minecraft/world/level/block/state/BlockBehaviour
Name: ceg => net/minecraft/world/level/block/state/BlockBehaviour
Side: BOTH
AT: public net.minecraft.block.AbstractBlock

the new name of AbstractBlock is now net.minecraft.world.level.block.state.BlockBehaviour

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

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