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.

xX_deadbush_Xx

Members
  • Joined

  • Last visited

Everything posted by xX_deadbush_Xx

  1. Hi, I made a custom poison effect and I was wondering if there was a way to change the color of the players heart display. The vanilla poision has exactly this effect, but it is built into the renderPlayerStats method in IngameGui. Is there a way to make the hearts a different color without having to make a core mod and overwriting the IngameGui class? I was thinking about just drawing something over the vanilla hearts... But I dont know ehere to even start something like that...
  2. Hey there, I just started a new mod and when I lauched it for the first time none of my items were loading. I did some troubleshooting and eventually I found out that the constructor of my main mod file (the one with the Mod annotation) is not being called at all! I have checked the mods.toml file but its all correct. The annotations are correct too. In minecraft the mod shows up as loaded. But as I said, none of the items are registered since the constructor was never called. @Mod("witchcraftmod") @EventBusSubscriber(modid = "witchcraftmod", bus = Bus.MOD) public class WitchcraftMod { public static final String MOD_ID = "witchcraftmod"; public static WitchcraftMod instance; public WitchcraftMod() { System.exit(0); //<---- I put this here to test if the constructor is called, but since minecraft starts normally Im assuming its not final IEventBus modEventBus = FMLJavaModLoadingContext.get().getModEventBus(); modEventBus.addListener(this::setup); modEventBus.addListener(this::doClientStuff); ModItems.ITEMS.register(modEventBus); ModBlocks.BLOCKS.register(modEventBus); Features.FEATURES.register(modEventBus); MinecraftForge.EVENT_BUS.register(this); instance = this; } Does anyone know what I shoulkd do to troubleshoot this further or maybe even how to solve this issue?
  3. Hello, I'm trying to make custom recipes for my "altar block". I also want to make it JEI compatible. As far as I know all the necessary classes are in place and I only need to add a few more methods to get everything working. Right now I am stuck on the registerRecipes() method in my JEIPlugin class (the main class with the JEIPlugin annotation)... in the registerRecipes method I want to register all the recipes from my ALTAR_TYPE RecipeType. In the botania mod (where I copied a lot of the recipe code from) its done like this: registry.addRecipes(Minecraft.getInstance().world.getRecipeManager().getRecipes(ModRecipeTypes.TYPE).values(), Category.UID); However, this was coded in mc 1.14 (I think) and in 1.15.2 getRecipes(RecipeType) is a private method. There is also a public getRecipes which takes in the recipe type, the world and an inventory. I dont know what inventory I need to give it or if that is even the correct method... Can anyone help me here?
  4. Thank you very much, I have looked into the example classes and I was missing all of the tag and packet methods! I dont really understand what the difference between them is and when I need them but I put them all in and it worked!
  5. Hey guys, I'm trying to make a block that stores a single Itemstack using nbt. If an Item is stored it gets displayed above the block. Itemstacks can be placed in the block by clicking. This works fine and the block also maintains the item when I rejoin the world. For some reason the item is not rendered anymore when you rejoin. When the block that should have an item inside is clicked you get the item back so it seems like it was stored properly... But why doesnt it render? Here is my Tile entity class: https://pastebin.com/JYJagNnN The render function in my tile entity renderer looks roughly like this: @Override public void render(DeadbushAltarPedestalTileEntity tileEntityIn, float partialTicks, MatrixStack matrixStackIn, IRenderTypeBuffer bufferIn, int combinedLightIn, int combinedOverlayIn) { if(tileEntityIn.hasItem()) { long time = System.currentTimeMillis(); Quaternion rotation = Vector3f.YP.rotationDegrees((time/20)%360); matrixStackIn.push(); matrixStackIn.translate(0.5, 1.3, 0.5); matrixStackIn.scale(0.6f, 0.6f, 0.6f); matrixStackIn.rotate(rotation); ItemRenderer itemRenderer = Minecraft.getInstance().getItemRenderer(); ItemStack stack = tileEntityIn.getPedestalItems(); IBakedModel ibakedmodel = itemRenderer.getItemModelWithOverrides(stack, tileEntityIn.getWorld(), null); itemRenderer.renderItem(stack, ItemCameraTransforms.TransformType.FIXED, true, matrixStackIn, bufferIn, combinedLightIn, combinedOverlayIn, ibakedmodel); matrixStackIn.pop(); } } I have checked the values of most variables in that class when the game is running and stack from the render function is always air (the default value). To me this means that getPedestalItems doesnt return the correct value... I have no idea why this is happening only after you rejoin the world. if you place a new item onto the pedestal it works fine... I would be very happy if someone could help

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.