-
1.15.2 Can't Override Vanilla Drops
Wait, I didn't read properly. I'm also new and have not fiddled with loot tables but why are subscribing to an event without a parameter.
-
1.15.2 Can't Override Vanilla Drops
Try making the method static. I EventBusSubscriber requires a static method.
-
[1.15.2] Remove goal from creeper
This is my code so far but it doesn't seem to work private static void changeAI(CreeperEntity entity) { if (entity.world != null && !entity.world.isRemote) { Set<PrioritizedGoal> goals = ObfuscationReflectionHelper.getPrivateValue(GoalSelector.class, entity.goalSelector, "goals"); ChangeMod.LOGGER.info(goals); for (PrioritizedGoal goal: goals) { if (goal.getGoal() instanceof AvoidEntityGoal) { entity.goalSelector.removeGoal(goal); ChangeMod.LOGGER.info(goal.getGoal().toString()); } } goals = ObfuscationReflectionHelper.getPrivateValue(GoalSelector.class, entity.goalSelector, "goals"); ChangeMod.LOGGER.info(goals); } } But the creepers still avoid them and the goals are the same length
-
[1.15.2] Remove goal from creeper
Ok, thanks.
-
[1.15.2] Remove goal from creeper
I am trying to remove the AvoidEntity goals for a creeper to make it not run away from ocelots. This is my code: @Mod.EventBusSubscriber(modid = CreeperMod.MODID) public class EntityChangeEvent { @SubscribeEvent public static void onSpawn(EntityJoinWorldEvent event) { if (event.getEntity() instanceof CreeperEntity) changeAI((CreeperEntity) event.getEntity(), event); } private static void changeAI(CreeperEntity entity) { if (entity.world != null && !entity.world.isRemote) { CreeperMod.LOGGER.info(entity.goalSelector.getRunningGoals().count()); entity.goalSelector.getRunningGoals().forEach((action) -> { CreeperMod.LOGGER.info(action.getGoal()); if (action.getGoal() instanceof AvoidEntityGoal) { entity.goalSelector.removeGoal(action.getGoal()); CreeperMod.LOGGER.info("removed"); } }); } } But it looks like the AvoidEntity goals are not running when the creeper is spawned. How would I remove those goals. Thanks
-
[1.15.2] Crafting recipe random output
I have made a new crafting recipe and I would like to make it output one of two items. Thanks!
-
[1.15.2] Change path for custom item model.
Ok, thanks!
-
[1.15.2] Change path for custom item model.
I have a custom item model and I am registering the item using deferred registries. How would I set a different location for the model. So instead of storing the model json in models/item I could store it in models/staff. I think I would use a ResourceLocation but I don't know how to implement it with deferred registries. Thanks!
-
[1.15.2] How to teleport entity in front of player
So I have a PlayerEntity and a different LivingEntity. How would I teleport the entity a certain amount infront of the player like the "^ ^ ^" arguments in commands. The rotation doesn't matter. Thanks!
-
[SOLVED] [1.15.2] I cant understand whats wrong
The modid must be in lowercase
IPS spam blocked by CleanTalk.