修复幸运补给箱的引用问题
This commit is contained in:
parent
f1993adedf
commit
4bc0dcc469
2 changed files with 6 additions and 6 deletions
|
@ -1,6 +1,6 @@
|
||||||
package com.atsuishio.superbwarfare.block.entity;
|
package com.atsuishio.superbwarfare.block.entity;
|
||||||
|
|
||||||
import com.atsuishio.superbwarfare.block.ContainerBlock;
|
import com.atsuishio.superbwarfare.block.LuckyContainerBlock;
|
||||||
import com.atsuishio.superbwarfare.init.ModBlockEntities;
|
import com.atsuishio.superbwarfare.init.ModBlockEntities;
|
||||||
import com.atsuishio.superbwarfare.tools.ParticleTool;
|
import com.atsuishio.superbwarfare.tools.ParticleTool;
|
||||||
import net.minecraft.core.BlockPos;
|
import net.minecraft.core.BlockPos;
|
||||||
|
@ -32,11 +32,11 @@ public class LuckyContainerBlockEntity extends BlockEntity implements GeoBlockEn
|
||||||
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this);
|
||||||
|
|
||||||
public LuckyContainerBlockEntity(BlockPos pos, BlockState state) {
|
public LuckyContainerBlockEntity(BlockPos pos, BlockState state) {
|
||||||
super(ModBlockEntities.CONTAINER.get(), pos, state);
|
super(ModBlockEntities.LUCKY_CONTAINER.get(), pos, state);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void serverTick(Level pLevel, BlockPos pPos, BlockState pState, LuckyContainerBlockEntity blockEntity) {
|
public static void serverTick(Level pLevel, BlockPos pPos, BlockState pState, LuckyContainerBlockEntity blockEntity) {
|
||||||
if (!pState.getValue(ContainerBlock.OPENED)) {
|
if (!pState.getValue(LuckyContainerBlock.OPENED)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,14 +49,14 @@ public class LuckyContainerBlockEntity extends BlockEntity implements GeoBlockEn
|
||||||
pLevel.playSound(null, pPos, SoundEvents.GENERIC_EXPLODE.value(), SoundSource.BLOCKS, 4.0F, (1.0F + (pLevel.random.nextFloat() - pLevel.random.nextFloat()) * 0.2F) * 0.7F);
|
pLevel.playSound(null, pPos, SoundEvents.GENERIC_EXPLODE.value(), SoundSource.BLOCKS, 4.0F, (1.0F + (pLevel.random.nextFloat() - pLevel.random.nextFloat()) * 0.2F) * 0.7F);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
var direction = pState.getValue(ContainerBlock.FACING);
|
var direction = pState.getValue(LuckyContainerBlock.FACING);
|
||||||
|
|
||||||
pLevel.setBlockAndUpdate(pPos, Blocks.AIR.defaultBlockState());
|
pLevel.setBlockAndUpdate(pPos, Blocks.AIR.defaultBlockState());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private PlayState predicate(AnimationState<LuckyContainerBlockEntity> event) {
|
private PlayState predicate(AnimationState<LuckyContainerBlockEntity> event) {
|
||||||
if (this.getBlockState().getValue(ContainerBlock.OPENED)) {
|
if (this.getBlockState().getValue(LuckyContainerBlock.OPENED)) {
|
||||||
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.container.open"));
|
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.container.open"));
|
||||||
}
|
}
|
||||||
return PlayState.STOP;
|
return PlayState.STOP;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
"minecraft:geometry": [
|
"minecraft:geometry": [
|
||||||
{
|
{
|
||||||
"description": {
|
"description": {
|
||||||
"identifier": "geometry.unknown",
|
"identifier": "geometry.container",
|
||||||
"texture_width": 128,
|
"texture_width": 128,
|
||||||
"texture_height": 128,
|
"texture_height": 128,
|
||||||
"visible_bounds_width": 5,
|
"visible_bounds_width": 5,
|
||||||
|
|
Loading…
Add table
Reference in a new issue