-
Recently Browsing
- No registered users viewing this page.
-
Posts
-
So I'm creating a shield enchantment that reacts only to projectiles, but I've run into a problem. I'm using the .isProjectile() method on damage source to see if event handler should continue or return, which works great for projectiles from a dispenser. However, for projectiles from a mob, the damageSource.getEntity() returns the MOB that shot the projectile, rather than the projectile itself. Any ideas on how to get around this?
-
My friend just encountered this error, what exactly did you do? Not sure "delete config from folder" means 😅
-
It's actually worked! Thank you!
-
By NukolLodda · Posted
So I'm new to Minecraft modding and I'm not too sure how to make custom shapeless recipes. Basically I have a machine called the alloy furnace with 3 inputs, but some recipes involving it only requires 2 inputs and as a result I want to make it shapeless. Along with that, the 3 input slots don't have any differences between them so it shouldn't matter which slot you put the item in. However, I want to make it so the recipes aren't hardcoded into my mod so instead json files are used instead. However I've yet to figure out how to allow for shapeless recipes. This is the code I've thought of so far, I'd imagine this probably looks like amateur stuff but this really is the best my almost deep fried brain can think of boolean hasIng = false; if (recipe.isPresent()) { for (int i = 0; i < entity.itemHandler.getSlots(); i++) { for (int j = 0; j < recipe.get().getIngredients().size(); j++) { if (entity.itemHandler.getStackInSlot(i) .equals(recipe.get().getIngredients().get(j).getItems()[0])) { hasIng = true; } } } } so if anyone can explain this to me, I'd really appreciate it.
-
-
Topics
Recommended Posts