1.15 port

This commit is contained in:
yueh
2020-05-18 14:02:45 +02:00
parent 0ea86c939c
commit 16d6d55d7f
630 changed files with 4211 additions and 12664 deletions
@@ -23,12 +23,12 @@ import java.util.Arrays;
import java.util.Collection;
import net.minecraft.client.renderer.ItemMeshDefinition;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.client.renderer.color.IItemColor;
import net.minecraft.client.renderer.model.ModelResourceLocation;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.client.model.IModel;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
/**
@@ -42,31 +42,31 @@ public interface IItemRendering
* item model to be used for rendering by inspecting the item stack (i.e. for NBT data).
* Please
*/
@SideOnly( Side.CLIENT )
@OnlyIn( Dist.CLIENT )
IItemRendering meshDefinition( ItemMeshDefinition meshDefinition );
/**
* Registers an item model for meta=0, see {@link #model(int, ModelResourceLocation)}.
*/
@SideOnly( Side.CLIENT )
@OnlyIn( Dist.CLIENT )
default IItemRendering model( ModelResourceLocation model )
{
return model( 0, model );
return this.model( 0, model );
}
/**
* Registers an item model for a given meta.
*/
@SideOnly( Side.CLIENT )
@OnlyIn( Dist.CLIENT )
IItemRendering model( int meta, ModelResourceLocation model );
/**
* Convenient override for {@link #variants(Collection)}.
*/
@SideOnly( Side.CLIENT )
@OnlyIn( Dist.CLIENT )
default IItemRendering variants( ResourceLocation... resources )
{
return variants( Arrays.asList( resources ) );
return this.variants( Arrays.asList( resources ) );
}
/**
@@ -76,20 +76,20 @@ public interface IItemRendering
*
* Models registered via {@link #model(int, ModelResourceLocation)} are automatically added here.
*/
@SideOnly( Side.CLIENT )
@OnlyIn( Dist.CLIENT )
IItemRendering variants( Collection<ResourceLocation> resources );
/**
* Registers a custom item color definition that inspects an item stack and tint and
* returns a color multiplier.
*/
@SideOnly( Side.CLIENT )
@OnlyIn( Dist.CLIENT )
IItemRendering color( IItemColor itemColor );
/**
* Registers a built-in model under the given resource path.
*/
@SideOnly( Side.CLIENT )
@OnlyIn( Dist.CLIENT )
IItemRendering builtInModel( String name, IModel model );
}