Skip to content

Commit

Permalink
add japor log, poonten grass, dried poonten grass, tuber, tatooine log
Browse files Browse the repository at this point in the history
  • Loading branch information
parzivail committed Apr 5, 2021
1 parent 0f54622 commit ec02e79
Show file tree
Hide file tree
Showing 32 changed files with 47 additions and 4 deletions.
5 changes: 5 additions & 0 deletions src/main/java/com/parzivail/datagen/tarkin/Tarkin.java
Original file line number Diff line number Diff line change
Expand Up @@ -878,6 +878,8 @@ private static void generateBlocks(List<BuiltAsset> assets)
BlockGenerator.leaves(SwgBlocks.Leaves.Sequoia).build(assets);

BlockGenerator.column(SwgBlocks.Log.Sequoia, Resources.identifier("block/sequoia_log_top"), Resources.identifier("block/sequoia_log_side")).build(assets);
BlockGenerator.column(SwgBlocks.Log.Japor, Resources.identifier("block/japor_log_top"), Resources.identifier("block/japor_log_side")).build(assets);
BlockGenerator.column(SwgBlocks.Log.Tatooine, Resources.identifier("block/tatooine_log_top"), Resources.identifier("block/tatooine_log_side")).build(assets);

BlockGenerator.blockNoModelDefaultDrops(SwgBlocks.Machine.Spoked).build(assets);

Expand Down Expand Up @@ -932,6 +934,9 @@ private static void generateBlocks(List<BuiltAsset> assets)

BlockGenerator.cross(SwgBlocks.Plant.FunnelFlower).build(assets);
BlockGenerator.cross(SwgBlocks.Plant.BlossomingFunnelFlower).build(assets);
BlockGenerator.cross(SwgBlocks.Plant.PoontenGrass).build(assets);
BlockGenerator.cross(SwgBlocks.Plant.DriedPoontenGrass).build(assets);
BlockGenerator.cross(SwgBlocks.Plant.Tuber).build(assets);

BlockGenerator.basicRandomRotation(SwgBlocks.Sand.Desert).build(assets);
BlockGenerator.basicRandomRotation(SwgBlocks.Sand.DesertCanyon).build(assets);
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/com/parzivail/pswg/Client.java
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ public void onInitializeClient()

RenderLayerHelper.addBlock(SwgBlocks.Plant.FunnelFlower, RenderLayer.getCutout());
RenderLayerHelper.addBlock(SwgBlocks.Plant.BlossomingFunnelFlower, RenderLayer.getCutout());
RenderLayerHelper.addBlock(SwgBlocks.Plant.PoontenGrass, RenderLayer.getCutout());
RenderLayerHelper.addBlock(SwgBlocks.Plant.DriedPoontenGrass, RenderLayer.getCutout());
RenderLayerHelper.addBlock(SwgBlocks.Plant.Tuber, RenderLayer.getCutout());

ModelLoadingRegistry.INSTANCE.registerVariantProvider(r -> ModelRegistry.INSTANCE);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
import net.minecraft.util.shape.VoxelShape;
import net.minecraft.world.BlockView;

