generated from DragonsPlusMinecraft/CreateAddonTemplate
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c70d477
commit c688275
Showing
7 changed files
with
69 additions
and
2 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
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
## Create Central Kitchen 1.3.9.g | ||
|
||
# Update | ||
- Add support for Sticky Basket of Miners Delight | ||
|
||
# Bugfix | ||
- Fix incompatible with botarium |
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
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
21 changes: 21 additions & 0 deletions
21
...lus/dragons/createcentralkitchen/foundation/mixin/common/botarium/BotariumForgeMixin.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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package plus.dragons.createcentralkitchen.foundation.mixin.common.botarium; | ||
|
||
import earth.terrarium.botarium.forge.BotariumForge; | ||
import net.minecraft.world.level.block.entity.BlockEntity; | ||
import net.minecraftforge.event.AttachCapabilitiesEvent; | ||
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.CallbackInfo; | ||
import plus.dragons.createcentralkitchen.api.block.entity.DelegatingSmartTileEntity; | ||
|
||
@Mixin(value = BotariumForge.class, remap = false) | ||
public class BotariumForgeMixin { | ||
@Inject(method = "attachBlockCapabilities", at = @At("HEAD"), cancellable = true) | ||
private static void injected(AttachCapabilitiesEvent<BlockEntity> event, CallbackInfo ci) { | ||
Object var2 = event.getObject(); | ||
if(var2 instanceof DelegatingSmartTileEntity){ | ||
ci.cancel(); | ||
} | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
...atecentralkitchen/foundation/mixin/common/minersdelight/StickyBasketBlockEntityMixin.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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package plus.dragons.createcentralkitchen.foundation.mixin.common.minersdelight; | ||
|
||
import com.sammy.minersdelight.content.block.sticky_basket.StickyBasketBlockEntity; | ||
import com.simibubi.create.foundation.blockEntity.SmartBlockEntity; | ||
import net.minecraft.core.BlockPos; | ||
import net.minecraft.world.level.block.entity.BlockEntityType; | ||
import net.minecraft.world.level.block.entity.RandomizableContainerBlockEntity; | ||
import net.minecraft.world.level.block.state.BlockState; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Unique; | ||
import plus.dragons.createcentralkitchen.api.block.entity.SmartBlockEntityLike; | ||
import plus.dragons.createcentralkitchen.content.logistics.block.basket.SmartBasketBlockEntity; | ||
import vectorwing.farmersdelight.common.block.entity.Basket; | ||
import vectorwing.farmersdelight.common.block.entity.BasketBlockEntity; | ||
|
||
@Mixin(StickyBasketBlockEntity.class) | ||
public abstract class StickyBasketBlockEntityMixin extends RandomizableContainerBlockEntity implements Basket, SmartBlockEntityLike { | ||
|
||
@Unique | ||
private final SmartBlockEntity smartBlockEntity = new SmartBasketBlockEntity((BasketBlockEntity) (Object) this); | ||
|
||
private StickyBasketBlockEntityMixin(BlockEntityType<?> pType, BlockPos pPos, BlockState pBlockState) { | ||
super(pType, pPos, pBlockState); | ||
} | ||
|
||
@Override | ||
public SmartBlockEntity asSmartBlockEntity() { | ||
return smartBlockEntity; | ||
} | ||
|
||
} |
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