-
Notifications
You must be signed in to change notification settings - Fork 29
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
1 parent
23cb058
commit 811dfad
Showing
19 changed files
with
825 additions
and
34 deletions.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
src/generated/resources/assets/createaeronautics/blockstates/stirling_engine.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"variants": { | ||
"facing=north,lit=false": { | ||
"model": "createaeronautics:block/stirling_engine/block" | ||
}, | ||
"facing=south,lit=false": { | ||
"model": "createaeronautics:block/stirling_engine/block", | ||
"y": 180 | ||
}, | ||
"facing=west,lit=false": { | ||
"model": "createaeronautics:block/stirling_engine/block", | ||
"y": 270 | ||
}, | ||
"facing=east,lit=false": { | ||
"model": "createaeronautics:block/stirling_engine/block", | ||
"y": 90 | ||
}, | ||
"facing=north,lit=true": { | ||
"model": "createaeronautics:block/stirling_engine/block_lit" | ||
}, | ||
"facing=south,lit=true": { | ||
"model": "createaeronautics:block/stirling_engine/block_lit", | ||
"y": 180 | ||
}, | ||
"facing=west,lit=true": { | ||
"model": "createaeronautics:block/stirling_engine/block_lit", | ||
"y": 270 | ||
}, | ||
"facing=east,lit=true": { | ||
"model": "createaeronautics:block/stirling_engine/block_lit", | ||
"y": 90 | ||
} | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
src/generated/resources/assets/createaeronautics/models/item/stirling_engine.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"parent": "createaeronautics:block/stirling_engine/item" | ||
} |
19 changes: 19 additions & 0 deletions
19
src/generated/resources/data/createaeronautics/loot_tables/blocks/stirling_engine.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"type": "minecraft:block", | ||
"pools": [ | ||
{ | ||
"rolls": 1, | ||
"entries": [ | ||
{ | ||
"type": "minecraft:item", | ||
"name": "createaeronautics:stirling_engine" | ||
} | ||
], | ||
"conditions": [ | ||
{ | ||
"condition": "minecraft:survives_explosion" | ||
} | ||
] | ||
} | ||
] | ||
} |
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
48 changes: 48 additions & 0 deletions
48
src/main/java/com/eriksonn/createaeronautics/connected/CTSpriteShifter.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,48 @@ | ||
package com.eriksonn.createaeronautics.connected; | ||
|
||
|
||
import com.eriksonn.createaeronautics.CreateAeronautics; | ||
import com.simibubi.create.foundation.block.connected.CTSpriteShiftEntry; | ||
import com.simibubi.create.foundation.block.render.SpriteShifter; | ||
import net.minecraft.util.ResourceLocation; | ||
|
||
public class CTSpriteShifter extends SpriteShifter { | ||
public static CTSpriteShiftEntry getCT(com.simibubi.create.foundation.block.connected.CTSpriteShifter.CTType type, ResourceLocation blockTexture, ResourceLocation connectedTexture) { | ||
String key = type.name() + ":" + blockTexture + "->" + connectedTexture; | ||
if (ENTRY_CACHE.containsKey(key)) | ||
return (CTSpriteShiftEntry) ENTRY_CACHE.get(key); | ||
|
||
CTSpriteShiftEntry entry = create(type); | ||
entry.set(blockTexture, connectedTexture); | ||
ENTRY_CACHE.put(key, entry); | ||
return entry; | ||
} | ||
|
||
public static CTSpriteShiftEntry getCT(com.simibubi.create.foundation.block.connected.CTSpriteShifter.CTType type, String blockTextureName, String connectedTextureName) { | ||
return getCT(type, CreateAeronautics.asResource("block/" + blockTextureName), CreateAeronautics.asResource("block/" + connectedTextureName + "_connected")); | ||
} | ||
|
||
public static CTSpriteShiftEntry getCT(com.simibubi.create.foundation.block.connected.CTSpriteShifter.CTType type, String blockTextureName) { | ||
return getCT(type, blockTextureName, blockTextureName); | ||
} | ||
|
||
private static CTSpriteShiftEntry create(com.simibubi.create.foundation.block.connected.CTSpriteShifter.CTType type) { | ||
switch (type) { | ||
case HORIZONTAL: | ||
return new CTSpriteShiftEntry.Horizontal(); | ||
case OMNIDIRECTIONAL: | ||
return new CTSpriteShiftEntry.Omnidirectional(); | ||
case VERTICAL: | ||
return new CTSpriteShiftEntry.Vertical(); | ||
case CROSS: | ||
return new CTSpriteShiftEntry.Cross(); | ||
default: | ||
return null; | ||
} | ||
} | ||
|
||
public enum CTType { | ||
OMNIDIRECTIONAL, HORIZONTAL, VERTICAL, CROSS; | ||
} | ||
|
||
} |
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
Oops, something went wrong.