Skip to content

Commit

Permalink
Trying to make Things usable as Ingredient
Browse files Browse the repository at this point in the history
  • Loading branch information
HenryLoenwind committed Dec 12, 2017
1 parent b8073bc commit 9202e1f
Show file tree
Hide file tree
Showing 13 changed files with 83 additions and 196 deletions.
Empty file modified gradlew
100644 → 100755
Empty file.
16 changes: 0 additions & 16 deletions src/main/java/com/enderio/core/client/ClientProxy.java
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
package com.enderio.core.client;

import javax.annotation.Nonnull;
import javax.annotation.Nullable;

import com.enderio.core.client.render.IconUtil;
import com.enderio.core.common.CommonProxy;
import com.enderio.core.common.util.NNList;
import com.enderio.core.common.util.Scheduler;

import net.minecraft.client.Minecraft;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;

Expand Down Expand Up @@ -40,15 +35,4 @@ public void onPreInit(@Nonnull FMLPreInitializationEvent event) {
IconUtil.instance.init();
}

@Override
public CreativeTabs getCreativeTab(@Nonnull ItemStack stack) {
return stack.getItem().getCreativeTab();
}

@SuppressWarnings("null")
@Override
public void getSubItems(@Nonnull Item itemIn, @Nullable CreativeTabs tab, @Nonnull NNList<ItemStack> subItems) {
itemIn.getSubItems(tab, subItems);
}

}
19 changes: 0 additions & 19 deletions src/main/java/com/enderio/core/common/CommonProxy.java
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
package com.enderio.core.common;

import javax.annotation.Nonnull;
import javax.annotation.Nullable;

import com.enderio.core.common.util.NNList;
import com.enderio.core.common.util.Scheduler;

import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;

Expand Down Expand Up @@ -45,18 +40,4 @@ public void throwModCompatibilityError(@Nonnull String... msgs) {
public void onPreInit(@Nonnull FMLPreInitializationEvent event) {
}

/**
* Proxy for Item.getCreativeTab(), which is client-only.
*/
public CreativeTabs getCreativeTab(@Nonnull ItemStack stack) {
return null;
}

/**
* Proxy for Item.getSubItems(), which is client-only.
*/
public void getSubItems(@Nonnull Item itemIn, @Nullable CreativeTabs tab, @Nonnull NNList<ItemStack> subItems) {
subItems.add(new ItemStack(itemIn));
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,4 @@ public boolean is(@Nullable Block block) {
return new NNList<Block>(thing);
}

@Override
public @Nullable Object getRecipeObject() {
return thing;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,4 @@ interface IThing {
@Nonnull
NNList<Block> getBlocks();

@Nullable
Object getRecipeObject();
}
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,4 @@ public boolean is(@Nullable Block block) {
return block != Blocks.AIR ? new NNList<Block>(block) : NNList.<Block> emptyList();
}

@Override
public @Nullable Object getRecipeObject() {
return thing;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,4 @@ public boolean is(@Nullable Block block) {
return block != Blocks.AIR ? new NNList<Block>(block) : NNList.<Block> emptyList();
}

@Override
public @Nullable Object getRecipeObject() {
return thing;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,4 @@ public boolean is(@Nullable Block block) {
return result;
}

@Override
public @Nullable Object getRecipeObject() {
return name;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,4 @@ public boolean is(@Nullable Block block) {
return NNList.<Block> emptyList();
}

@Override
public @Nullable Object getRecipeObject() {
return null;
}

}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,4 @@ public boolean is(@Nullable Block block) {
return NNList.<Block> emptyList();
}

@Override
public @Nullable Object getRecipeObject() {
return null;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,4 @@ public boolean is(@Nullable Block block) {
return NNList.<Block> emptyList();
}

@Override
public @Nullable Object getRecipeObject() {
return null;
}

}
Loading

0 comments on commit 9202e1f

Please sign in to comment.