mirror of
https://github.com/Xiao-MoMi/craft-engine.git
synced 2025-12-26 02:19:23 +00:00
完善含水方块
This commit is contained in:
@@ -74,8 +74,8 @@ public abstract class AbstractCustomBlock implements CustomBlock {
|
||||
for (ImmutableBlockState state : this.getPossibleStates(tag)) {
|
||||
state.setBehavior(this.behavior);
|
||||
state.setSettings(blockStateVariant.settings());
|
||||
state.setVanillaBlockState(BlockRegistryMirror.stateByRegistryId(vanillaStateRegistryId));
|
||||
state.setCustomBlockState(BlockRegistryMirror.stateByRegistryId(blockStateVariant.internalRegistryId()));
|
||||
state.setVanillaBlockState((BlockStateWrapper.VanillaBlockState) BlockRegistryMirror.stateByRegistryId(vanillaStateRegistryId));
|
||||
state.setCustomBlockState((BlockStateWrapper.CustomBlockState) BlockRegistryMirror.stateByRegistryId(blockStateVariant.internalRegistryId()));
|
||||
}
|
||||
}
|
||||
// double check if there's any invalid state
|
||||
|
||||
@@ -19,9 +19,8 @@ import java.util.List;
|
||||
|
||||
public final class ImmutableBlockState extends BlockStateHolder {
|
||||
private CompoundTag tag;
|
||||
private BlockStateWrapper customBlockState;
|
||||
private BlockStateWrapper vanillaBlockState;
|
||||
|
||||
private BlockStateWrapper.CustomBlockState customBlockState;
|
||||
private BlockStateWrapper.VanillaBlockState vanillaBlockState;
|
||||
private BlockBehavior behavior;
|
||||
private Integer hashCode;
|
||||
private BlockSettings settings;
|
||||
@@ -76,11 +75,11 @@ public final class ImmutableBlockState extends BlockStateHolder {
|
||||
return this.vanillaBlockState;
|
||||
}
|
||||
|
||||
public void setCustomBlockState(@NotNull BlockStateWrapper customBlockState) {
|
||||
public void setCustomBlockState(@NotNull BlockStateWrapper.CustomBlockState customBlockState) {
|
||||
this.customBlockState = customBlockState;
|
||||
}
|
||||
|
||||
public void setVanillaBlockState(@NotNull BlockStateWrapper vanillaBlockState) {
|
||||
public void setVanillaBlockState(@NotNull BlockStateWrapper.VanillaBlockState vanillaBlockState) {
|
||||
this.vanillaBlockState = vanillaBlockState;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user