-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make work on dedicated servers, fix a few bugs
- Loading branch information
1 parent
36488a9
commit b685377
Showing
10 changed files
with
102 additions
and
31 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
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
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
44 changes: 44 additions & 0 deletions
44
src/main/java/io/github/foundationgames/automobility/render/AutomobilityModels.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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package io.github.foundationgames.automobility.render; | ||
|
||
import io.github.foundationgames.automobility.Automobility; | ||
import io.github.foundationgames.automobility.automobile.render.engine.CopperEngineModel; | ||
import io.github.foundationgames.automobility.automobile.render.engine.CreativeEngineModel; | ||
import io.github.foundationgames.automobility.automobile.render.engine.GoldEngineModel; | ||
import io.github.foundationgames.automobility.automobile.render.engine.IronEngineModel; | ||
import io.github.foundationgames.automobility.automobile.render.frame.*; | ||
import io.github.foundationgames.automobility.automobile.render.wheel.*; | ||
import net.fabricmc.api.EnvType; | ||
import net.fabricmc.api.Environment; | ||
import net.minecraft.client.model.Model; | ||
import net.minecraft.client.render.entity.EntityRendererFactory; | ||
import net.minecraft.util.Identifier; | ||
|
||
import java.util.HashMap; | ||
import java.util.Map; | ||
import java.util.function.Function; | ||
|
||
@Environment(EnvType.CLIENT) | ||
public enum AutomobilityModels {; | ||
public static final Map<Identifier, Function<EntityRendererFactory.Context, Model>> MODELS = new HashMap<>(); | ||
|
||
@Environment(EnvType.CLIENT) | ||
public static void init() { | ||
MODELS.put(Automobility.id("frame_standard"), StandardFrameModel::new); | ||
MODELS.put(Automobility.id("frame_tractor"), TractorFrameModel::new); | ||
MODELS.put(Automobility.id("frame_shopping_cart"), ShoppingCartFrameModel::new); | ||
MODELS.put(Automobility.id("frame_c_arr"), CARRFrameModel::new); | ||
MODELS.put(Automobility.id("frame_pineapple"), PineappleFrameModel::new); | ||
MODELS.put(Automobility.id("frame_dababy"), DaBabyFrameModel::new); | ||
|
||
MODELS.put(Automobility.id("wheel_standard"), StandardWheelModel::new); | ||
MODELS.put(Automobility.id("wheel_off_road"), OffRoadWheelModel::new); | ||
MODELS.put(Automobility.id("wheel_steel"), SteelWheelModel::new); | ||
MODELS.put(Automobility.id("wheel_tractor"), TractorWheelModel::new); | ||
MODELS.put(Automobility.id("wheel_convertible"), ConvertibleWheelModel::new); | ||
|
||
MODELS.put(Automobility.id("engine_iron"), IronEngineModel::new); | ||
MODELS.put(Automobility.id("engine_copper"), CopperEngineModel::new); | ||
MODELS.put(Automobility.id("engine_gold"), GoldEngineModel::new); | ||
MODELS.put(Automobility.id("engine_creative"), CreativeEngineModel::new); | ||
} | ||
} |