[1.19.x] Apply general renames, A SRG is provided for modders. (#8840)

See https://gist.github.com/SizableShrimp/882a671ff74256d150776da08c89ef72
This commit is contained in:
SizableShrimp authored and GitHub committed 2022-07-11 18:27:48 -07:00
1 parent 5e8c786406
commit b8b40e1f54
140 files changed
+1138 -1149

No files matched your search

@@ -12,7 +12,7 @@ import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.Items;
import net.minecraft.world.item.crafting.Ingredient;
import net.minecraftforge.common.brewing.BrewingRecipeRegistry;
import net.minecraftforge.event.entity.living.PotionEvent;
import net.minecraftforge.event.entity.living.MobEffectEvent;
import net.minecraftforge.eventbus.api.Event.Result;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;
@@ -29,40 +29,40 @@ public class PotionEventTest
{
FMLJavaModLoadingContext.get().getModEventBus().addListener(this::onSetup);
}
private void onSetup(FMLCommonSetupEvent event)
{
BrewingRecipeRegistry.addRecipe(Ingredient.of(Items.ICE), Ingredient.of(Items.LAVA_BUCKET), new ItemStack(Items.OBSIDIAN));
}
@SubscribeEvent
public static void onPotionAdded(PotionEvent.PotionAddedEvent event)
public static void onPotionAdded(MobEffectEvent.Added event)
{
if (!event.getEntity().getCommandSenderWorld().isClientSide)
LOGGER.info("{} has a new PotionEffect {} from {}, the old one was {}", event.getEntityLiving(), event.getPotionEffect(), event.getPotionSource(), event.getOldPotionEffect());
LOGGER.info("{} has a new PotionEffect {} from {}, the old one was {}", event.getEntity(), event.getEffectInstance(), event.getEffectSource(), event.getOldEffectInstance());
}
@SubscribeEvent
public static void isPotionApplicable(PotionEvent.PotionApplicableEvent event)
public static void isPotionApplicable(MobEffectEvent.Applicable event)
{
if (!event.getEntity().getCommandSenderWorld().isClientSide)
{
event.setResult(Result.ALLOW);
LOGGER.info("Allowed Potion {} for Entity {}", event.getPotionEffect(), event.getEntityLiving());
LOGGER.info("Allowed Potion {} for Entity {}", event.getEffectInstance(), event.getEntity());
}
}
@SubscribeEvent
public static void onPotionRemove(PotionEvent.PotionRemoveEvent event)
public static void onPotionRemove(MobEffectEvent.Remove event)
{
if (!event.getEntity().getCommandSenderWorld().isClientSide)
LOGGER.info("Effect {} got Removed from {}", event.getPotionEffect(), event.getEntityLiving());
LOGGER.info("Effect {} got Removed from {}", event.getEffectInstance(), event.getEntity());
}
@SubscribeEvent
public static void onPotionExpiry(PotionEvent.PotionExpiryEvent event)
public static void onPotionExpiry(MobEffectEvent.Expired event)
{
if (!event.getEntity().getCommandSenderWorld().isClientSide)
LOGGER.info("Effect {} expired from {}", event.getPotionEffect(), event.getEntityLiving());
LOGGER.info("Effect {} expired from {}", event.getEffectInstance(), event.getEntity());
}
}