-
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
migrated lamps to the new model system
- Loading branch information
1 parent
52fc69b
commit 8e3a524
Showing
14 changed files
with
186 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
common/src/main/resources/assets/pfm/models/block/basic_lamp/basic_lamp_bottom.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
common/src/main/resources/assets/pfm/models/block/basic_lamp/basic_lamp_middle.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
common/src/main/resources/assets/pfm/models/block/basic_lamp/basic_lamp_single.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
common/src/main/resources/assets/pfm/models/block/basic_lamp/basic_lamp_top.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 8 additions & 5 deletions
13
.../java/com/unlikepaladin/pfm/blocks/models/basicLamp/fabric/UnbakedBasicLampModelImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,19 @@ | ||
package com.unlikepaladin.pfm.blocks.models.basicLamp.fabric; | ||
|
||
import com.unlikepaladin.pfm.data.materials.WoodVariant; | ||
import net.minecraft.client.render.model.BakedModel; | ||
import net.minecraft.client.render.model.ModelBakeSettings; | ||
import net.minecraft.client.texture.Sprite; | ||
|
||
import java.util.List; | ||
import java.util.Map; | ||
import java.util.concurrent.ConcurrentHashMap; | ||
|
||
public class UnbakedBasicLampModelImpl { | ||
|
||
public static BakedModel getBakedModel(Map<WoodVariant, Sprite> textures, ModelBakeSettings settings, Map<WoodVariant, Map<String, BakedModel>> variantToModelMap, List<String> modelParts) { | ||
return new FabricBasicLampModel(textures, settings, variantToModelMap, modelParts); | ||
static Map<ModelBakeSettings, BakedModel> modelMap = new ConcurrentHashMap<>(); | ||
public static BakedModel getBakedModel(ModelBakeSettings settings, List<BakedModel> modelParts) { | ||
if (modelMap.containsKey(settings)) | ||
return modelMap.get(settings); | ||
BakedModel model = new FabricBasicLampModel(settings, modelParts); | ||
modelMap.put(settings, model); | ||
return model; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.