-
Notifications
You must be signed in to change notification settings - Fork 2
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
bazke
committed
Oct 3, 2023
1 parent
5852caf
commit 424e6c9
Showing
14 changed files
with
188 additions
and
3 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
6 changes: 6 additions & 0 deletions
6
src/generated/resources/assets/ltextras/models/item/curtain.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,6 @@ | ||
{ | ||
"parent": "minecraft:item/generated", | ||
"textures": { | ||
"layer0": "ltextras:block/curtain" | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
src/generated/resources/data/ltextras/loot_tables/blocks/curtain.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,21 @@ | ||
{ | ||
"type": "minecraft:block", | ||
"pools": [ | ||
{ | ||
"bonus_rolls": 0.0, | ||
"conditions": [ | ||
{ | ||
"condition": "minecraft:survives_explosion" | ||
} | ||
], | ||
"entries": [ | ||
{ | ||
"type": "minecraft:item", | ||
"name": "ltextras:curtain" | ||
} | ||
], | ||
"rolls": 1.0 | ||
} | ||
], | ||
"random_sequence": "ltextras:blocks/curtain" | ||
} |
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
31 changes: 31 additions & 0 deletions
31
src/main/java/com/lovetropics/extras/block/CurtainBlock.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,31 @@ | ||
package com.lovetropics.extras.block; | ||
|
||
import net.minecraft.MethodsReturnNonnullByDefault; | ||
import net.minecraft.core.BlockPos; | ||
import net.minecraft.world.item.DyeColor; | ||
import net.minecraft.world.level.BlockGetter; | ||
import net.minecraft.world.level.block.StainedGlassPaneBlock; | ||
import net.minecraft.world.level.block.state.BlockState; | ||
import net.minecraft.world.phys.shapes.CollisionContext; | ||
import net.minecraft.world.phys.shapes.Shapes; | ||
import net.minecraft.world.phys.shapes.VoxelShape; | ||
|
||
import javax.annotation.ParametersAreNonnullByDefault; | ||
|
||
@ParametersAreNonnullByDefault | ||
@MethodsReturnNonnullByDefault | ||
public class CurtainBlock extends StainedGlassPaneBlock { | ||
public CurtainBlock(final Properties props) { | ||
super(DyeColor.BLACK, props); | ||
} | ||
|
||
@Override | ||
public VoxelShape getCollisionShape(BlockState pState, BlockGetter pLevel, BlockPos pPos, CollisionContext pContext) { | ||
return Shapes.empty(); | ||
} | ||
|
||
@Override | ||
public int getLightBlock(BlockState pState, BlockGetter pLevel, BlockPos pPos) { | ||
return pLevel.getMaxLightLevel(); | ||
} | ||
} |
77 changes: 77 additions & 0 deletions
77
src/main/resources/assets/ltextras/blockstates/curtain.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,77 @@ | ||
{ | ||
"multipart": [ | ||
{ | ||
"apply": { | ||
"model": "ltextras:block/curtain_post" | ||
} | ||
}, | ||
{ | ||
"apply": { | ||
"model": "ltextras:block/curtain_side" | ||
}, | ||
"when": { | ||
"north": "true" | ||
} | ||
}, | ||
{ | ||
"apply": { | ||
"model": "ltextras:block/curtain_side", | ||
"y": 90 | ||
}, | ||
"when": { | ||
"east": "true" | ||
} | ||
}, | ||
{ | ||
"apply": { | ||
"model": "ltextras:block/curtain_side_alt" | ||
}, | ||
"when": { | ||
"south": "true" | ||
} | ||
}, | ||
{ | ||
"apply": { | ||
"model": "ltextras:block/curtain_side_alt", | ||
"y": 90 | ||
}, | ||
"when": { | ||
"west": "true" | ||
} | ||
}, | ||
{ | ||
"apply": { | ||
"model": "ltextras:block/curtain_noside" | ||
}, | ||
"when": { | ||
"north": "false" | ||
} | ||
}, | ||
{ | ||
"apply": { | ||
"model": "ltextras:block/curtain_noside_alt" | ||
}, | ||
"when": { | ||
"east": "false" | ||
} | ||
}, | ||
{ | ||
"apply": { | ||
"model": "ltextras:block/curtain_noside_alt", | ||
"y": 90 | ||
}, | ||
"when": { | ||
"south": "false" | ||
} | ||
}, | ||
{ | ||
"apply": { | ||
"model": "ltextras:block/curtain_noside", | ||
"y": 270 | ||
}, | ||
"when": { | ||
"west": "false" | ||
} | ||
} | ||
] | ||
} |
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,6 @@ | ||
{ | ||
"parent": "minecraft:block/cube_all", | ||
"textures": { | ||
"all": "ltextras:block/curtain" | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
src/main/resources/assets/ltextras/models/block/curtain_noside.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,6 @@ | ||
{ | ||
"parent": "minecraft:block/template_glass_pane_noside", | ||
"textures": { | ||
"pane": "ltextras:block/curtain" | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
src/main/resources/assets/ltextras/models/block/curtain_noside_alt.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,6 @@ | ||
{ | ||
"parent": "minecraft:block/template_glass_pane_noside_alt", | ||
"textures": { | ||
"pane": "ltextras:block/curtain" | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
src/main/resources/assets/ltextras/models/block/curtain_post.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,7 @@ | ||
{ | ||
"parent": "minecraft:block/template_glass_pane_post", | ||
"textures": { | ||
"edge": "minecraft:block/black_stained_glass_pane_top", | ||
"pane": "ltextras:block/curtain" | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
src/main/resources/assets/ltextras/models/block/curtain_side.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,7 @@ | ||
{ | ||
"parent": "minecraft:block/template_glass_pane_side", | ||
"textures": { | ||
"edge": "minecraft:block/black_stained_glass_pane_top", | ||
"pane": "ltextras:block/curtain" | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
src/main/resources/assets/ltextras/models/block/curtain_side_alt.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,7 @@ | ||
{ | ||
"parent": "minecraft:block/template_glass_pane_side_alt", | ||
"textures": { | ||
"edge": "minecraft:block/black_stained_glass_pane_top", | ||
"pane": "ltextras:block/curtain" | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.