
Samaritans
Members-
Posts
39 -
Joined
Everything posted by Samaritans
-
it comes in right after Forge initialized [23:44:06] [Client thread/INFO] [FML]: MinecraftForge v14.23.5.2838 Initialized [23:44:06] [Client thread/INFO] [FML]: Starts to replace vanilla recipe ingredients with ore ingredients. [23:44:07] [Client thread/INFO] [FML]: Invalid recipe found with multiple oredict ingredients in the same ingredient... [23:44:07] [Client thread/INFO] [FML]: Replaced 1227 ore ingredients
-
I'm getting an error Invalid recipe found with multiple oredict ingredients in the same ingredient... here's the json that i'm pretty sure is the cause since this recipe doesnt work in-game: I've also tried using minecraft:crafting_shaped, also tried to replace the "L" key with an oredict of "leather" instead didn't work at all.
-
Got it, thanks!
-
I read under the LivingDeathEvent documentation that * This event is {@link Cancelable}.<br> * If this event is canceled, the Entity does not die.<br> But when i do: event.setCanceled(true); Debugging shows that event is canceled but my player still dies. Code here: @SubscribeEvent public void deathProtection (LivingDeathEvent event) { if (event.getEntityLiving() instanceof EntityPlayer) { EntityPlayer player = (EntityPlayer) event.getEntityLiving(); if (BewitchmentAPI.hasPoppet(player, ModObjects.poppet_deathprotection)) { event.setCanceled(true); } } }
-
Is there a way to check if an Item has NBTTags in the recipe. For example if i have an item that gains an NBTTag after certain actions, how can i check if the Item has the NBTTag in my recipe json. I don't want it to have a specific NBTTag value but just have a tag.
-
Hey, Just wondering if it's possible to use somehow use .nbt templates to generate inside addComponentParts within the VillagePieces. I'm trying to add my custom houses to a village and hard-coding in the blocks one by one seems inefficient. Thanks!
-
Spawn mobs naturally near/inside my custom structure
Samaritans replied to Samaritans's topic in Modder Support
what would the string for nearestStructure name i pass in then? -
Hey, I have a few custom structures that spawn throughout the world. Is there a way to check if a hostile mob is being attempted to spawn inside/near my structure, spawn another mob from my mod instead? I'm just not sure how would I check for if the the spawn attempt in near my structure or not. Thanks!
-
Don't have any code right now, but working on implementing a world generator of sorts. I want to replace vanilla vines at swamps with my custom vines, would that be possible with an event? If not, any ideas of how to achieve this? Thanks!
-
Hello! I'm working on making a custom villager that sells stuff from my mod. I'm giving him trades by using VillagerCareer#addTrade(int level, ITradeList tradelist) However, this basically says when you trade a level 1 thing, you unlock everything in level2, and so on. Is there a way of getting him to only have some trades per level? For example, villager lvl1 can buy wool for 1 emerald, buy string for 1 emerald, buy flesh for 1 emerald, then level 2 can buy gold for 1 emerald, can buy fish for 1 emerald. Currently, my villager would automatically have every level 1 trade, then if u trade once, it unlocks everytrade for level2, Instead I want to see it have something like buy wool for 1 emerald, buy string for 1 emerald, then unlocks buy gold for 1 emerald only, and then go on to unlock level3 trades, etc. Thanks!
-
Hey all, I'm trying to add a custom villager house with my custom villager into vanilla villages. I've already got the villager and his trades done, but I need a structure for him too. I've made a StructureVillagePieces.Village class but now i have to build the building in addComponents. Is there a better way than repeatedly doing fillwithblocks, setblockstate, etc...
-
Im pretty new to modding and I'm still so confused. I guess i need to addListener and detectAndSendChanges? But the container doesnt have an inventory, so there's no changes? I just need a way to have a player opengui on client side while on a dedicated server so that these info are depicted. The player would be holding an item with NBTTag that has a UUID on it. I read that NBT and get the UUID out and find an EntityPlayer with that UUID.
-
Mainly I need to get the player.getRNG to display a random number of info. The info are specific stuff in my mod that checks for stuff like if the player is a witch, if the player has pets, etc. Here's the container: public ContainerTarotTable(UUID id) { player = Util.findPlayer(id); if (player != null) { List<Tarot> valid = GameRegistry.findRegistry(Tarot.class).getValuesCollection().stream().filter(f -> f.isCounted(player)).collect(Collectors.toList()); if (!valid.isEmpty()) { while (!valid.isEmpty() && toRead.size() < 4) { int i = player.getRNG().nextInt(valid.size()); toRead.add(valid.get(i)); valid.remove(i); } } } }
-
Hey all, First time posting. I have a GUI with a container so when i call player.openGui, it tries to go to my GuiHandler and call getClientGuiElement. However, part of my container requires me to get an EntityPlayer with a UUID, and display some specific info about the player. When my findPlayer function ran on the client side while on a dedicated server, the player just returns null and my gui just displays empty. Is there any way to fix that? Here's how I am finding player right now: public static EntityPlayer findPlayer(UUID uuid) { for (WorldServer ws : DimensionManager.getWorlds()) { EntityPlayer player = ws.getPlayerEntityByUUID(uuid); if (player != null) return player; } return null; }