forked from AlmuraDev/mocreaturesdev
-
Notifications
You must be signed in to change notification settings - Fork 4
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
c9985e2
commit ffaf2bb
Showing
8 changed files
with
174 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package drzhark.mocreatures.block; | ||
|
||
import java.util.Random; | ||
|
||
import net.minecraft.block.BlockPane; | ||
import net.minecraft.block.SoundType; | ||
import net.minecraft.block.material.Material; | ||
import net.minecraft.block.state.IBlockState; | ||
import net.minecraft.init.Items; | ||
import net.minecraft.item.Item; | ||
import net.minecraft.util.BlockRenderLayer; | ||
import net.minecraftforge.fml.relauncher.Side; | ||
import net.minecraftforge.fml.relauncher.SideOnly; | ||
|
||
public class MoCBlockPane extends BlockPane { | ||
private final boolean canDrop; | ||
private final boolean isTranslucent; | ||
|
||
public MoCBlockPane(Material material, SoundType soundType, boolean canDrop, boolean isTranslucent) { | ||
super(material, canDrop); | ||
this.setSoundType(soundType); | ||
this.setHarvestLevel("pickaxe", 0); | ||
this.canDrop = canDrop; | ||
this.isTranslucent = isTranslucent; | ||
} | ||
|
||
@Override | ||
public Item getItemDropped(IBlockState state, Random rand, int fortune) { | ||
return !this.canDrop ? Items.AIR : super.getItemDropped(state, rand, fortune); | ||
} | ||
|
||
@Override | ||
@SideOnly(Side.CLIENT) | ||
public BlockRenderLayer getRenderLayer() { | ||
return this.isTranslucent ? BlockRenderLayer.TRANSLUCENT : BlockRenderLayer.CUTOUT_MIPPED; | ||
} | ||
} |
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
99 changes: 99 additions & 0 deletions
99
src/main/resources/assets/mocreatures/blockstates/gleaming_glass_pane.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,99 @@ | ||
{ | ||
"forge_marker": 1, | ||
"defaults": { | ||
"model": "pane_post", | ||
"textures": { | ||
"edge": "mocreatures:blocks/glass_gleaming_top", | ||
"pane": "mocreatures:blocks/glass_gleaming", | ||
"layer0": "mocreatures:blocks/glass_gleaming" | ||
} | ||
}, | ||
"variants": { | ||
"inventory": [ | ||
{ | ||
"transform": "forge:default-item", | ||
"model": "builtin/generated", | ||
"textures": { | ||
"layer0": "mocreatures:blocks/glass_gleaming" | ||
} | ||
} | ||
], | ||
"normal": [ | ||
{ | ||
"transform": "forge:default-item", | ||
"model": "builtin/generated", | ||
"textures": { | ||
"layer0": "mocreatures:blocks/glass_gleaming" | ||
} | ||
} | ||
], | ||
"north": { | ||
"true": { | ||
"submodel": { | ||
"nside": { | ||
"model": "pane_side" | ||
} | ||
} | ||
}, | ||
"false": { | ||
"submodel": { | ||
"nside": { | ||
"model": "pane_noside" | ||
} | ||
} | ||
} | ||
}, | ||
"south": { | ||
"true": { | ||
"submodel": { | ||
"sside": { | ||
"model": "pane_side_alt" | ||
} | ||
} | ||
}, | ||
"false": { | ||
"submodel": { | ||
"sside": { | ||
"model": "pane_noside_alt", | ||
"y": 90 | ||
} | ||
} | ||
} | ||
}, | ||
"west": { | ||
"true": { | ||
"submodel": { | ||
"wside": { | ||
"model": "pane_side_alt", | ||
"y": 90 | ||
} | ||
} | ||
}, | ||
"false": { | ||
"submodel": { | ||
"wside": { | ||
"model": "pane_noside", | ||
"y": 270 | ||
} | ||
} | ||
} | ||
}, | ||
"east": { | ||
"true": { | ||
"submodel": { | ||
"eside": { | ||
"model": "pane_side", | ||
"y": 90 | ||
} | ||
} | ||
}, | ||
"false": { | ||
"submodel": { | ||
"eside": { | ||
"model": "pane_noside_alt" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
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
16 changes: 16 additions & 0 deletions
16
src/main/resources/assets/mocreatures/recipes/gleaming_glass_pane.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,16 @@ | ||
{ | ||
"type": "forge:ore_shaped", | ||
"pattern": [ | ||
"XXX", | ||
"XXX" | ||
], | ||
"key": { | ||
"X": { | ||
"item": "mocreatures:gleaming_glass" | ||
} | ||
}, | ||
"result": { | ||
"item": "mocreatures:gleaming_glass_pane", | ||
"count": 16 | ||
} | ||
} |
Binary file added
BIN
+205 Bytes
src/main/resources/assets/mocreatures/textures/blocks/glass_gleaming_top.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.