Jump to content

Tomson124

Members
  • Posts

    23
  • Joined

  • Last visited

Converted

  • Gender
    Male
  • Location
    Germany
  • Personal Text
    I am new! Yay :D

Recent Profile Visitors

1559 profile views

Tomson124's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. I am sorry but the problem is not keeping the entchantment (at least as far as I see) but is not even recognized at all.
  2. Someone reported a bug with my mod where you cannot combine the jetpack and the armor plating after you entchanted the the jetpack with a book in an anvil. I also could reproduce this. The strange thing is, that my custom recipe class which is extending ShapelessOreRecipe looks very similar to e.g. CoFH's but their recipes do work with entchanted ingredients and mine don't. I am still using "old" java recipes over the JSON ones, as I did not have the time to look into that and port everything over to this system. "UpgradingRecipeShapeless":
  3. Yeah I did, I am sorry but it is the first time that I have to deal with the client/server side interaction on my own. The current Config is read from the File and then parsed to the NBT. From there is will be read on item init to set the NBT values for each item. I guess I have to get the file on the server side an then write it to the NBT (or a variable) and get it from there on the client side for item init.
  4. I changed the side of the ConfigSync from Client to Server, but I guess that is not enough, right? public static void init() { SimplyJetpacks.logger.info("Registering network messages"); instance.registerMessage(MessageJetpackSync.class, MessageJetpackSync.class, 0, Side.CLIENT); instance.registerMessage(MessageConfigSync.class, MessageConfigSync.class, 1, Side.SERVER); instance.registerMessage(MessageKeyboardSync.class, MessageKeyboardSync.class, 2, Side.SERVER); instance.registerMessage(MessageKeyBind.class, MessageKeyBind.class, 4, Side.SERVER); }
  5. Recently I realized that if you change the config values of my mod (SimplyJetpacks 2), this changes also the values for the jetpacks on servers. The server configs are not changed as far as I know but it seems that always the client configs are loaded. Is there a way to change this, so it loads the config from the server, when the player is on a server?
  6. Sorry I misunderstood you. I now moved the method for creating the recipes into onRegisterRecipes() , too, and now it works. Thank you.
  7. I am doing it in the onRegisterRecipes() method (see post above). The RegistryHandler is registered during preInit see following:
  8. I am not that much of a fan of the new JSON recipe system, so that will probably be not my solution. I tried creating the bucket during that event but it tells me that a recipe is invalid shaped, as the bucket is null. I did it this way: @SubscribeEvent public void onRegisterRecipes(RegistryEvent.Register<IRecipe> event) { if (ModItems.integrateTE) { TEItems.initFluids(); } for(IRecipe recipe : RECIPES_TO_REGISTER) { event.getRegistry().register(recipe); } RECIPES_TO_REGISTER.clear(); } Where initFluids() looks as follows: public static void initFluids() { Fluid redstone = FluidRegistry.getFluid("redstone"); bucketRedstone = FluidUtil.getFilledBucket(new FluidStack(redstone, Fluid.BUCKET_VOLUME)); }
  9. I am currently updating my mod to 1.12 and am still pretty new to the new Registry system. In my mod I use a bucket with ThermalFoundation's Destabilized Redstone for crafting. For getting this bucket as an item I am using Fluid redstone = FluidRegistry.getFluid("redstone"); bucketRedstone = FluidUtil.getFilledBucket(new FluidStack(redstone, 1000)); This is called while preInit (before the Registry<IRecipe> event). But I always get the error: I already checked the fluid and the FluidStack for being null, but both are not, as the Fluid is initialized in the preInit, too. And ThermalFoundation is loaded before my mod. Now I found a way arround it by gathering the fluid in init phase and registering the 2 recipes which need the bucket also in init phase. But it doesn't seem right that it doesn't work the original way. What am I missing?
  10. Well that are some things I probably overlooked in rushing to get it finished ^^ Still learning java in a try and error/learning by doing kind of thing I tried the prevState as a field but didn't work either. I will move the "keys.add" in a seperate method which I call in the Cliemt proxy on init or preinit, maybe it is working then with a field.
  11. I am rewriting my KeyHandler class to also check for Mous button inputs, so the KeyBinding on MousButton also works for my mod. I found out how to check for a single mouse click, but I don't know why it is not working... Code looks like this:
  12. Thank you so much it is working now I wrote a small method which returns the IEnergyStorage of the item which should be charged: public IEnergyStorage getIEnergyStorage(ItemStack chargeItem) { if (chargeItem.hasCapability(CapabilityEnergy.ENERGY, null)) { return chargeItem.getCapability(CapabilityEnergy.ENERGY, null); } else if (chargeItem.getItem() instanceof IEnergyContainerItem) { return new EnergyConversionStorage((IEnergyContainerItem) chargeItem.getItem(), chargeItem); } return null; } I am reffering to that method when charging the Items, and it works perfectly fine. Just have to see if it also works with Items that do not implement ForgeEnergy, as I am not sure about that part: else if (chargeItem.getItem() instanceof IEnergyContainerItem) { return new EnergyConversionStorage((IEnergyContainerItem) chargeItem.getItem(), chargeItem); } But thank you a lot, I now also have a much better knowledge of Capabilites, too. Thank you for your patience with me ^^
  13. I assume that I don't do that, as I did no changes to the Item classe except overriding the initCapabilities... I thought I access the IEnergyStorage through the IEnergyContainerItem methods as they are delegated to the ForgeEnergy Capability, but probably I am understanding something wrong here. How would I access the IEnergyStorage then? By using the ForgeEnergy methods? If so, how would I use them? just returning the IEnergyContainerITem method or calculating it again?
  14. Thanks Now it works... kind of... I did the Forge Energy implementation because EnderIO items can only be charged by Forge Energy or TESLA, even after the implementation my fluxpacks don't charge EnderIO items I don't know why... Is there a way to check if a capability is loaded correctly? And I assume that I still can use the "normal" IEnergyContainerItem methods for energy usage, as I delegated them to the Capability in my EnergyConversionStorage
  15. The field was just a remaing piece of code from an earlier attempt... I now changed the EnergyConversionStorage like you said: And I adjusted the initCapabilities accordingly: @Override public ICapabilityProvider initCapabilities(ItemStack stack, NBTTagCompound nbt) { return new CapabilityProviderEnergy<>(new EnergyConversionStorage(this, stack), CapabilityEnergy.ENERGY, null); } But when I start minecraft, or more specifically when I load a world it crashes with the error:
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.