public class FunnelFlowerBlock extends PlantBlock
public class TatooinePlant extends PlantBlock
{
protected static final VoxelShape SHAPE = Block.createCuboidShape(2.0D, 0.0D, 2.0D, 14.0D, 13.0D, 14.0D);

public FunnelFlowerBlock(Settings settings)
public TatooinePlant(Settings settings)
{
super(settings);
}
Expand Down
14 changes: 12 additions & 2 deletions src/main/java/com/parzivail/pswg/container/SwgBlocks.java
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,15 @@ public static class Workbench
public static class Plant
{
@RegistryName("funnel_flower")
public static final Block FunnelFlower = new FunnelFlowerBlock(AbstractBlock.Settings.of(Material.REPLACEABLE_PLANT).noCollision().breakInstantly().sounds(BlockSoundGroup.GRASS));
public static final Block FunnelFlower = new TatooinePlant(AbstractBlock.Settings.of(Material.REPLACEABLE_PLANT).noCollision().breakInstantly().sounds(BlockSoundGroup.GRASS));
@RegistryName("blossoming_funnel_flower")
public static final Block BlossomingFunnelFlower = new FunnelFlowerBlock(AbstractBlock.Settings.of(Material.REPLACEABLE_PLANT).noCollision().breakInstantly().sounds(BlockSoundGroup.GRASS));
public static final Block BlossomingFunnelFlower = new TatooinePlant(AbstractBlock.Settings.of(Material.REPLACEABLE_PLANT).noCollision().breakInstantly().sounds(BlockSoundGroup.GRASS));
@RegistryName("poonten_grass")
public static final Block PoontenGrass = new TatooinePlant(AbstractBlock.Settings.of(Material.REPLACEABLE_PLANT).noCollision().breakInstantly().sounds(BlockSoundGroup.GRASS));
@RegistryName("dried_poonten_grass")
public static final Block DriedPoontenGrass = new TatooinePlant(AbstractBlock.Settings.of(Material.REPLACEABLE_PLANT).noCollision().breakInstantly().sounds(BlockSoundGroup.GRASS));
@RegistryName("tuber")
public static final Block Tuber = new TatooinePlant(AbstractBlock.Settings.of(Material.REPLACEABLE_PLANT).noCollision().breakInstantly().sounds(BlockSoundGroup.GRASS));
}

public static class Leaves
Expand All @@ -142,6 +148,10 @@ public static class Log
{
@RegistryName("sequoia_log")
public static final PillarBlock Sequoia = createLogBlock(MaterialColor.WOOD, MaterialColor.BROWN);
@RegistryName("japor_log")
public static final PillarBlock Japor = createLogBlock(MaterialColor.WOOD, MaterialColor.BROWN);
@RegistryName("tatooine_log")
public static final PillarBlock Tatooine = createLogBlock(MaterialColor.WOOD, MaterialColor.BROWN);

private static PillarBlock createLogBlock(MaterialColor topMaterialColor, MaterialColor sideMaterialColor)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"variants":{"":{"model":"pswg:block/dried_poonten_grass"}}}
1 change: 1 addition & 0 deletions src/main/resources/assets/pswg/blockstates/japor_log.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"variants":{"axis=x":{"model":"pswg:block/japor_log","x":90,"y":90},"axis=y":{"model":"pswg:block/japor_log"},"axis=z":{"model":"pswg:block/japor_log","x":90}}}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"variants":{"":{"model":"pswg:block/poonten_grass"}}}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"variants":{"axis=x":{"model":"pswg:block/tatooine_log","x":90,"y":90},"axis=y":{"model":"pswg:block/tatooine_log"},"axis=z":{"model":"pswg:block/tatooine_log","x":90}}}
1 change: 1 addition & 0 deletions src/main/resources/assets/pswg/blockstates/tuber.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"variants":{"":{"model":"pswg:block/tuber"}}}
5 changes: 5 additions & 0 deletions src/main/resources/assets/pswg/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"block.pswg.desh_ore": "Desh Ore",
"block.pswg.diatium_block": "Block of Diatium",
"block.pswg.diatium_ore": "Diatium Ore",
"block.pswg.dried_poonten_grass": "Dried Poonten Grass",
"block.pswg.durasteel_block": "Block of Durasteel",
"block.pswg.floor_wedge_light": "Floor Wedge Light",
"block.pswg.funnel_flower": "Funnel Flower",
Expand All @@ -34,6 +35,7 @@
"block.pswg.imperial_crate": "Imperial Crate",
"block.pswg.ionite_block": "Block of Ionite",
"block.pswg.ionite_ore": "Ionite Ore",
"block.pswg.japor_log": "Japor Log",
"block.pswg.lab_wall": "Lab Wall",
"block.pswg.large_pipe": "Large Pipe",
"block.pswg.light_block": "Illumination Panel",
Expand Down Expand Up @@ -69,6 +71,7 @@
"block.pswg.panel_imperial_light_tall_3": "Imperial Lighting Panel",
"block.pswg.panel_imperial_light_tall_4": "Imperial Lighting Panel",
"block.pswg.plasteel_block": "Block of Plasteel",
"block.pswg.poonten_grass": "Poonten Grass",
"block.pswg.pourstone": "Pourstone",
"block.pswg.pourstone_slab": "Pourstone Slab",
"block.pswg.pourstone_stairs": "Pourstone Stairs",
Expand All @@ -84,9 +87,11 @@
"block.pswg.spoked_machine": "Spoked Machine",
"block.pswg.tatooine_home_door": "Tatooine Home Door",
"block.pswg.tatooine_home_door_controller": "Tatooine Home Door",
"block.pswg.tatooine_log": "Tatooine Log",
"block.pswg.titanium_block": "Block of Titanium",
"block.pswg.titanium_ore": "Titanium Ore",
"block.pswg.toolbox": "Toolbox",
"block.pswg.tuber": "Tuber",
"block.pswg.wall_cluster_light": "Wall Cluster Light",
"block.pswg.wet_pourstone": "Wet Pourstone",
"block.pswg.wet_pourstone_slab": "Wet Pourstone Slab",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"parent":"minecraft:block/cross","textures":{"cross":"pswg:block/dried_poonten_grass"}}
1 change: 1 addition & 0 deletions src/main/resources/assets/pswg/models/block/japor_log.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"parent":"minecraft:block/cube_column","textures":{"side":"pswg:block/japor_log_side","end":"pswg:block/japor_log_top"}}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"parent":"minecraft:block/cross","textures":{"cross":"pswg:block/poonten_grass"}}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"parent":"minecraft:block/cube_column","textures":{"side":"pswg:block/tatooine_log_side","end":"pswg:block/tatooine_log_top"}}
1 change: 1 addition & 0 deletions src/main/resources/assets/pswg/models/block/tuber.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"parent":"minecraft:block/cross","textures":{"cross":"pswg:block/tuber"}}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"parent":"minecraft:item/generated","textures":{"layer0":"pswg:block/dried_poonten_grass"}}
1 change: 1 addition & 0 deletions src/main/resources/assets/pswg/models/item/japor_log.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"parent":"pswg:block/japor_log"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"parent":"minecraft:item/generated","textures":{"layer0":"pswg:block/poonten_grass"}}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"parent":"pswg:block/tatooine_log"}
1 change: 1 addition & 0 deletions src/main/resources/assets/pswg/models/item/tuber.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"parent":"minecraft:item/generated","textures":{"layer0":"pswg:block/tuber"}}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"type":"minecraft:block","pools":[{"rolls":1,"entries":[{"type":"minecraft:item","name":"pswg:dried_poonten_grass"}],"conditions":[{"condition":"minecraft:survives_explosion"}]}]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"type":"minecraft:block","pools":[{"rolls":1,"entries":[{"type":"minecraft:item","name":"pswg:japor_log"}],"conditions":[{"condition":"minecraft:survives_explosion"}]}]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"type":"minecraft:block","pools":[{"rolls":1,"entries":[{"type":"minecraft:item","name":"pswg:poonten_grass"}],"conditions":[{"condition":"minecraft:survives_explosion"}]}]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"type":"minecraft:block","pools":[{"rolls":1,"entries":[{"type":"minecraft:item","name":"pswg:tatooine_log"}],"conditions":[{"condition":"minecraft:survives_explosion"}]}]}
1 change: 1 addition & 0 deletions src/main/resources/data/pswg/loot_tables/blocks/tuber.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"type":"minecraft:block","pools":[{"rolls":1,"entries":[{"type":"minecraft:item","name":"pswg:tuber"}],"conditions":[{"condition":"minecraft:survives_explosion"}]}]}

0 comments on commit ec02e79

Please sign in to comment.