Update Forge + mappings
This commit is contained in:
parent
b408234ab0
commit
d550513f0a
98 changed files with 313 additions and 296 deletions
|
@ -43,6 +43,6 @@ public class BlockStack
|
|||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return GameData.getBlockRegistry().getNameForObject(getBlock()) + ":" + getMeta();
|
||||
return getBlock().getRegistryName() + ":" + getMeta();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,8 +7,9 @@ import net.minecraft.block.Block;
|
|||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import net.minecraftforge.fml.common.registry.ForgeRegistries;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
@ -61,7 +62,7 @@ public class BloodMagicAPI
|
|||
*/
|
||||
public static Item getItem(String name)
|
||||
{
|
||||
return GameRegistry.findItem(Constants.Mod.MODID, name);
|
||||
return ForgeRegistries.ITEMS.getValue(new ResourceLocation(Constants.Mod.MODID, name));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -89,7 +90,7 @@ public class BloodMagicAPI
|
|||
*/
|
||||
public static Block getBlock(String name)
|
||||
{
|
||||
return GameRegistry.findBlock(Constants.Mod.MODID, name);
|
||||
return ForgeRegistries.BLOCKS.getValue(new ResourceLocation(Constants.Mod.MODID, name));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -4,6 +4,8 @@ import lombok.Getter;
|
|||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.fml.common.registry.ForgeRegistries;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
|
||||
import java.util.Locale;
|
||||
|
@ -143,7 +145,7 @@ public class Constants
|
|||
public static final String WAILA_CONFIG_RITUAL = Mod.MODID + ".ritualController";
|
||||
public static final String WAILA_CONFIG_ARRAY = Mod.MODID + ".array";
|
||||
|
||||
public static final Item THAUMCRAFT_GOGGLES = GameRegistry.findItem("Thaumcraft", "goggles");
|
||||
public static final Item THAUMCRAFT_GOGGLES = ForgeRegistries.ITEMS.getValue(new ResourceLocation("Thaumcraft", "goggles"));
|
||||
}
|
||||
|
||||
public static class Misc
|
||||
|
|
|
@ -180,7 +180,7 @@ public class SoulNetwork extends WorldSavedData
|
|||
{
|
||||
if (getPlayer() != null)
|
||||
{
|
||||
getPlayer().addPotionEffect(new PotionEffect(MobEffects.confusion, 99));
|
||||
getPlayer().addPotionEffect(new PotionEffect(MobEffects.NAUSEA, 99));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -100,6 +100,6 @@ public class PlayerHelper
|
|||
if (player == null)
|
||||
return;
|
||||
|
||||
player.addPotionEffect(new PotionEffect(MobEffects.confusion, 80));
|
||||
player.addPotionEffect(new PotionEffect(MobEffects.NAUSEA, 80));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue