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


  • Content Count

  • Joined

  • Last visited

Community Reputation

39 Excellent

About TLHPoE

  • Rank
    Dragon Slayer


  • Gender
  • Personal Text

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Yes, I'm aware now. In the other post you referenced RecipeSorter, which I assumed was the main method of registering the recipe. Didn't see the mold_bucket recipe though, so my bad.
  2. So the recipe I'm adding is to craft any amount of potions with my item, and the result is my item with some more NBT data attached to it. What would the JSON file look like? I've tried just adding a generic shapeless recipe with my item as both the ingredient and result: The recipe doesn't load. Is there a specific type I'm missing? I can't seem to find any recipes like this in Minecraft to reference.
  3. Hello, I was referencing this post in order to add my dynamic recipe, but it recommends using a class (RecipeSorter) that is marked as deprecated. How do I register my recipe? I have my IRecipe class (plus its factory): And then I have my _factories.json (located in assets/quickconsume/recipes):
  4. Hello, I am putting together a mod pack for me and my friends, but when pregenerating chunks using the Chunk Pregenerator mod it closes the server without a crash log at what seems like random times. Here is a snippet of the end of a log: It occurs immediately when I create the world and run the command for pregenerator, and then again after I restart and let the task resumes for a couple of chunks (it generates a good handful before "auto restarting"). I am unsure if this is Forge, Chunk Pregenerator, or the mods that generate structures. The message
  5. https://github.com/phan-kavin/SlippWorld Forge version 1.11.2-
  6. This check: if(data != null && data.getCoolDown() == 0) { This passes every time, and inside the clause it sets the cool down to 100.
  7. Both times I access the capabilities are server side.
  8. Goal: Create a cool down system for firing a weapon, so getting and setting an integer within an itemstack How: Using forge capability system Problem: Can't set (but can retrieve capability) IRepeaterData: package com.kain.slippworld.data.repeater; public interface IRepeaterData { public int getCoolDown(); public void setCoolDown(int coolDown); } RepeaterData: package com.kain.slippworld.data.repeater; public class RepeaterData implements IRepeaterData { private int coolDown; @Override public int getCoolDown() { return coolDown; } @Overrid
  9. I dug around to find the source of MInecraft#objectMouseOver, and it's actually set using Entity#rayTrace. How come when I try to use the method myself it doesn't detect entities? @Override public ActionResult<ItemStack> onItemRightClick(World world, EntityPlayer player, EnumHand hand) { if(world.isRemote) { RayTraceResult ray = player.rayTrace(5F, 1F); System.out.println("Casting ray"); if(ray.entityHit != null && ray.typeOfHit == Type.ENTITY && ray.entityHit instanceof EntityLivingBase) { EntityLivingBase entity = (EntityLivingBase) ray.entityHit;
  10. Seeing as how no one has responded about using the actual chunk's NBT, I fixed my original method of storing my own chunk data in my WorldSavedData: package com.kain.slippworld; import java.util.*; import net.minecraft.nbt.*; import net.minecraft.util.math.*; import net.minecraft.world.*; import net.minecraft.world.storage.*; public class WorldSavedDataMod extends WorldSavedData { public static final String NAME = Reference.NAME + "_WorldData"; public boolean isDragonSlain = false; public Map<ChunkPos, NBTTagCompound> chunkData; public WorldSavedDataMod(String name) { sup
  11. I'm trying to make a ray-based weapon that damages the entity that the player is aiming at. Currently I am using Minecraft#objectMouseOver on the client and sending a packet to the server for processing, but it has a limited range. Another option I saw was EntityPlayer#rayTrace method, but it never returned an entity hit. Code: @Override public ActionResult<ItemStack> onItemRightClick(World world, EntityPlayer player, EnumHand hand) { if(world.isRemote) { RayTraceResult ray = Minecraft.getMinecraft().objectMouseOver; if(ray.typeOfHit == Type.ENTITY && r
  12. ... Oops I know that the event gives access to the chunk's NBT, but I haven't been able to get the data to save at all: @SubscribeEvent public void chunkSave(ChunkDataEvent.Save e) { World w = e.getWorld(); if(!w.isRemote) { WorldSavedDataMod data = WorldSavedDataMod.get(w); NBTTagCompound nbt = e.getData(); if(data.isDragonSlain) { if(!nbt.hasKey(Reference.CHUNK_REJUVENATED_TAG)) { nbt.setBoolean(Reference.CHUNK_REJUVENATED_TAG, true); System.out.println("Generating new ores"); ... e.getChunk().setModified(true); data.markDirty(
  13. I'm trying to use WorldSavedData to keep track of every chunk that's been loaded and assign it an NBTTagCompound. Right now I have a map that stores a custom class I made called ChunkPos as the key and the NBT tag as the entry. The ChunkPos class is mainly for converting from Chunk to a String for storing the chunk's NBT tag when loading/saving. WorldSavedData (with ChunkPos at the bottom): package com.kain.slippworld; import java.util.*; import net.minecraft.nbt.*; import net.minecraft.world.*; import net.minecraft.world.chunk.*; import net.minecraft.world.storage.*; public
  14. I have a custom WorldSavedData class but marking it dirty won't save it. Where I edit values and mark it dirty: @SubscribeEvent public void entityDeath(LivingDeathEvent ev) { EntityLivingBase e = ev.getEntityLiving(); if(!e.world.isRemote) { if(e instanceof EntityWolf) { WorldSavedDataMod data = WorldSavedDataMod.get(e.world); data.isDragonSlain = true; data.markDirty(); ... } } } My WorldSavedData: package com.kain.slippworld; import net.minecraft.nbt.*; import net.minecraft.world.*; import net.minecraft.world.storage.*
  15. I'm trying to add a boolean to the world save file that indicates whether or not the player has done an action, in this case when they kill the ender dragon. I found the WorldInfo class and the ...AdditionalProperty methods, but I'm not quite sure how the system for custom data works. It seems that when you call get method it returns an entry from the overall map, but when you call the set method it replaces the entire map. How would I save my data without clearing other mods' preexisting data? This is what I have right now: WorldInfo info = w.getWorldInfo(); NBTTagCompou
  • Create New...

Important Information

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