
-
Custom made block (with a custom model) not showing up at all in game. (1.16.1)
I could not find any spot where init was called. Apparently I forgot to call RegistryHandler.init() in my main Java class. Thanks for the help, I probably would not have noticed that.
-
Custom made block (with a custom model) not showing up at all in game. (1.16.1)
public static void init() { ITEMS.register(FMLJavaModLoadingContext.get().getModEventBus()); BLOCKS.register(FMLJavaModLoadingContext.get().getModEventBus()); } That is a spot in my RegistryHandler class. Sorry, I am a little confused.
-
Custom made block (with a custom model) not showing up at all in game. (1.16.1)
I just checked with /setblock and neither the block or the item exist.
-
GlitchyTurtle546YT changed their profile photo
-
Custom made block (with a custom model) not showing up at all in game. (1.16.1)
I decided to make a minecraft mod and I made a block with a custom model that is one block wide and two blocks tall. After adding in what I needed to, IntelliJ had no errors so I thought that everything would work. However, when I loaded into my game everything worked fine, except that my custom block didn't exist at all. My custom tab was blank, it wasn't in any of the vanilla tabs (or my other custom tab), and it said that the block was invalid and didn't exist when I tried to use the /give command to give me the block manually. IntelliJ still gave no errors. How do I fix this? Here is my Registry Handler class. package com.gt546.gfasm.util; import com.gt546.gfasm.GFASM; import com.gt546.gfasm.blocks.OakChair; import net.minecraft.block.Block; import net.minecraft.item.BlockItem; import net.minecraft.item.Item; import net.minecraftforge.fml.RegistryObject; import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; import net.minecraftforge.registries.DeferredRegister; import net.minecraftforge.registries.ForgeRegistries; public class RegistryHandler { public static final DeferredRegister<Item> ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, GFASM.MOD_ID); public static final DeferredRegister<Block> BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, GFASM.MOD_ID); public static void init() { ITEMS.register(FMLJavaModLoadingContext.get().getModEventBus()); BLOCKS.register(FMLJavaModLoadingContext.get().getModEventBus()); } //Furniture Blocks public static final RegistryObject<Block> OAK_CHAIR = BLOCKS.register("oak_chair", OakChair::new); //Furniture Block Items public static final RegistryObject<Item> OAK_CHAIR_ITEM = ITEMS.register("oak_chair", () -> new BlockItem(OAK_CHAIR.get(), new Item.Properties().group(GFASM.FTAB))); //Statue Blocks //Statue Block Items } And here is my main block class. package com.gt546.gfasm.blocks; import net.minecraft.block.*; import net.minecraft.block.material.Material; import net.minecraft.item.BlockItemUseContext; import net.minecraft.state.DirectionProperty; import net.minecraft.state.StateContainer; import net.minecraft.util.Mirror; import net.minecraft.util.Rotation; import net.minecraftforge.common.ToolType; import javax.annotation.Nullable; public class OakChair extends Block { private static final DirectionProperty FACING = HorizontalBlock.HORIZONTAL_FACING; public OakChair() { super(AbstractBlock.Properties.create(Material.WOOD) .hardnessAndResistance(3.5f, 4.0f) .sound(SoundType.WOOD) .harvestLevel(0) .harvestTool(ToolType.AXE) .setRequiresTool()); } @Nullable @Override public BlockState getStateForPlacement(BlockItemUseContext context) { return this.getDefaultState().with(FACING, context.getPlacementHorizontalFacing().getOpposite()); } @Override public BlockState rotate(BlockState state, Rotation rot) { return state.with(FACING, rot.rotate(state.get(FACING))); } @Override public BlockState mirror(BlockState state, Mirror mirrorIn) { return state.rotate(mirrorIn.toRotation(state.get(FACING))); } @Override protected void fillStateContainer(StateContainer.Builder<Block, BlockState> builder) { builder.add(FACING); } }
-
How do you make yourself invincible with armor?
I have tried a bunch of different numbers and it still wasn't working. I just need the armor to make me invincible. I searched all over google but it kept thinking that I wanted to make myself invisible so it was no use. I checked here and found one thing. The value 25. Except that was in 2016 and it is now 2020 so things must have changed because that didn't work either.. Just saying though I am making this mod for 1.15.2, not anything related to 1.16.
-
Minecraft mods not loading from IntelliJ after adding custom armor.
Thanks so much! it now works perfectly.
-
Minecraft mods not loading from IntelliJ after adding custom armor.
Yes just the vanilla models with custom textures. I put the item textures in Minecraft Modding\MemeCraft\src\main\resources\assets\meme546\textures\items , and the model textures in Minecraft Modding\MemeCraft\src\main\resources\assets\meme546\textures\models\armor . Everything has their correct name with the items having the same name you would type in the chat to get them through /give or place them with /setblock and having the model textures be called no_u_layer_1 and no_u_layer_2 .
-
Minecraft mods not loading from IntelliJ after adding custom armor.
I checked the EquipmentSlotType class and the only thing that was mentioned was this. /** * Gets the actual slot index. */ public int getSlotIndex() { return this.slotIndex; } I then also checked the two classes that I changed (RegistryHandler and ModArmorMaterial) and I couldn't find any numbers inside square brackets. I have also tried decreasing some of the numbers like the maxDamageFactor, toughness, enchantability, etc. but nothing changed. Here is a screenshot from the game.
-
Minecraft mods not loading from IntelliJ after adding custom armor.
How do I fix the problem then? Is one of my values too high?
-
Minecraft mods not loading from IntelliJ after adding custom armor.
It kept giving me the -200 error when uploading so here is the debug.log on google drive https://drive.google.com/file/d/1-AObZW1DpUYiJFwSZLJ_rkZ4LEWlOkVx/view?usp=sharing
-
Minecraft mods not loading from IntelliJ after adding custom armor.
Here is my code from my ModArmorMaterial Enum and from my RegistryHandler Class. Both in TXT form because I would have to upload many images. ModArmorMaterial.txt RegistryHandler.txt
-
Minecraft mods not loading from IntelliJ after adding custom armor.
So I decided I wanted to make a mc mod but I didnt know any coding so I watched a tutorial and was getting pretty far. I got to armor but when I went to test the armor it couldn't load the mod? I tried updating the forge version from 1.15.2 to 1.16.1 but that broke even more things so I went back to 1.15.2 . What can I do to fix this?
IPS spam blocked by CleanTalk.