-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix custom campfires cooking function breaking when re-entering a world.
- Loading branch information
1 parent
75b654b
commit 5b9a9ef
Showing
2 changed files
with
8 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 2 additions & 12 deletions
14
.../src/main/java/it/crystalnest/soul_fire_d/api/block/entity/CustomCampfireBlockEntity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,20 @@ | ||
package it.crystalnest.soul_fire_d.api.block.entity; | ||
|
||
import it.crystalnest.soul_fire_d.api.FireManager; | ||
import it.crystalnest.soul_fire_d.api.type.FireTyped; | ||
import net.minecraft.core.BlockPos; | ||
import net.minecraft.resources.ResourceLocation; | ||
import net.minecraft.world.level.block.entity.BlockEntityType; | ||
import net.minecraft.world.level.block.entity.CampfireBlockEntity; | ||
import net.minecraft.world.level.block.state.BlockState; | ||
import org.jetbrains.annotations.NotNull; | ||
|
||
public class CustomCampfireBlockEntity extends CampfireBlockEntity implements FireTyped { | ||
private final ResourceLocation fireType; | ||
|
||
public CustomCampfireBlockEntity(ResourceLocation fireType, BlockPos pos, BlockState state) { | ||
public class CustomCampfireBlockEntity extends CampfireBlockEntity { | ||
public CustomCampfireBlockEntity(BlockPos pos, BlockState state) { | ||
super(pos, state); | ||
this.fireType = fireType; | ||
} | ||
|
||
@NotNull | ||
@Override | ||
public BlockEntityType<?> getType() { | ||
return FireManager.CUSTOM_CAMPFIRE_ENTITY_TYPE.get(); | ||
} | ||
|
||
@Override | ||
public ResourceLocation getFireType() { | ||
return fireType; | ||
} | ||
} |