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.

angjosar

Members
  • Joined

  • Last visited

Everything posted by angjosar

  1. Start the mod in 1.10.2, and if you register the block
  2. I've already tried all that, and nothing that lets me create the block I can pass the folder "src"
  3. If I do not register the block in client proxy, the client does not start
  4. package com.modding.WillyWonka.proxy; public interface CommonProxy { public void init(); }
  5. Help! The blocks do not load Upgrade from 1.10.2 to 1.11 and everything else works fine, except blocks, they are not registered init/ModBlocks.java : package com.modding.WillyWonka.init; import com.modding.WillyWonka.blocks.BlockChocolate; import net.minecraft.block.Block; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.item.Item; import net.minecraftforge.fml.common.registry.GameRegistry; public class ModBlocks { public static Block chocolate; public static void init() { chocolate = new BlockChocolate(); } public static void register() { GameRegistry.register(chocolate); } public static void registerRenders() { registerRender(chocolate); } private static void registerRender(Block block){ Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(Item.getItemFromBlock(block), 0, new ModelResourceLocation(block.getRegistryName(), "inventory"));} } Blocks/BlockChocolate.java package com.modding.WillyWonka.blocks; import com.ibm.icu.text.DisplayContext.Type; import com.modding.WillyWonka.Reference; import com.modding.WillyWonka.WillyWonka; import com.modding.WillyWonka.WillyWonkaTab; import net.minecraft.block.Block; import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; import net.minecraft.client.audio.Sound; public class BlockChocolate extends Block { public BlockChocolate() { super(Material.ROCK); this.setUnlocalizedName(Reference.WillyWonkanBlocks.CHOCOLATE.getUnlocalizedName()); this.setRegistryName(Reference.WillyWonkanBlocks.CHOCOLATE.getRegistryName()); this.setCreativeTab(WillyWonka.CREATIVE_TAB); this.setHardness(3.0F); this.setResistance(5.0F); this.setSoundType(SoundType.STONE); } } REFERENCES public static enum WillyWonkanBlocks { CHOCOLATE("chocolate", "BlockChocolate"); private String unlocalizedName; private String registryName; WillyWonkanBlocks(String unlocalizedName, String registryName) { this.unlocalizedName = unlocalizedName; this.registryName = registryName; } public String getUnlocalizedName() { return unlocalizedName; } public String getRegistryName() { return registryName; } } CLIENTPROXY package com.modding.WillyWonka.proxy; import com.modding.WillyWonka.init.ModBlocks; import com.modding.WillyWonka.init.ModCrafting; import com.modding.WillyWonka.init.ModItems; public class ClientProxy implements CommonProxy { @Override public void init() { ModItems.registerRenders(); ModCrafting.register(); ModBlocks.register(); } }

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.