Filalux textures & models
|
@ -64,7 +64,7 @@ public class FurBlock extends AttachedBlock implements IRenderTypeable {
|
|||
if (tool != null && tool.getItem().isIn(FabricToolTags.SHEARS) || EnchantmentHelper.getLevel(Enchantments.SILK_TOUCH, tool) > 0) {
|
||||
return Lists.newArrayList(new ItemStack(this));
|
||||
}
|
||||
else if (MHelper.RANDOM.nextInt(dropChance) == 0) {
|
||||
else if (dropChance < 1 || MHelper.RANDOM.nextInt(dropChance) == 0) {
|
||||
return Lists.newArrayList(new ItemStack(drop));
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -337,6 +337,7 @@ public class EndBlocks {
|
|||
public static final Block JUNGLE_VINE = registerBlock("jungle_vine", new VineBlock());
|
||||
public static final Block RUBINEA = registerBlock("rubinea", new VineBlock());
|
||||
public static final Block FILALUX = registerBlock("filalux", new FilaluxBlock());
|
||||
public static final Block FILALUX_WINGS = registerBlock("filalux_wings", new FilaluxWingsBlock());
|
||||
public static final Block FILALUX_LANTERN = registerBlock("filalux_lantern", new FilaluxLanternBlock());
|
||||
|
||||
// Mob-Related
|
||||
|
|
47
src/main/java/ru/betterend/registry/FilaluxWingsBlock.java
Normal file
|
@ -0,0 +1,47 @@
|
|||
package ru.betterend.registry;
|
||||
|
||||
import java.util.EnumMap;
|
||||
|
||||
import com.google.common.collect.Maps;
|
||||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.fabricmc.fabric.api.tool.attribute.v1.FabricToolTags;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Material;
|
||||
import net.minecraft.block.ShapeContext;
|
||||
import net.minecraft.sound.BlockSoundGroup;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.util.shape.VoxelShape;
|
||||
import net.minecraft.util.shape.VoxelShapes;
|
||||
import net.minecraft.world.BlockView;
|
||||
import ru.betterend.blocks.basis.AttachedBlock;
|
||||
import ru.betterend.client.render.ERenderLayer;
|
||||
import ru.betterend.interfaces.IRenderTypeable;
|
||||
|
||||
public class FilaluxWingsBlock extends AttachedBlock implements IRenderTypeable {
|
||||
private static final EnumMap<Direction, VoxelShape> BOUNDING_SHAPES = Maps.newEnumMap(Direction.class);
|
||||
|
||||
public FilaluxWingsBlock() {
|
||||
super(FabricBlockSettings.of(Material.PLANT).breakByTool(FabricToolTags.SHEARS).sounds(BlockSoundGroup.WET_GRASS).noCollision());
|
||||
}
|
||||
|
||||
@Override
|
||||
public ERenderLayer getRenderLayer() {
|
||||
return ERenderLayer.CUTOUT;
|
||||
}
|
||||
|
||||
@Override
|
||||
public VoxelShape getOutlineShape(BlockState state, BlockView view, BlockPos pos, ShapeContext ePos) {
|
||||
return BOUNDING_SHAPES.get(state.get(FACING));
|
||||
}
|
||||
|
||||
static {
|
||||
BOUNDING_SHAPES.put(Direction.UP, VoxelShapes.cuboid(0.0, 0.0, 0.0, 1.0, 0.5, 1.0));
|
||||
BOUNDING_SHAPES.put(Direction.DOWN, VoxelShapes.cuboid(0.0, 0.5, 0.0, 1.0, 1.0, 1.0));
|
||||
BOUNDING_SHAPES.put(Direction.NORTH, VoxelShapes.cuboid(0.0, 0.0, 0.5, 1.0, 1.0, 1.0));
|
||||
BOUNDING_SHAPES.put(Direction.SOUTH, VoxelShapes.cuboid(0.0, 0.0, 0.0, 1.0, 1.0, 0.5));
|
||||
BOUNDING_SHAPES.put(Direction.WEST, VoxelShapes.cuboid(0.5, 0.0, 0.0, 1.0, 1.0, 1.0));
|
||||
BOUNDING_SHAPES.put(Direction.EAST, VoxelShapes.cuboid(0.0, 0.0, 0.0, 0.5, 1.0, 1.0));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"variants": {
|
||||
"facing=north": { "model": "betterend:block/filalux_wings", "y": 180 },
|
||||
"facing=south": { "model": "betterend:block/filalux_wings" },
|
||||
"facing=east": { "model": "betterend:block/filalux_wings", "y": 270 },
|
||||
"facing=west": { "model": "betterend:block/filalux_wings", "y": 90 },
|
||||
"facing=up": { "model": "betterend:block/filalux_wings_top" },
|
||||
"facing=down": { "model": "betterend:block/filalux_wings_bottom", "x": 180 }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
{
|
||||
"__comment": "Designed by Paulevs with Cubik Studio - https://cubik.studio",
|
||||
"textures": {
|
||||
"particle": "betterend:block/filalux_wings",
|
||||
"texture": "betterend:block/filalux_wings",
|
||||
"large": "betterend:block/filalux_wings_large"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"__comment": "PlaneY1",
|
||||
"from": [ 0, 8, 0 ],
|
||||
"to": [ 16, 8.001, 8 ],
|
||||
"shade": false,
|
||||
"faces": {
|
||||
"down": { "uv": [ 0, 8, 16, 0 ], "texture": "#texture" },
|
||||
"up": { "uv": [ 0, 0, 16, 8 ], "texture": "#texture" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "PlaneY1",
|
||||
"from": [ 0, 6, 0 ],
|
||||
"to": [ 16, 6.001, 8 ],
|
||||
"rotation": { "origin": [ 0, 6, 0 ], "axis": "x", "angle": 22.5 },
|
||||
"shade": false,
|
||||
"faces": {
|
||||
"down": { "uv": [ 0, 16, 16, 8 ], "texture": "#texture" },
|
||||
"up": { "uv": [ 0, 8, 16, 16 ], "texture": "#texture" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "PlaneY1",
|
||||
"from": [ 0, 10, 0 ],
|
||||
"to": [ 16, 10.001, 16 ],
|
||||
"rotation": { "origin": [ 0, 10, 0 ], "axis": "x", "angle": -22.5 },
|
||||
"shade": false,
|
||||
"faces": {
|
||||
"down": { "uv": [ 0, 16, 16, 0 ], "texture": "#large" },
|
||||
"up": { "uv": [ 0, 0, 16, 16 ], "texture": "#large" }
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,97 @@
|
|||
{
|
||||
"__comment": "Designed by Paulevs with Cubik Studio - https://cubik.studio",
|
||||
"textures": {
|
||||
"particle": "betterend:block/filalux_wings",
|
||||
"texture": "betterend:block/filalux_wings"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"__comment": "PlaneY2",
|
||||
"from": [ 9, 0, 0 ],
|
||||
"to": [ 17, 0.001, 16 ],
|
||||
"rotation": { "origin": [ 9, 0, 0 ], "axis": "z", "angle": 45 },
|
||||
"shade": false,
|
||||
"faces": {
|
||||
"down": { "uv": [ 0, 0, 16, 8 ], "texture": "#texture", "rotation": 270 },
|
||||
"up": { "uv": [ 0, 0, 16, 8 ], "texture": "#texture", "rotation": 270 }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "PlaneY2",
|
||||
"from": [ 13, 0, 0 ],
|
||||
"to": [ 21, 0.001, 16 ],
|
||||
"rotation": { "origin": [ 13, 0, 0 ], "axis": "z", "angle": 22.5 },
|
||||
"shade": false,
|
||||
"faces": {
|
||||
"down": { "uv": [ 0, 8, 16, 16 ], "texture": "#texture", "rotation": 270 },
|
||||
"up": { "uv": [ 0, 8, 16, 16 ], "texture": "#texture", "rotation": 270 }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "PlaneY2",
|
||||
"from": [ -1, -0.001, 0 ],
|
||||
"to": [ 7, 0, 16 ],
|
||||
"rotation": { "origin": [ 7, 0, 0 ], "axis": "z", "angle": -45 },
|
||||
"shade": false,
|
||||
"faces": {
|
||||
"down": { "uv": [ 0, 0, 16, 8 ], "texture": "#texture", "rotation": 90 },
|
||||
"up": { "uv": [ 0, 0, 16, 8 ], "texture": "#texture", "rotation": 90 }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "PlaneY2",
|
||||
"from": [ -5, -0.001, 0 ],
|
||||
"to": [ 3, 0, 16 ],
|
||||
"rotation": { "origin": [ 3, 0, 0 ], "axis": "z", "angle": -22.5 },
|
||||
"shade": false,
|
||||
"faces": {
|
||||
"down": { "uv": [ 0, 8, 16, 16 ], "texture": "#texture", "rotation": 90 },
|
||||
"up": { "uv": [ 0, 8, 16, 16 ], "texture": "#texture", "rotation": 90 }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "PlaneY5",
|
||||
"from": [ 0, 0, 9 ],
|
||||
"to": [ 16, 0.001, 17 ],
|
||||
"rotation": { "origin": [ 0, 0, 9 ], "axis": "x", "angle": -45 },
|
||||
"shade": false,
|
||||
"faces": {
|
||||
"down": { "uv": [ 0, 8, 16, 0 ], "texture": "#texture" },
|
||||
"up": { "uv": [ 0, 0, 16, 8 ], "texture": "#texture" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "PlaneY5",
|
||||
"from": [ 0, 0, 13 ],
|
||||
"to": [ 16, 0.001, 21 ],
|
||||
"rotation": { "origin": [ 0, 0, 13 ], "axis": "x", "angle": -22.5 },
|
||||
"shade": false,
|
||||
"faces": {
|
||||
"down": { "uv": [ 0, 16, 16, 8 ], "texture": "#texture" },
|
||||
"up": { "uv": [ 0, 8, 16, 16 ], "texture": "#texture" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "PlaneY5",
|
||||
"from": [ 0, -0.001, -1 ],
|
||||
"to": [ 16, 0, 7 ],
|
||||
"rotation": { "origin": [ 0, 0, 7 ], "axis": "x", "angle": 45 },
|
||||
"shade": false,
|
||||
"faces": {
|
||||
"down": { "uv": [ 0, 0, 16, 8 ], "texture": "#texture" },
|
||||
"up": { "uv": [ 0, 8, 16, 0 ], "texture": "#texture" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "PlaneY5",
|
||||
"from": [ 0, -0.001, -5 ],
|
||||
"to": [ 16, 0, 3 ],
|
||||
"rotation": { "origin": [ 0, 0, 3 ], "axis": "x", "angle": 22.5 },
|
||||
"shade": false,
|
||||
"faces": {
|
||||
"down": { "uv": [ 0, 8, 16, 16 ], "texture": "#texture" },
|
||||
"up": { "uv": [ 0, 16, 16, 8 ], "texture": "#texture" }
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,77 @@
|
|||
{
|
||||
"__comment": "Designed by Paulevs with Cubik Studio - https://cubik.studio",
|
||||
"textures": {
|
||||
"particle": "betterend:block/filalux_wings_large",
|
||||
"texture": "betterend:block/filalux_wings_large",
|
||||
"top": "betterend:block/filalux_wings_top",
|
||||
"side": "betterend:block/filalux_wings_top_side"
|
||||
},
|
||||
"elements": [
|
||||
{
|
||||
"__comment": "PlaneY9",
|
||||
"from": [ -8, 0.125, -8 ],
|
||||
"to": [ 24, 0.126, 24 ],
|
||||
"shade": false,
|
||||
"faces": {
|
||||
"down": { "uv": [ 0, 0, 16, 16 ], "texture": "#top" },
|
||||
"up": { "uv": [ 0, 0, 16, 16 ], "texture": "#top" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "PlaneY10",
|
||||
"from": [ 10, 0, 0 ],
|
||||
"to": [ 26, 0.001, 16 ],
|
||||
"rotation": { "origin": [ 10, 0, 0 ], "axis": "z", "angle": 22.5 },
|
||||
"shade": false,
|
||||
"faces": {
|
||||
"down": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture", "rotation": 270 },
|
||||
"up": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture", "rotation": 270 }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "PlaneY10",
|
||||
"from": [ -10, -0.001, 0 ],
|
||||
"to": [ 6, 0, 16 ],
|
||||
"rotation": { "origin": [ 6, 0, 0 ], "axis": "z", "angle": -22.5 },
|
||||
"shade": false,
|
||||
"faces": {
|
||||
"down": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture", "rotation": 90 },
|
||||
"up": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture", "rotation": 90 }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "PlaneY12",
|
||||
"from": [ 0, 0, 10 ],
|
||||
"to": [ 16, 0.001, 26 ],
|
||||
"rotation": { "origin": [ 0, 0, 10 ], "axis": "x", "angle": -22.5 },
|
||||
"shade": false,
|
||||
"faces": {
|
||||
"down": { "uv": [ 0, 16, 16, 0 ], "texture": "#texture" },
|
||||
"up": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "PlaneY12",
|
||||
"from": [ 0, -0.001, -10 ],
|
||||
"to": [ 16, 0, 6 ],
|
||||
"rotation": { "origin": [ 0, 0, 6 ], "axis": "x", "angle": 22.5 },
|
||||
"shade": false,
|
||||
"faces": {
|
||||
"down": { "uv": [ 0, 0, 16, 16 ], "texture": "#texture" },
|
||||
"up": { "uv": [ 0, 16, 16, 0 ], "texture": "#texture" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"__comment": "Box14",
|
||||
"from": [ -0.5, -16, -0.5 ],
|
||||
"to": [ 16.5, 0, 16.5 ],
|
||||
"shade": false,
|
||||
"faces": {
|
||||
"north": { "uv": [ 0, 0, 16, 16 ], "texture": "#side" },
|
||||
"south": { "uv": [ 0, 0, 16, 16 ], "texture": "#side" },
|
||||
"west": { "uv": [ 0, 0, 16, 16 ], "texture": "#side" },
|
||||
"east": { "uv": [ 0, 0, 16, 16 ], "texture": "#side" }
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "betterend:item/filalux_wings"
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 263 B After Width: | Height: | Size: 526 B |
After Width: | Height: | Size: 234 B |
After Width: | Height: | Size: 242 B |
After Width: | Height: | Size: 462 B |
After Width: | Height: | Size: 214 B |
After Width: | Height: | Size: 291 B |