Jump to content
Search In
  • More options...
Find results that contain...
Find results in...


  • Content Count

  • Joined

  • Last visited

Everything posted by hammy3502

  1. Was able to figure it out! For those stumbling across this, you need to Override the isEquivalentTo method in your fluid class to return true if the fluidIn matches your still fluid or your flowing fluid.
  2. Hello! I'm currently trying to add a custom fluid, however it seems to flow extremely weirdly. The source block only flows to some sides some of the time, and flowing blocks don't produce more flowing blocks of a lower level, and instead dissipate as if there were no source block! Any help would be greatly appreciated! MoltenSyrup.java public class MoltenSyrup extends FlowingFluid { @Override public Fluid getFlowingFluid() { return ModFluids.moltenSyrupFlowing.get(); } @Override public Fluid getStillFluid() { return ModFluids.moltenSyrup.get
  3. Hello! I'm currently trying to add a custom brewing stand recipe, however it seems to output the wrong potion! Instead of giving me the extended levitation potion, it's giving me the extended jumpless potion. ModPotions.java public class ModPotions { public static final DeferredRegister<Effect> EFFECTS = DeferredRegister.create(ForgeRegistries.POTIONS, SurvivalExtras2.MOD_ID); public static final DeferredRegister<Potion> POTIONS = DeferredRegister.create(ForgeRegistries.POTION_TYPES, SurvivalExtras2.MOD_ID); private static ArrayList<BrewingRecipe>
  4. I'm stupid, the RegistryObject's are suppliers. Swapping those in, and changing the code around a bit, and everything works now. Thank you so much for the help!
  5. I've put a quick temporary patch on registerTools to return a boolean, and simply register the items necessary without calling .get(), though the crash still occurs on the repairMaterial, as I'm not sure how to pass in a proper Supplier.
  6. Hello, and thank you so much for the help! I know it may not be clear from the code above, but the items are currently registered through the DeferredRegister. How would I go about getting the supplier for foodariumIngot? Just passing in the foodariumIngot is a RegistryObject<Item>, but I need a Supplier<Item>. Thank you so much for any help!
  7. Hello, and thank you for the help so far! It seems in 1.16, LazyLoadBase was moved to LazyValue, but even with that, it sadly still seems to crash. Tool Creation: public static final Item[] foodariumTools = ModToolsArmor.registerTools("foodarium", 2, 777, 8.0F, 2.5F, 16, -3.05F, ModItems.foodariumIngot.get()); Start of registerTools (rest of it is the same): public static Item[] registerTools(String materialName, int harvestLevel, int maxUses, float miningSpeed, float attackDamageExtraFromWood, int enchantability, float axeA
  8. Hello! I'm currently trying to set my ItemTier's repair material to be an item that I've added to the game, so that it can be used in an anvil. However, I seem to run into a problem where it fails to add as the registry for the repair item hasn't taken place yet! However, I'm not sure how I could fix this, as I need to register the ToolItems at some point. Here's the code I've written: Repair Material: public static final RegistryObject<Item> foodariumIngot = ITEMS.register("foodarium_ingot", () -> new Item(new Item.Properties().group(SurvivalExtras2.CreativeGroup)));
  9. Thank you so much for all the help! I moved all the entities over to use the DeferredRegister system, and my entities are all working well!
  10. Hello, and thank you for the help! I think I'm wrapping my mind around the functions in IEntityAdditionalSpawnData, and I know I can pass the data around from there throughout the Entity class, but I'm wondering how I can get that data into the super() constructor of the entity considering the fact that Java prevents referencing "this" until after calling super(), and super() is where it fails. As for the registration stuff, I'm quite confused on. I'm listening for RegistryEvent.Register<EntityType<?>> event and registering there, and looking at the
  11. Hello, and thank you for the help! I will definitely look into the incorrect registration, it looks like I'm using register() instead of registerAll() (though I should probably figure out how to use the deferred register for EntityTypes). The Entity doesn't spawn on the client due to passing null in for the shooter, causing the game to fail on getting the shooter's position. What I'm stuck on is how to get a valid shooter from item.PancakeBow over to entity.PancakeProjectile. What would be the best way of going about doing this? Thank you again for any help!
  12. I'm currently working on porting a mod from 1.12 to 1.16. Back in 1.12, summoning entities was seemingly quite easy, where I could create my entity object, then call world.addEntity(entity), and it would take my entity object and summon it in. Now it seems in the land of 1.16, that as a result of the EntityType system(?), world.addEntity(entity) seems to completely ignore the fact I've already created an instance of my entity object and tries to make a new one using the factory. Problematically for me, I'm trying to make an entity that extends AbstractFireballEntity (as
  13. Going to open up another thread about the issue I've run into, since the title no longer fits this one
  14. The repo is currently a bit of a mess, as I'm currently porting over from 1.12 before I focus on cleaning up with how different 1.16 is in comparison 1.12.
  15. https://github.com/hammy3502/survival-extras-2
  16. Hello, and thank you for the help! The overriding of createSpawnPacket didn't seem to work, though thank you for catching it before it didn't work in multiplayer! Although I'm using the constructor that actually takes in a shooter (I'm having another item spawn the projectile using it), Forge seems to try to spawn it using the FMLPlayMessages.SpawnEntity spawnEntity, World world constructor, where I can't seem to find the shooter, leading me to believe it had been lost. Would there be any way to recover it, and transfer any other data along with it?
  17. Does anyone have experience working with SpriteRenderer? I've been looking around everywhere for the past few hours on how I could render my item similarly to how snowballs/ender pearls/fireballs do, and I've gotten nowhere. Any help would be greatly appreciated! Entity class: https://pastebin.com/LkZE1qLU Renderer: public class PancakeProjectileRender extends SpriteRenderer<PancakeProjectile> { public PancakeProjectileRender(EntityRendererManager renderManagerIn) { super(renderManagerIn, Minecraft.getInstance().getItemRenderer()); } } Registr
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.