generated from Over-Run/project-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
88 additions
and
18 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
60 changes: 60 additions & 0 deletions
60
...les/freeworld.client/src/main/java/freeworld/client/render/model/block/LogBlockModel.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,60 @@ | ||
/* | ||
* freeworld - 3D sandbox game | ||
* Copyright (C) 2024 XenFork Union | ||
* | ||
* This library is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU Lesser General Public | ||
* License as published by the Free Software Foundation; | ||
* only version 2.1 of the License. | ||
*/ | ||
|
||
package freeworld.client.render.model.block; | ||
|
||
import freeworld.client.util.MapBuilder; | ||
import freeworld.math.Vector3f; | ||
import freeworld.util.Direction; | ||
import freeworld.util.Identifier; | ||
|
||
import java.util.List; | ||
import java.util.Map; | ||
|
||
import static freeworld.client.render.model.TextureKeys.*; | ||
import static freeworld.math.Vector2f.ONE; | ||
import static freeworld.math.Vector2f.ZERO; | ||
import static freeworld.util.Direction.*; | ||
|
||
/** | ||
* @author squid233 | ||
* @since 0.1.0 | ||
*/ | ||
public final class LogBlockModel implements BlockModel { | ||
private static final List<BlockModelPart> LIST = List.of( | ||
new BlockModelPart( | ||
Vector3f.ZERO, | ||
Vector3f.ONE, | ||
new MapBuilder<Direction, BlockModelFace>() | ||
.entry(WEST, new BlockModelFace(ZERO, ONE, SIDE, WEST)) | ||
.entry(EAST, new BlockModelFace(ZERO, ONE, SIDE, EAST)) | ||
.entry(DOWN, new BlockModelFace(ZERO, ONE, TOP, DOWN)) | ||
.entry(UP, new BlockModelFace(ZERO, ONE, TOP, UP)) | ||
.entry(NORTH, new BlockModelFace(ZERO, ONE, SIDE, NORTH)) | ||
.entry(SOUTH, new BlockModelFace(ZERO, ONE, SIDE, SOUTH)) | ||
.build() | ||
) | ||
); | ||
private final Map<Identifier, Identifier> map; | ||
|
||
public LogBlockModel(Identifier topTexture, Identifier sideTexture) { | ||
this.map = Map.of(TOP, topTexture, SIDE, sideTexture); | ||
} | ||
|
||
@Override | ||
public Map<Identifier, Identifier> textureDefinitions() { | ||
return map; | ||
} | ||
|
||
@Override | ||
public List<BlockModelPart> parts() { | ||
return LIST; | ||
} | ||
} |
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
Binary file added
BIN
+347 Bytes
...freeworld.client/src/main/resources/assets/freeworld/texture/block/coal_ore.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+268 Bytes
.../freeworld.client/src/main/resources/assets/freeworld/texture/block/oak_log.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+300 Bytes
...eworld.client/src/main/resources/assets/freeworld/texture/block/oak_log_top.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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