-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- 修复 Sync 模组与 Techguns 的物品栏复制问题。 - 修复 Sync 模组骑乘状态下死亡导致的奇怪问题。 - 使 CFM 的可旋转家具可以被扳手正常旋转。
- Loading branch information
1 parent
8d07fa9
commit 79aa897
Showing
18 changed files
with
330 additions
and
17 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
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
29 changes: 29 additions & 0 deletions
29
src/main/java/github/kasuminova/stellarcore/mixin/cfm/MixinTileEntityCookieJar.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,29 @@ | ||
package github.kasuminova.stellarcore.mixin.cfm; | ||
|
||
import com.mrcrayfish.furniture.tileentity.TileEntityCookieJar; | ||
import github.kasuminova.stellarcore.common.config.StellarCoreConfig; | ||
import net.minecraft.block.state.IBlockState; | ||
import net.minecraft.tileentity.TileEntity; | ||
import net.minecraft.util.math.BlockPos; | ||
import net.minecraft.world.World; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Unique; | ||
|
||
import javax.annotation.Nonnull; | ||
|
||
@Mixin(TileEntityCookieJar.class) | ||
public class MixinTileEntityCookieJar extends TileEntity { | ||
|
||
@Unique | ||
@Override | ||
public boolean shouldRefresh(@Nonnull final World world, | ||
@Nonnull final BlockPos pos, | ||
@Nonnull final IBlockState oldState, | ||
@Nonnull final IBlockState newSate) { | ||
if (!StellarCoreConfig.BUG_FIXES.mrCrayfishFurniture.rotatableFurniture) { | ||
return super.shouldRefresh(world, pos, oldState, newSate); | ||
} | ||
return oldState.getBlock() != newSate.getBlock(); | ||
} | ||
|
||
} |
30 changes: 30 additions & 0 deletions
30
src/main/java/github/kasuminova/stellarcore/mixin/cfm/MixinTileEntityDeskCabinet.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,30 @@ | ||
package github.kasuminova.stellarcore.mixin.cfm; | ||
|
||
import com.mrcrayfish.furniture.tileentity.TileEntityDeskCabinet; | ||
import github.kasuminova.stellarcore.common.config.StellarCoreConfig; | ||
import net.minecraft.block.state.IBlockState; | ||
import net.minecraft.tileentity.TileEntity; | ||
import net.minecraft.util.math.BlockPos; | ||
import net.minecraft.world.World; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Unique; | ||
|
||
import javax.annotation.Nonnull; | ||
|
||
@Mixin(TileEntityDeskCabinet.class) | ||
public class MixinTileEntityDeskCabinet extends TileEntity { | ||
|
||
@Unique | ||
@Override | ||
public boolean shouldRefresh(@Nonnull final World world, | ||
@Nonnull final BlockPos pos, | ||
@Nonnull final IBlockState oldState, | ||
@Nonnull final IBlockState newSate) | ||
{ | ||
if (!StellarCoreConfig.BUG_FIXES.mrCrayfishFurniture.rotatableFurniture) { | ||
return super.shouldRefresh(world, pos, oldState, newSate); | ||
} | ||
return oldState.getBlock() != newSate.getBlock(); | ||
} | ||
|
||
} |
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
30 changes: 30 additions & 0 deletions
30
src/main/java/github/kasuminova/stellarcore/mixin/cfm/MixinTileEntityKitchenCounter.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,30 @@ | ||
package github.kasuminova.stellarcore.mixin.cfm; | ||
|
||
import com.mrcrayfish.furniture.tileentity.TileEntityKitchenCounter; | ||
import com.mrcrayfish.furniture.tileentity.TileEntityKitchenCounterDrawer; | ||
import github.kasuminova.stellarcore.common.config.StellarCoreConfig; | ||
import net.minecraft.block.state.IBlockState; | ||
import net.minecraft.tileentity.TileEntity; | ||
import net.minecraft.util.math.BlockPos; | ||
import net.minecraft.world.World; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Unique; | ||
|
||
import javax.annotation.Nonnull; | ||
|
||
@Mixin(TileEntityKitchenCounter.class) | ||
public class MixinTileEntityKitchenCounter extends TileEntity { | ||
|
||
@Unique | ||
@Override | ||
public boolean shouldRefresh(@Nonnull final World world, | ||
@Nonnull final BlockPos pos, | ||
@Nonnull final IBlockState oldState, | ||
@Nonnull final IBlockState newSate) { | ||
if (!StellarCoreConfig.BUG_FIXES.mrCrayfishFurniture.rotatableFurniture) { | ||
return super.shouldRefresh(world, pos, oldState, newSate); | ||
} | ||
return oldState.getBlock() != newSate.getBlock(); | ||
} | ||
|
||
} |
30 changes: 30 additions & 0 deletions
30
...ain/java/github/kasuminova/stellarcore/mixin/cfm/MixinTileEntityKitchenCounterDrawer.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,30 @@ | ||
package github.kasuminova.stellarcore.mixin.cfm; | ||
|
||
import com.mrcrayfish.furniture.tileentity.TileEntityCookieJar; | ||
import com.mrcrayfish.furniture.tileentity.TileEntityKitchenCounterDrawer; | ||
import github.kasuminova.stellarcore.common.config.StellarCoreConfig; | ||
import net.minecraft.block.state.IBlockState; | ||
import net.minecraft.tileentity.TileEntity; | ||
import net.minecraft.util.math.BlockPos; | ||
import net.minecraft.world.World; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Unique; | ||
|
||
import javax.annotation.Nonnull; | ||
|
||
@Mixin(TileEntityKitchenCounterDrawer.class) | ||
public class MixinTileEntityKitchenCounterDrawer extends TileEntity { | ||
|
||
@Unique | ||
@Override | ||
public boolean shouldRefresh(@Nonnull final World world, | ||
@Nonnull final BlockPos pos, | ||
@Nonnull final IBlockState oldState, | ||
@Nonnull final IBlockState newSate) { | ||
if (!StellarCoreConfig.BUG_FIXES.mrCrayfishFurniture.rotatableFurniture) { | ||
return super.shouldRefresh(world, pos, oldState, newSate); | ||
} | ||
return oldState.getBlock() != newSate.getBlock(); | ||
} | ||
|
||
} |
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
29 changes: 29 additions & 0 deletions
29
src/main/java/github/kasuminova/stellarcore/mixin/cfm/MixinTileEntityTVStand.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,29 @@ | ||
package github.kasuminova.stellarcore.mixin.cfm; | ||
|
||
import com.mrcrayfish.furniture.tileentity.TileEntityTVStand; | ||
import github.kasuminova.stellarcore.common.config.StellarCoreConfig; | ||
import net.minecraft.block.state.IBlockState; | ||
import net.minecraft.tileentity.TileEntity; | ||
import net.minecraft.util.math.BlockPos; | ||
import net.minecraft.world.World; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Unique; | ||
|
||
import javax.annotation.Nonnull; | ||
|
||
@Mixin(TileEntityTVStand.class) | ||
public class MixinTileEntityTVStand extends TileEntity { | ||
|
||
@Unique | ||
@Override | ||
public boolean shouldRefresh(@Nonnull final World world, | ||
@Nonnull final BlockPos pos, | ||
@Nonnull final IBlockState oldState, | ||
@Nonnull final IBlockState newSate) { | ||
if (!StellarCoreConfig.BUG_FIXES.mrCrayfishFurniture.rotatableFurniture) { | ||
return super.shouldRefresh(world, pos, oldState, newSate); | ||
} | ||
return oldState.getBlock() != newSate.getBlock(); | ||
} | ||
|
||
} |
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
47 changes: 47 additions & 0 deletions
47
...main/java/github/kasuminova/stellarcore/mixin/enderioconduits/MixinTileConduitBundle.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,47 @@ | ||
package github.kasuminova.stellarcore.mixin.enderioconduits; | ||
|
||
import crazypants.enderio.base.TileEntityEio; | ||
import crazypants.enderio.base.conduit.IConduit; | ||
import crazypants.enderio.conduits.conduit.TileConduitBundle; | ||
import github.kasuminova.stellarcore.common.config.StellarCoreConfig; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Shadow; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Inject; | ||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; | ||
|
||
import java.util.Collection; | ||
|
||
@Mixin(TileConduitBundle.class) | ||
public abstract class MixinTileConduitBundle extends TileEntityEio { | ||
|
||
@Shadow public abstract Collection<? extends IConduit> getConduits(); | ||
|
||
@Shadow private boolean conduitsDirty; | ||
|
||
@Shadow protected abstract void doConduitsDirty(); | ||
|
||
@Shadow protected abstract void updateEntityClient(); | ||
|
||
@Inject(method = "doUpdate", at = @At("HEAD"), cancellable = true) | ||
private void injectDoUpdate(final CallbackInfo ci) { | ||
if (!StellarCoreConfig.PERFORMANCE.enderIOConduits.tileConduitBundle) { | ||
return; | ||
} | ||
|
||
for (final IConduit conduit : this.getConduits()) { | ||
conduit.updateEntity(this.world); | ||
} | ||
|
||
if (!this.world.isRemote && this.conduitsDirty) { | ||
this.doConduitsDirty(); | ||
} | ||
|
||
if (this.world.isRemote) { | ||
this.updateEntityClient(); | ||
} | ||
|
||
ci.cancel(); | ||
} | ||
|
||
} |
Oops, something went wrong.