Jump to content

Epic_ModZz

Members
  • Posts

    14
  • Joined

  • Last visited

Epic_ModZz's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. I am attempting to store data that is individual to players. How would I do this? Specifically, I would like to create a list of abilities that different players can have and unlock. Ex: Player1 has a water affinity. (randomly assigned per world) Player1 gains the ability to summon water by pressing 'G' after taking drowning damage Player1 loses the ability to summon water after taking fire damage
  2. I would like to make my custom mob spawn in the nether after the ender dragon has died once in said world How would I do this?
  3. I have created my own sword-like item, the issue is how do I give it attack damage, and make it render like a sword when handheld.
  4. I am trying to check if a player is looking at another player's head when right clicking with an item how would I do this?
  5. There are times when i'm modding where I ask myself how do I create cool effects such as the ones seen in popular mods. How should I go about creating something similar to the Botania mod's terrablade?
  6. I am attempting to create a gui that opens when right clicking an item. I have no idea how to accomplish this. Please help me out thanks the first person who gives me an answer that works may suggest an item to be in my mod (within reason)
  7. Where should I put it then? Edit: thx I just fixed it is there anything u want in the mod (within reason)
  8. I put it here and it didn't show up in console public static void preInitRegistries() { System.out.print("Testing Error"); FluidInit.registerFluids(); EntityInit.registerEntities(); RenderHandlers .registerCustomMeshesAndStates(); }
  9. I put a print statement here @EventHandler public static void PreInit(FMLPreInitializationEvent event) { System.out.print("ERRROOROROROROROROR"); RenderHandlers.registerEntityRenders(); } It printed that statement right before the error occured 11:31:18] [Client thread/INFO] [FML]: Found 0 ItemStackHolder annotations [11:31:20] [Client thread/INFO] [FML]: Configured a dormant chunk cache size of 0 [11:31:20] [Forge Version Check/INFO] [forge.VersionCheck]: [forge] Starting version check at http://files.minecraftforge.net/maven/net/minecraftforge/forge/promotions_slim.json ERRROOROROROROROROR[11:31:21] [Forge Version Check/INFO] [forge.VersionCheck]: [forge] Found status: OUTDATED Target: 14.23.5.2847 [11:31:28] [Client thread/WARN] [FML]: **************************************** [11:31:28] [Client thread/WARN] [FML]: * Failed attempt to create a FluidStack for an unregistered Fluid magical_solution (type com.Epic_ModZz.Magically_Magic.fluids.FluidLiquid) As for your second question, I was just following a mod tutorial. If I need to change the structure of my mod's files please let me know how to do that. This is what is in my client proxy btw: import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.item.Item; import net.minecraftforge.client.model.ModelLoader; public class ClientProxy extends CommonProxy { public void registerItemRenderer(Item item, int meta, String id) { ModelLoader.setCustomModelResourceLocation(item, meta, new ModelResourceLocation(item.getRegistryName(), id)); } }
  10. I do in my main file //Main import com.Epic_ModZz.Magically_Magic.init.EntityInit; import com.Epic_ModZz.Magically_Magic.proxy.CommonProxy; import com.Epic_ModZz.Magically_Magic.util.Reference; import com.Epic_ModZz.Magically_Magic.util.handlers.RegistryHandler; import com.Epic_ModZz.Magically_Magic.util.handlers.RenderHandlers; import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod.EventHandler; import net.minecraftforge.fml.common.Mod.Instance; import net.minecraftforge.fml.common.SidedProxy; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; @Mod(modid = Reference.MOD_ID, name = Reference.NAME, version = Reference.VERSION) public class Main { @Instance public static Main instance; @SidedProxy(clientSide = Reference.CLIENT_PROXY_CLASS, serverSide = Reference.COMMON_PROXY_CLASS) public static CommonProxy proxy; static { FluidRegistry.enableUniversalBucket(); } @EventHandler public static void PreInit(FMLPreInitializationEvent event) { RenderHandlers.registerEntityRenders(); } @EventHandler public static void Init(FMLInitializationEvent event) { RegistryHandler.preInitRegistries(); } @EventHandler public static void PostInit(FMLPostInitializationEvent event) { } }
  11. I was working on my minecraft mod, however I ran into a roadblock when attempting to create a new liquid called magic water. Here is my code: //Registry handler import com.Epic_ModZz.Magically_Magic.init.EntityInit; import com.Epic_ModZz.Magically_Magic.init.FluidInit; import com.Epic_ModZz.Magically_Magic.init.ModBlocks; import com.Epic_ModZz.Magically_Magic.init.ModItems; import com.Epic_ModZz.Magically_Magic.util.IHasModel; import net.minecraft.block.Block; import net.minecraft.item.Item; import net.minecraftforge.client.event.ModelRegistryEvent; import net.minecraftforge.event.RegistryEvent; import net.minecraftforge.fml.common.Mod.EventBusSubscriber; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; @EventBusSubscriber public class RegistryHandler { @SubscribeEvent public static void onItemRegister(RegistryEvent.Register<Item> event) { event.getRegistry().registerAll(ModItems.ITEMS.toArray(new Item[0])); } @SubscribeEvent public static void onBlockRegister(RegistryEvent.Register<Block> event) { event.getRegistry().registerAll(ModBlocks.BLOCKS.toArray(new Block[0])); } @SubscribeEvent public static void onModelRegister(ModelRegistryEvent event) { for(Item item : ModItems.ITEMS) { if(item instanceof IHasModel) { ((IHasModel)item).registerModels(); } } for(Block block : ModBlocks.BLOCKS) { if(block instanceof IHasModel) { ((IHasModel)block).registerModels(); } } } public static void preInitRegistries() { FluidInit.registerFluids(); EntityInit.registerEntities(); RenderHandlers .registerCustomMeshesAndStates(); } } //FluidInit import com.Epic_ModZz.Magically_Magic.fluids.FluidLiquid; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidRegistry; public class FluidInit { public static final Fluid MAGIC_WATER = new FluidLiquid("magical_solution", new ResourceLocation("magi:blocks/magical_solution_still"), new ResourceLocation("magi:blocks/magical_solution_flowing")); public static void registerFluids() { registerFluid(MAGIC_WATER); } public static void registerFluid(Fluid fluid) { FluidRegistry.registerFluid(fluid); FluidRegistry.addBucketForFluid(fluid); } } //FluidLiquid import net.minecraft.util.ResourceLocation; import net.minecraftforge.fluids.Fluid; public class FluidLiquid extends Fluid{ public FluidLiquid(String name, ResourceLocation still, ResourceLocation flow) { super(name, still, flow); this.setUnlocalizedName(name); } } The person who fixes my error may suggest something to be added into the mod. This must be within reason however. Edit: The error that this code causes is a crash when loading. In the console it said "Cannot create a fluidstack from an unregistered fluid"
×
×
  • Create New...

Important Information

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