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.

Dr.Nickenstein

Members
  • Joined

  • Last visited

Everything posted by Dr.Nickenstein

  1. Tested it and... doesn't work. Any code I should provide?
  2. So it should look like this?: public static final DeferredRegister<IRecipeSerializer<?>> RECIPE_SERIALIZERS = DeferredRegister.create( ForgeRegistries.RECIPE_SERIALIZERS, Humlands.MOD_ID); public static final RegistryObject<IRecipeSerializer<?>> SCULPTOR_SERIALIZER = RECIPE_SERIALIZERS.register("sculptor", () -> new SculptorRecipeSerializer());
  3. So I was creating a recipe, and now I have no errors in my code. But it still doesn't work for some reason, could you help me find the error? I'll provide my classes: ISculptorRecipe (Recipe interface): https://pastebin.com/rX7c0wJP SculptorRecipe (Recipe class): https://pastebin.com/fkfG41MJ SculptorRecipeSerializer: (Recipe serializer): https://pastebin.com/kNPgSxcC RecipeSerializerInit (Initializator for the serializer): https://pastebin.com/ZdfWNWyC SculptorItemHandler (Item handler for the tile entity): https://pastebin.com/mp2vWqKs pure_flux_crystal.json (Recipe file): https://pastebin.com/8n4uiHFG Thank you in advance.
  4. So I can remove both registerType and the SCULPTOR_TYPE field and instead put ISculptorRecipe.SCULPTOR?
  5. static <T extends IRecipe<?>> IRecipeType<T> register(final String key) { return Registry.register(Registry.RECIPE_TYPE, new ResourceLocation(key), new IRecipeType<T>() { public String toString() { return key; } }); } and this is the register(String) method.
  6. IRecipeType<SculptorRecipe> SCULPTOR = register("sculptor");
  7. But then another error comes up, since I'm doing this: public static final IRecipeType<ISculptorRecipe> SCULPTOR_TYPE = registerType(ISculptorRecipe.SCULPTOR); @SuppressWarnings({ "unchecked", "rawtypes" }) private static <T extends IRecipeType> T registerType(ResourceLocation recipeTypeId) { return (T) Registry.register(Registry.RECIPE_TYPE, recipeTypeId, new RecipeType<>()); } The registerType method takes in a ResourceLocation, not an IRecipeType.
  8. There are only a few methods which take in a ResourceLocation and they are "onOptional, getOrDefault and containsKey". Probably not these one...
  9. So in the recipe interface 1.15.2 code I had this method: @Nonnull @Override default IRecipeType<?> getType() { return Registry.RECIPE_TYPE.getValue(RECIPE_TYPE_ID).get(); } Now in 1.16.4 it says that .getValue() is undefined. So, what should I put there?
  10. So in the registry class on SculptorTileEntity::new I'm getting an error: "The type SculptorTileEntity does not define SculptorTileEntity() that is applicable here". This is my TileEntityTypesInit: https://pastebin.com/0PMN5rE4 This is my tile entity's contructor: public SculptorTileEntity(TileEntityType<?> tileEntityTypeIn) { super(tileEntityTypeIn); this.inventory = new SculptorItemHandler(2); }
  11. Ooooooh I thought it was the other way round! Thanks for the help!
  12. So basically I want an item that when is used on a certain block it gives you a certain item and transforms the used block into another one. That works perfectly fine without the if(context.getItem().getDamage() > 1) condition. The whole code is here https://pastebin.com/0tRGVxze
  13. I want to get the current durability of an item, what is the method for it?
  14. I tried just removing the model method so putting the texture only but it doesn't work. It's just invisible, no missing texture, no texture. Just invisible
  15. Minecraft has a RenderSnowball, so i guessed i needed that. Yeah, it's nothing special, it's just an item sprite. Now i have another question. The snowball class references to a particle that is called ITEM_SNOWBALL. Now this is a silly question but is the actual projectile a particle or does the entity emit particles? 'Cause it's not just ParticleTypes.SNOW but ParticleTypes.ITEM_SNOWBALL
  16. So I was wondering... How are you supposed to render your custom projectile, saying that it is flat and not 3D? Yes, I've tried looking at the vanilla code but all i found were deprecated and inexisting stuff. It still used @SideOnly(Side.CLIENT) annotation.
  17. Works fine now. Thank you. Sorry for that error
  18. oh yeah i forgot super.tick() i believe. I'll check if that was the issue. Now it doesn't run in an infinite loop but i need to check if it actually applies the effects once the timer runs out
  19. That method doesn't work, it makes my entity stay still forever when i hit it. I'll try to find a better solution
  20. I tought there was a way to make a timer in the damageEntity in some way, but thanks
  21. But that's not java :T , you said that pascal
  22. This is a tick method, i already have the damageEntity method, so i can't use this one
  23. No, the problem is another one. I already have a method. I can't use the tick() one

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.