예제 #1
0
 public static void setBucketModelDefinition(Item item) {
   ModelLoader.setCustomMeshDefinition(
       item,
       new ItemMeshDefinition() {
         @Override
         public ModelResourceLocation getModelLocation(ItemStack stack) {
           return ModelDynBucket.LOCATION;
         }
       });
   ModelBakery.registerItemVariants(item, ModelDynBucket.LOCATION);
 }
예제 #2
0
 /**
  * Adds a simple mapping from Item + metadata to the model variant. Registers the variant with the
  * ModelBakery too.
  */
 public static void setCustomModelResourceLocation(
     Item item, int metadata, ModelResourceLocation model) {
   customModels.put(Pair.of(item.delegate, metadata), model);
   ModelBakery.registerItemVariants(item, model);
 }