33 Commits

Author SHA1 Message Date
c80d3c4167 Merge pull request 'Further visual fixes' (#26) from dev into master
All checks were successful
deploy / deploy (push) Successful in 4m59s
Reviewed-on: #26
2025-05-14 18:21:15 +02:00
fd26f5da4a feat: new version for publish 2025-05-14 18:15:00 +02:00
dbcb79f992 improved: removed unnecessary check + inner cull improvement 2025-05-14 18:13:35 +02:00
8d8a0e3654 fix: broken inner collision due to bad model 2025-05-14 18:13:18 +02:00
5c6fbff52e fix: visual issue always showing the suffocation texture 2025-05-14 18:13:06 +02:00
17f5c378cd Merge pull request 'Visual fixes' (#25) from dev into master
All checks were successful
deploy / deploy (push) Successful in 5m54s
Reviewed-on: #25
2025-05-14 02:49:34 +02:00
2f9cf1e57d feat: new version for publish 2025-05-14 02:45:42 +02:00
a470724d81 fix: render issue with water and reframed blocks + missing mixin in mixin config + shading improvement prep 2025-05-14 02:43:46 +02:00
b825959626 fix: render issue with non collidable reframed + culling issue with vanilla blocks + Fixed #22 2025-05-14 02:25:15 +02:00
083d39562a fix: added additional check for placing event see #19 2025-04-13 20:09:08 +02:00
9e40de85e3 Merge pull request 'new block and better additivity' (#24) from dev into master
All checks were successful
deploy / deploy (push) Successful in 6m2s
Reviewed-on: #24
2024-07-01 23:32:00 +02:00
abc7031989 Merge pull request 'More merging logic + 11 new block + Fix server / client sync' (#23) from dev into master
All checks were successful
deploy / deploy (push) Successful in 5m39s
Reviewed-on: #23
2024-06-19 14:42:54 +02:00
ef76408b80 Merge pull request 'fix and new block' (#22) from dev into master
All checks were successful
deploy / deploy (push) Successful in 5m32s
Reviewed-on: #22
2024-06-16 18:22:10 +02:00
73bf27bdda Merge pull request 'fix: more checks on ThemedEntity Class (Always more to fix)' (#21) from dev into master
All checks were successful
deploy / deploy (push) Successful in 5m8s
Reviewed-on: #21
2024-06-14 17:17:37 +02:00
402caaf549 Merge pull request 'fix: more injection fix + bad culling' (#20) from dev into master
All checks were successful
deploy / deploy (push) Successful in 5m5s
Reviewed-on: #20
2024-06-14 16:53:17 +02:00
4eddb32190 Merge pull request 'fix: injection remapping issues fixed + additional check' (#19) from dev into master
All checks were successful
deploy / deploy (push) Successful in 5m11s
Reviewed-on: #19
2024-06-14 00:37:13 +02:00
53f962da1b Merge pull request 'changed version' (#18) from dev into master
All checks were successful
deploy / deploy (push) Successful in 6m17s
Reviewed-on: #18
2024-06-13 23:10:51 +02:00
5517d813e7 Merge pull request 'added new blocks and further axiom support' (#17) from dev into master
Some checks failed
deploy / deploy (push) Has been cancelled
Reviewed-on: #17
2024-06-13 22:55:09 +02:00
f6b403d852 Merge pull request 'feat: added support for ReFramed block entities with axiom' (#16) from dev into master
All checks were successful
deploy / deploy (push) Successful in 5m16s
Reviewed-on: #16
2024-05-23 12:34:22 +02:00
aa3cf6d511 Merge pull request 'fix: falling block entities calling can replace crashing logic side' (#15) from dev into master
All checks were successful
deploy / deploy (push) Successful in 5m59s
Reviewed-on: #15
2024-05-23 00:47:20 +02:00
cfdbfd3a6a Merge pull request 'Improvement for cache fixing issues + 4 new blocks' (#14) from dev into master
All checks were successful
deploy / deploy (push) Successful in 5m39s
Reviewed-on: #14
2024-05-14 15:53:28 +02:00
ac2f7def0c Merge pull request '1.5.8 cache fix' (#13) from dev into master
All checks were successful
deploy / deploy (push) Successful in 5m13s
Reviewed-on: #13
2024-04-16 19:21:50 +02:00
44f03b2c96 Merge pull request 'New minor version with fix for caching on dynamic models' (#12) from dev into master
All checks were successful
deploy / deploy (push) Successful in 5m25s
Reviewed-on: #12
2024-04-15 20:58:47 +02:00
f1af00738e Merge pull request 'version 1.5.6 fix for server imports + support for continuity and MoreCulling compat' (#11) from dev into master
All checks were successful
deploy / deploy (push) Successful in 5m44s
Reviewed-on: #11
2024-03-25 16:33:09 +01:00
186cca3e27 Merge pull request 'v1.5 new shapes + self culling + caching + coding tools/cleanup' (#10) from dev into master
All checks were successful
deploy / deploy (push) Successful in 5m42s
Reviewed-on: #10
2024-03-14 22:30:29 +01:00
d43d9456ee Merge pull request 'moved and created data generation for all elements other than models + removed block that aren't working' (#9) from dev into master
All checks were successful
deploy / deploy (push) Successful in 5m48s
Reviewed-on: #9
2024-03-05 21:56:03 +01:00
2957a899db Merge pull request 'Sound support + OffHand camo.' (#8) from dev into master
All checks were successful
deploy / deploy (push) Successful in 5m6s
Reviewed-on: #8
2024-03-04 17:04:13 +01:00
f3578a4da5 Merge pull request 'Indium suppor + github runner' (#7) from dev into master
Some checks failed
deploy / deploy (push) Failing after 5m3s
Reviewed-on: #7
2024-03-03 21:34:52 +01:00
28ae110e14 Merge pull request 'Double frames' (#6) from dev into master
All checks were successful
deploy / deploy (push) Successful in 5m14s
Reviewed-on: #6
2024-03-02 02:02:47 +01:00
6dc0cf7fdf Merge pull request 'Athena support + stair improvements + coloration' (#5) from dev into master
All checks were successful
deploy / deploy (push) Successful in 5m13s
Reviewed-on: #5
2024-02-26 17:05:24 +01:00
b30177a5c7 Merge pull request 'Fix mixin trying to inject code in server not available (because the class is client only)' (#3) from dev into master
All checks were successful
deploy / deploy (push) Successful in 4m57s
Reviewed-on: #3
2024-02-17 22:31:39 +01:00
1e132c71ef Merge pull request 'Add data generation before publishing' (#2) from dev into master
All checks were successful
deploy / deploy (push) Successful in 3m56s
Reviewed-on: #2
2024-02-16 22:29:53 +01:00
0233b3fa49 Merge pull request '1.0-SNAPSHOT' (#1) from dev into master
All checks were successful
deploy / deploy (push) Successful in 3m23s
Reviewed-on: #1
2024-02-16 21:50:02 +01:00
17 changed files with 256 additions and 30 deletions

View File

@@ -9,7 +9,7 @@ loader_version=0.15.11
# Mod Properties
modrinth_id = jCpoCBpn
mod_version = 1.6.6
mod_version = 1.6.8
maven_group = fr.adrien1106
archives_base_name = ReFramed
mod_id = reframed

View File

@@ -135,11 +135,11 @@ public class ReFramed implements ModInitializer {
private static AbstractBlock.Settings cp(Block base) {
return AbstractBlock.Settings.copy(base)
.luminance(state -> state.contains(LIGHT) && state.get(LIGHT) ? 15 : 0)
.nonOpaque()
.sounds(BlockSoundGroup.WOOD)
.hardness(0.2f)
.suffocates((a,b,c) -> false)
.blockVision((a,b,c) -> false);
.suffocates(Blocks::never)
.solidBlock(Blocks::always);
// .blockVision(Blocks::always);
}
private static <I extends Item> I registerItem(String path, I item) {

View File

@@ -2,9 +2,11 @@ package fr.adrien1106.reframed.block;
import fr.adrien1106.reframed.ReFramed;
import fr.adrien1106.reframed.util.blocks.BlockHelper;
import fr.adrien1106.reframed.util.blocks.ThemeableBlockEntity;
import net.minecraft.block.*;
import net.minecraft.block.entity.BlockEntity;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.ai.pathing.NavigationType;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.BlockItem;
import net.minecraft.item.ItemPlacementContext;
@@ -17,6 +19,7 @@ import net.minecraft.util.ActionResult;
import net.minecraft.util.Hand;
import net.minecraft.util.ItemScatterer;
import net.minecraft.util.collection.DefaultedList;
import net.minecraft.util.function.BooleanBiFunction;
import net.minecraft.util.hit.BlockHitResult;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction;
@@ -31,6 +34,7 @@ import org.jetbrains.annotations.Nullable;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.IntStream;
import static fr.adrien1106.reframed.block.ReFramedEntity.BLOCKSTATE_KEY;
@@ -39,10 +43,26 @@ import static fr.adrien1106.reframed.util.blocks.BlockProperties.LIGHT;
public class ReFramedBlock extends Block implements BlockEntityProvider {
public ReFramedBlock(Settings settings) {
super(settings);
super(settings.dynamicBounds());
setDefaultState(getDefaultState().with(LIGHT, false));
}
@Override
@SuppressWarnings("deprecation")
public int getOpacity(BlockState state, BlockView world, BlockPos pos) {
if (state.get(LIGHT)) return 0;
if (!(world.getBlockEntity(pos) instanceof ReFramedEntity frame_entity)
|| frame_entity.getTheme(0).isOpaque())
return world.getMaxLightLevel();
return 0;
}
@Override
@SuppressWarnings("deprecation")
public boolean canPathfindThrough(BlockState state, BlockView world, BlockPos pos, NavigationType type) {
return false;
}
@Override
public @Nullable BlockEntity createBlockEntity(BlockPos pos, BlockState state) {
return ReFramed.REFRAMED_BLOCK_ENTITY.instantiate(pos, state);
@@ -208,4 +228,17 @@ public class ReFramedBlock extends Block implements BlockEntityProvider {
public Map<Integer, Integer> getThemeMap(BlockState state, BlockState new_state) {
return Map.of();
}
public VoxelShape getShadingShape(BlockState state, BlockView world, BlockPos pos) {
if (!(world.getBlockEntity(pos) instanceof ThemeableBlockEntity framed_entity)) return this.getCollisionShape(state, world, pos, ShapeContext.absent());
AtomicInteger i = new AtomicInteger(1);
return framed_entity.getThemes().stream().map((theme) -> {
int index = i.getAndIncrement();
return theme.isTransparent(world, pos) ? VoxelShapes.empty() : this.getShape(state, index);
}).reduce(
VoxelShapes.empty(),
(prev, current) -> VoxelShapes.combine(prev, current, BooleanBiFunction.OR)
);
}
}

View File

@@ -32,12 +32,12 @@ public class ReFramedEntity extends BlockEntity implements ThemeableBlockEntity
protected BlockState first_state = Blocks.AIR.getDefaultState();
protected byte bit_field = SOLIDITY_MASK;
protected static final byte LIGHT_MASK = 0b001;
protected static final byte REDSTONE_MASK = 0b010;
protected static final byte SOLIDITY_MASK = 0b100;
public static final byte LIGHT_MASK = 0b001;
public static final byte REDSTONE_MASK = 0b010;
public static final byte SOLIDITY_MASK = 0b100;
public static final String BLOCKSTATE_KEY = "s";
protected static final String BITFIELD_KEY = "b";
public static final String BITFIELD_KEY = "b";
public ReFramedEntity(BlockEntityType<?> type, BlockPos pos, BlockState state) {
super(type, pos, state);
@@ -145,7 +145,10 @@ public class ReFramedEntity extends BlockEntity implements ThemeableBlockEntity
if (isSolid()) bit_field &= ~SOLIDITY_MASK;
else bit_field |= SOLIDITY_MASK;
if(world != null) world.setBlockState(pos, getCachedState());
if(world != null) {
world.setBlockState(pos, getCachedState());
ReFramed.chunkRerenderProxy.accept(world, pos);
}
markDirtyAndDispatch();
}

View File

@@ -23,7 +23,13 @@ public class WaterloggableReFramedBlock extends ReFramedBlock implements Waterlo
protected void appendProperties(StateManager.Builder<Block, BlockState> builder) {
super.appendProperties(builder.add(Properties.WATERLOGGED));
}
@Override
@SuppressWarnings("deprecation")
public boolean hasSidedTransparency(BlockState state) {
return true;
}
@Nullable
@Override
public BlockState getPlacementState(ItemPlacementContext ctx) {

View File

@@ -51,7 +51,7 @@ public class CamoAppearanceManager {
for(BlendMode blend : BlendMode.values()) {
finder.clear().disableDiffuse(false).blendMode(blend);
materials.put(blend, finder.ambientOcclusion(TriState.FALSE).find());
materials.put(blend, finder.ambientOcclusion(TriState.TRUE).find());
ao_materials.put(blend, finder.ambientOcclusion(TriState.DEFAULT).find()); //not "true" since that *forces* AO, i just want to *allow* AO
}

View File

@@ -89,8 +89,12 @@ public class RenderHelper {
BlockState self_theme = frame_entity.getTheme(theme_index);
BlockState other_theme = frame_entity.getTheme(cull_theme);
if (self_theme.isSideInvisible(other_theme, null)) return false;
return !self_theme.isOpaque() || !other_theme.isOpaque();
try {
if (self_theme.isSideInvisible(other_theme, null)) return false;
} catch (NullPointerException e) { // this can happen if mod haven't thought about inner faces
return true;
}
return self_theme.isOpaque() != other_theme.isOpaque() && self_theme.isOpaque();
}
// Doing this method from scratch as it is simpler to do than injecting everywhere
@@ -104,7 +108,7 @@ public class RenderHelper {
? e : null;
// normal behaviour
if (theme_index == 0 || (self == null && other == null))
if ((theme_index == 0 && self != null) || (self == null && other == null))
return Block.shouldDrawSide(self_state, world, pos, side, other_pos);
// self is a normal Block
@@ -116,7 +120,7 @@ public class RenderHelper {
VoxelShape other_shape = VoxelShapes.empty();
for (BlockState s: other.getThemes()) {
i++;
if (self_state.isSideInvisible(s, side) || s.isOpaque())
if (self_state.isSideInvisible(s, side) || (s.isOpaque() && (other.isSolid() || self_state.isTransparent(world ,pos))))
other_shape = combine(
other_shape,
other_block
@@ -160,7 +164,7 @@ public class RenderHelper {
VoxelShape other_shape = VoxelShapes.empty();
for (BlockState s: other.getThemes()) {
i++;
if (self_theme.isSideInvisible(s, side) || s.isOpaque())
if (self_theme.isSideInvisible(s, side) || (s.isOpaque() && (!self.isSolid() || (other.isSolid() == self.isSolid()))))
other_shape = combine(
other_shape,
other_block

View File

@@ -32,7 +32,8 @@ public class BlockItemMixin {
)
)
private static void placeBlockWithOffHandCamo(World world, PlayerEntity player, BlockPos pos, ItemStack stack, CallbackInfoReturnable<Boolean> cir, @Local LocalRef<NbtCompound> compound) {
if (compound.get() != null
if (player == null
|| compound.get() != null
|| player.getOffHandStack().isEmpty()
|| player.getMainHandStack().isEmpty()
|| !(player.getMainHandStack().getItem() instanceof BlockItem frame)

View File

@@ -31,6 +31,8 @@ public class CompatMixinPlugin implements IMixinConfigPlugin {
CONDITIONS.put("fr.adrien1106.reframed.mixin.compat.IndiumNonTerrainBlockRenderContextMixin", () -> LOADER.isModLoaded(COMPAT_MOD.get(1)));
CONDITIONS.put("fr.adrien1106.reframed.mixin.render.BlockRenderContextMixin", () -> !LOADER.isModLoaded(COMPAT_MOD.get(1)));
CONDITIONS.put("fr.adrien1106.reframed.mixin.compat.SodiumBlockOcclusionCacheMixin", () -> LOADER.isModLoaded(COMPAT_MOD.get(2)));
CONDITIONS.put("fr.adrien1106.reframed.mixin.render.FluidRendererMixin", () -> !LOADER.isModLoaded(COMPAT_MOD.get(2)));
CONDITIONS.put("fr.adrien1106.reframed.mixin.compat.SodiumFluidRendererMixin", () -> LOADER.isModLoaded(COMPAT_MOD.get(2)));
CONDITIONS.put("fr.adrien1106.reframed.mixin.compat.ContinuityConnectionPredicateMixin", () -> LOADER.isModLoaded(COMPAT_MOD.get(4)));
CONDITIONS.put("fr.adrien1106.reframed.mixin.compat.ContinuityCTMBakedModelMixin", () -> LOADER.isModLoaded(COMPAT_MOD.get(4)));
CONDITIONS.put("fr.adrien1106.reframed.mixin.compat.ContinuityCTMQuadTransformMixin", () -> LOADER.isModLoaded(COMPAT_MOD.get(4)));

View File

@@ -0,0 +1,62 @@
package fr.adrien1106.reframed.mixin.compat;
import com.llamalad7.mixinextras.sugar.Local;
import fr.adrien1106.reframed.block.ReFramedBlock;
import fr.adrien1106.reframed.util.blocks.ThemeableBlockEntity;
import me.jellysquid.mods.sodium.client.render.chunk.compile.pipeline.FluidRenderer;
import me.jellysquid.mods.sodium.client.world.WorldSlice;
import net.fabricmc.fabric.api.client.render.fluid.v1.FluidRenderHandlerRegistry;
import net.minecraft.block.*;
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 org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Redirect;
@Mixin(FluidRenderer.class)
public abstract class SodiumFluidRendererMixin {
@Redirect(
method = "isSideExposed",
at = @At(
value = "INVOKE",
target = "Lnet/minecraft/block/BlockState;isOpaque()Z"
)
)
private boolean isSideOpaqueExposed(BlockState state) {
if (!(state.getBlock() instanceof ReFramedBlock)) return state.isOpaque();
return true; // forces to compute correct shape
}
@Redirect(
method = "isSideExposed",
at = @At(
value = "INVOKE",
target = "Lnet/minecraft/block/BlockState;getCullingShape(Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/util/shape/VoxelShape;"
)
)
private VoxelShape isSideShapeExposed(BlockState state, BlockView world, BlockPos pos) {
if (!(state.getBlock() instanceof ReFramedBlock block)) return state.getCullingShape(world, pos);
return block.getShadingShape(state, world, pos);
}
@Redirect(
method = "render",
at = @At(
value = "INVOKE",
target = "Lnet/fabricmc/fabric/api/client/render/fluid/v1/FluidRenderHandlerRegistry;isBlockTransparent(Lnet/minecraft/block/Block;)Z"
)
)
private boolean getThemeState(FluidRenderHandlerRegistry fluid_handler, Block block, @Local(argsOnly = true) WorldSlice world, @Local(ordinal = 2) BlockPos pos, @Local BlockState state, @Local Direction dir) {
if (!(block instanceof ReFramedBlock rfblock && world.getBlockEntity(pos) instanceof ThemeableBlockEntity framed_entity)) return fluid_handler.isBlockTransparent(block);
return !VoxelShapes.isSideCovered(VoxelShapes.fullCube(), rfblock.getShadingShape(state, world, pos), dir)
&& framed_entity.getThemes().stream()
.anyMatch(s -> s.getBlock() instanceof LeavesBlock
|| s.getBlock() instanceof TranslucentBlock
|| s.getBlock() instanceof AirBlock
);
}
}

View File

@@ -0,0 +1,27 @@
package fr.adrien1106.reframed.mixin.render;
import fr.adrien1106.reframed.client.util.RenderHelper;
import fr.adrien1106.reframed.util.blocks.ThemeableBlockEntity;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction;
import net.minecraft.world.BlockView;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
@Mixin(Block.class)
public abstract class BlockMixin {
@Inject(
method = "shouldDrawSide",
at = @At("HEAD"),
cancellable = true
) // serves as a safety sometimes mods implements culling cache and hence will break some injections...
private static void shouldDrawSide(BlockState state, BlockView world, BlockPos pos, Direction side, BlockPos other_pos, CallbackInfoReturnable<Boolean> cir) {
if (!(world.getBlockEntity(other_pos) instanceof ThemeableBlockEntity)) return;
cir.setReturnValue(RenderHelper.shouldDrawSide(state, world, pos, side, other_pos, 0));
}
}

View File

@@ -0,0 +1,56 @@
package fr.adrien1106.reframed.mixin.render;
import fr.adrien1106.reframed.block.ReFramedBlock;
import fr.adrien1106.reframed.util.blocks.ThemeableBlockEntity;
import net.minecraft.block.*;
import net.minecraft.client.render.block.FluidRenderer;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction;
import net.minecraft.util.shape.VoxelShapes;
import net.minecraft.world.BlockRenderView;
import net.minecraft.world.BlockView;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.Redirect;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
@Mixin(FluidRenderer.class)
public abstract class FluidRendererMixin {
@Inject(
method = "isSideCovered(Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/Direction;FLnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Z",
at = @At("HEAD"),
cancellable = true
) // force dynamic water side rendering
private static void isSameSideCovered(BlockView world, Direction direction, float height, BlockPos pos, BlockState state, CallbackInfoReturnable<Boolean> cir) {
if (!(state.getBlock() instanceof ReFramedBlock block)
) return;
boolean is_covered = VoxelShapes.isSideCovered(
VoxelShapes.cuboid(0.0, 0.0, 0.0, 1.0, height, 1.0),
block.getShadingShape(state, world, pos),
direction
);
cir.setReturnValue(is_covered);
}
@Redirect(
method = "render",
at = @At(
value = "INVOKE",
target = "Lnet/minecraft/world/BlockRenderView;getBlockState(Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/block/BlockState;",
ordinal = 7
)
)
private BlockState getThemeState(BlockRenderView world, BlockPos pos) {
if (!(world.getBlockEntity(pos) instanceof ThemeableBlockEntity framed_entity)) return world.getBlockState(pos);
return framed_entity.getThemes().stream()
.anyMatch(state -> state.getBlock() instanceof LeavesBlock
|| state.getBlock() instanceof TranslucentBlock
|| state.getBlock() instanceof AirBlock
)
? Blocks.GLASS.getDefaultState()
: world.getBlockState(pos) ;
}
}

View File

@@ -10,4 +10,6 @@ public interface ThemeableBlockEntity {
void setTheme(BlockState state, int i);
List<BlockState> getThemes();
boolean isSolid();
}

View File

@@ -12,10 +12,11 @@ import net.minecraft.util.math.BlockPos;
import java.util.ArrayList;
import java.util.List;
import static fr.adrien1106.reframed.block.ReFramedEntity.BLOCKSTATE_KEY;
import static fr.adrien1106.reframed.block.ReFramedEntity.*;
public class ThemedBlockEntity extends BlockEntity implements ThemeableBlockEntity {
private final List<BlockState> themes;
private final boolean isSolid;
public ThemedBlockEntity(NbtCompound compound, BlockPos pos, BlockState state) {
super(null, pos, state);
@@ -26,6 +27,7 @@ public class ThemedBlockEntity extends BlockEntity implements ThemeableBlockEnti
compound.getCompound(BLOCKSTATE_KEY + i)
));
}
isSolid = !compound.contains(BITFIELD_KEY) || (compound.getByte(BITFIELD_KEY) & SOLIDITY_MASK) != 0;
}
@Override
@@ -47,4 +49,9 @@ public class ThemedBlockEntity extends BlockEntity implements ThemeableBlockEnti
public List<BlockState> getThemes() {
return themes;
}
@Override
public boolean isSolid() {
return isSolid;
}
}

View File

@@ -1,17 +1,27 @@
{
"credit": "Made with Blockbench",
"textures": {
"particle": "#side"
},
"elements": [
{
"from": [0, 0, 0],
"from": [0, 0, 8],
"to": [8, 8, 16],
"faces": {
"north": {"uv": [8, 8, 16, 16], "texture": "#side", "cullface": "north"},
"south": {"uv": [0, 8, 8, 16], "texture": "#side", "cullface": "south"},
"west": {"uv": [0, 8, 16, 16], "texture": "#side", "cullface": "west"},
"up": {"uv": [0, 0, 8, 16], "texture": "#top"},
"down": {"uv": [0, 0, 8, 16], "texture": "#bottom", "cullface": "down"}
"west": {"uv": [8, 8, 16, 16], "texture": "#side", "cullface": "west"},
"up": {"uv": [0, 8, 8, 16], "texture": "#top"},
"down": {"uv": [0, 0, 8, 8], "texture": "#bottom", "cullface": "down"}
}
},
{
"from": [0, 0, 0],
"to": [8, 8, 8],
"faces": {
"north": {"uv": [8, 8, 16, 16], "texture": "#side", "cullface": "north"},
"west": {"uv": [0, 8, 8, 16], "texture": "#side", "cullface": "west"},
"up": {"uv": [0, 0, 8, 8], "texture": "#top"},
"down": {"uv": [0, 8, 8, 16], "texture": "#bottom", "cullface": "down"}
}
},
{

View File

@@ -1,16 +1,26 @@
{
"credit": "Made with Blockbench",
"textures": {
"particle": "#side"
},
"elements": [
{
"from": [8, 0, 0],
"from": [8, 8, 0],
"to": [16, 16, 8],
"faces": {
"north": {"uv": [0, 0, 8, 16], "texture": "#side", "cullface": "north"},
"east": {"uv": [8, 0, 16, 16], "texture": "#side", "cullface": "east"},
"west": {"uv": [0, 0, 8, 16], "texture": "#side"},
"up": {"uv": [8, 0, 16, 8], "texture": "#top", "cullface": "up"},
"north": {"uv": [0, 0, 8, 8], "texture": "#side", "cullface": "north"},
"east": {"uv": [8, 0, 16, 8], "texture": "#side", "cullface": "east"},
"west": {"uv": [0, 0, 8, 8], "texture": "#side"},
"up": {"uv": [8, 0, 16, 8], "texture": "#top", "cullface": "up"}
}
},
{
"from": [8, 0, 0],
"to": [16, 8, 8],
"faces": {
"north": {"uv": [0, 8, 8, 16], "texture": "#side", "cullface": "north"},
"east": {"uv": [8, 8, 16, 16], "texture": "#side", "cullface": "east"},
"west": {"uv": [0, 8, 8, 16], "texture": "#side"},
"down": {"uv": [8, 8, 16, 16], "texture": "#bottom", "cullface": "down"}
}
},
@@ -50,7 +60,7 @@
"name": "outer_stairs",
"origin": [8, 8, 8],
"color": 0,
"children": [0, 1, 2, 3]
"children": [0, 1, 2, 3, 4]
}
]
}

View File

@@ -33,14 +33,17 @@
"compat.IndiumNonTerrainBlockRenderContextMixin",
"compat.IndiumTerrainRenderContextMixin",
"compat.SodiumBlockOcclusionCacheMixin",
"compat.SodiumFluidRendererMixin",
"model.WeightedBakedModelAccessor",
"particles.AccessorParticle",
"particles.AccessorSpriteBillboardParticle",
"particles.MixinBlockDustParticle",
"render.AbstractBlockRenderContextMixin",
"render.BlockMixin",
"render.BlockModelRendererMixin",
"render.BlockRenderContextMixin",
"render.BlockRenderInfoMixin",
"render.FluidRendererMixin",
"render.MultipartBakedModelMixin",
"render.TerrainRenderContextMixin",
"render.WorldRendererMixin",