* Updated MCEF API
* Fixed Screen missing wiki informations
This commit is contained in:
parent
2cfdb61769
commit
3456a0e1cb
Binary file not shown.
|
|
@ -12,9 +12,11 @@ import net.minecraft.block.properties.PropertyBool;
|
|||
import net.minecraft.block.properties.PropertyInteger;
|
||||
import net.minecraft.block.state.BlockStateContainer;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.util.ITooltipFlag;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumBlockRenderType;
|
||||
|
|
@ -35,10 +37,12 @@ import net.montoyo.wd.core.ScreenRights;
|
|||
import net.montoyo.wd.core.IUpgrade;
|
||||
import net.montoyo.wd.data.SetURLData;
|
||||
import net.montoyo.wd.entity.TileEntityScreen;
|
||||
import net.montoyo.wd.item.WDItem;
|
||||
import net.montoyo.wd.utilities.*;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.List;
|
||||
|
||||
public class BlockScreen extends WDBlockContainer {
|
||||
|
||||
|
|
@ -368,4 +372,29 @@ public class BlockScreen extends WDBlockContainer {
|
|||
return state.getValue(emitting);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ItemBlock createItemBlock() {
|
||||
return new ItemBlockScreen(this);
|
||||
}
|
||||
|
||||
private static class ItemBlockScreen extends ItemBlock implements WDItem {
|
||||
|
||||
public ItemBlockScreen(BlockScreen screen) {
|
||||
super(screen);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public String getWikiName(@Nonnull ItemStack is) {
|
||||
return "Screen";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(@Nullable ItemStack is, @Nullable World world, @Nullable List<String> tt, @Nullable ITooltipFlag ttFlags) {
|
||||
super.addInformation(is, world, tt, ttFlags);
|
||||
WDItem.addInformation(tt);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,10 +13,6 @@ public abstract class WDBlockContainer extends BlockContainer {
|
|||
|
||||
protected ItemBlock itemBlock;
|
||||
|
||||
public WDBlockContainer(Material mat, MapColor color) {
|
||||
super(mat, color);
|
||||
}
|
||||
|
||||
public WDBlockContainer(Material material) {
|
||||
super(material);
|
||||
}
|
||||
|
|
@ -26,9 +22,7 @@ public abstract class WDBlockContainer extends BlockContainer {
|
|||
setRegistryName(name);
|
||||
}
|
||||
|
||||
protected ItemBlock createItemBlock() {
|
||||
return new ItemBlock(this);
|
||||
}
|
||||
protected abstract ItemBlock createItemBlock();
|
||||
|
||||
public void makeItemBlock() {
|
||||
if(itemBlock != null)
|
||||
|
|
|
|||
|
|
@ -53,6 +53,8 @@ public class ItemPeripheral extends ItemMultiTexture implements WDItem {
|
|||
|
||||
@Override
|
||||
public void addInformation(@Nullable ItemStack is, @Nullable World world, @Nullable List<String> tt, @Nullable ITooltipFlag ttFlags) {
|
||||
super.addInformation(is, world, tt, ttFlags);
|
||||
|
||||
if(is != null && tt != null) {
|
||||
if(is.getMetadata() == 1) //CC Interface
|
||||
tt.add("" + ChatFormatting.RED + I18n.format("webdisplays.message.missingCC")); //CC is not available for 1.12.2
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user