finished the item distributor

This commit is contained in:
Ellpeck 2020-02-22 10:56:29 +01:00
parent 94a2092408
commit 2505975c32
11 changed files with 89 additions and 1 deletions

View file

@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "naturesaura:block/item_distributor"
}
}
}

View file

@ -0,0 +1,8 @@
{
"parent": "block/cube_bottom_top",
"textures": {
"side": "naturesaura:block/item_distributor",
"bottom": "naturesaura:block/item_distributor_bottom",
"top": "naturesaura:block/item_distributor_top"
}
}

View file

@ -0,0 +1,3 @@
{
"parent": "naturesaura:block/item_distributor"
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "naturesaura:item_distributor"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View file

@ -1,6 +1,8 @@
package de.ellpeck.naturesaura.blocks;
import de.ellpeck.naturesaura.blocks.tiles.TileEntityItemDistributor;
import de.ellpeck.naturesaura.data.BlockStateGenerator;
import de.ellpeck.naturesaura.reg.ICustomBlockState;
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
import net.minecraft.entity.player.PlayerEntity;
@ -11,7 +13,7 @@ import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.BlockRayTraceResult;
import net.minecraft.world.World;
public class BlockItemDistributor extends BlockContainerImpl {
public class BlockItemDistributor extends BlockContainerImpl implements ICustomBlockState {
public BlockItemDistributor() {
super("item_distributor", TileEntityItemDistributor::new, ModBlocks.prop(Blocks.FURNACE));
@ -31,4 +33,12 @@ public class BlockItemDistributor extends BlockContainerImpl {
}
return ActionResultType.SUCCESS;
}
@Override
public void generateCustomBlockState(BlockStateGenerator generator) {
generator.simpleBlock(this, generator.models().cubeBottomTop(this.getBaseName(),
generator.modLoc("block/" + this.getBaseName()),
generator.modLoc("block/" + this.getBaseName() + "_bottom"),
generator.modLoc("block/" + this.getBaseName() + "_top")));
}
}

View file

@ -57,6 +57,7 @@
"block.naturesaura.nether_wart_mushroom": "Nether Wart Mushroom",
"block.naturesaura.animal_container": "Corporeal Eye",
"block.naturesaura.snow_creator": "Winter's Calling",
"block.naturesaura.item_distributor": "Item Distributor",
"item.naturesaura.eye": "Environmental Eye",
"item.naturesaura.eye_improved": "Environmental Ocular",
"item.naturesaura.gold_fiber": "Brilliant Fiber",

Binary file not shown.

After

Width:  |  Height:  |  Size: 704 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 622 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 600 B

View file

@ -0,0 +1,21 @@
{
"name": "Item Distributor",
"icon": "naturesaura:item_distributor",
"category": "devices",
"advancement": "naturesaura:infused_materials",
"pages": [
{
"type": "text",
"text": "In a time long past, non-botanic scientists had created an actual addition to the world: The $(item)Item Distributor$(). Yet back in the day, its state was far less than functioning, but $(aura) turned this around by infusing the materials with the required power to move items by a designated pattern.$(br)The $(item)Item Distributor$() will take any items from containers that are placed $(thing)on top$() of it and"
},
{
"type": "text",
"text": "distribute them $(thing)equally$() throughout all of the containers that are placed $(thing)on the sides$() of it. Additionally, when having an $(l:items/eye)Environmental Eye$() equipped, the distributor is able to be switched into $(thing)random mode$() simply by sneaking and interacting with it. Following this action, items will not be distributed into the inventories equally, but randomly. This can be useful, for example, for redstone contraptions that require randomness."
},
{
"type": "crafting",
"text": "Creating the $(item)Item Distributor$()",
"recipe": "naturesaura:item_distributor"
}
]
}

View file

@ -0,0 +1,19 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
"SSS",
"I I",
"SSS"
],
"key": {
"S": {
"item": "naturesaura:infused_stone"
},
"I": {
"item": "naturesaura:infused_iron"
}
},
"result": {
"item": "naturesaura:item_distributor"
}
}