mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-21 04:32:15 +00:00
Cleanup some null checks and remove deprecated methods in Item and Block (#3429)
This commit is contained in:
1 parent
2823447b6e
commit
2bd8b95a3b
31 files changed
+175
-174
No files matched your search
+1
-4
@@ -1,7 +1,5 @@
|
||||
package net.minecraftforge.fml.common.registry;
|
||||
|
||||
import com.google.common.base.Function;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockDirt;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Bootstrap;
|
||||
@@ -18,7 +16,6 @@ import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotEquals;
|
||||
@@ -35,7 +32,7 @@ public class ItemBlockSubstitutionRemoveRestoreTest
|
||||
public ItemMyDirt() {
|
||||
super(Blocks.DIRT, Blocks.DIRT, new Mapper()
|
||||
{
|
||||
@Nullable
|
||||
@Nonnull
|
||||
public String apply(@Nonnull ItemStack p_apply_1_)
|
||||
{
|
||||
return BlockDirt.DirtType.byMetadata(p_apply_1_.getMetadata()).getUnlocalizedName();
|
||||
|
||||
@@ -15,6 +15,8 @@ import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotEquals;
|
||||
import static org.junit.Assert.fail;
|
||||
@@ -28,6 +30,7 @@ public class SubstitutionInjectionTest
|
||||
private ResourceLocation myDirt = new ResourceLocation("minecraft:dirt");
|
||||
private BlockDirt toSub = new BlockDirt() {
|
||||
@Override
|
||||
@Nonnull
|
||||
public String toString()
|
||||
{
|
||||
return "SUB" + super.toString() + "SUB";
|
||||
|
||||
Reference in new issue
Block a user