kill kinetic block trigger, clean up unused stuff

This commit is contained in:
grimmauld 2021-02-19 14:21:02 +01:00
parent 667c213506
commit 589572df6c
8 changed files with 55 additions and 87 deletions

View File

@ -337,7 +337,7 @@ e8b0a401c10d1ba67ed71ba31bd5f9bc28571b65 assets/create/blockstates/powered_toggl
d06cd9a1101b18d306a786320aab12018b1325d6 assets/create/blockstates/purple_sail.json
92957119abd5fbcca36a113b2a80255fd70fc303 assets/create/blockstates/purple_seat.json
61035f8afe75ff7bbd291da5d8690bcbebe679eb assets/create/blockstates/purple_valve_handle.json
4439fc83a8c7370ab44b211a3fd48abde20a4728 assets/create/blockstates/radial_chassis.json
8d7e653bfd9846e684a0d3725595714a19201017 assets/create/blockstates/radial_chassis.json
45877c4d90a7185c2f304edbd67379d800920439 assets/create/blockstates/red_sail.json
da1b08387af7afa0855ee8d040f620c01f20660a assets/create/blockstates/red_seat.json
722fc77bbf387af8a4016e42cbf9501d2b968881 assets/create/blockstates/red_valve_handle.json
@ -1586,7 +1586,7 @@ d080b1b25e5bc8baf5aee68691b08c7f12ece3b0 assets/create/models/item/windmill_bear
9f9455ccb5fc9e3cbfce73862b46078346a522a5 assets/create/models/item/zinc_nugget.json
b1689617190c05ef34bd18456b0c7ae09bb3210f assets/create/models/item/zinc_ore.json
e76041b7ae829fdd7dc0524f6ca4d2f89fca51bb assets/create/sounds.json
0f1b4b980afba9bf2caf583b88e261bba8b10313 data/create/advancements/aesthetics.json
5d0cc4c0255dc241e61c173b31ddca70c88d08e4 data/create/advancements/aesthetics.json
187921fa131b06721bfaf63f2623a28c141aae9a data/create/advancements/andesite_alloy.json
0ea2db7173b5be28b289ea7c9a6a0cf5805c60c7 data/create/advancements/andesite_casing.json
356f4855a2a6c65be3fb51d7d1aabf2ca6034d42 data/create/advancements/arm_blaze_burner.json
@ -1638,7 +1638,7 @@ a80eea863bfdc7777b8bade39a81655b2f99e02f data/create/advancements/item_drain.jso
218568a4e416c5fa559c55a5c92aa4e93f88b837 data/create/advancements/mechanical_drill.json
6dc84ad2f0512495fe3f01f99d3c547849351e33 data/create/advancements/mechanical_saw.json
3bc549c06dc6d9568f92e1abc9654c9b4c33f035 data/create/advancements/millstone.json
f41d548c21a8540428ea043451e5fbb641fc2e58 data/create/advancements/mixer.json
238ac410eb4de16a82ae05cc16fef80e55a4b61b data/create/advancements/mixer.json
325d4cef263ce301b143ee0498fb15afdb2c125b data/create/advancements/musical_arm.json
c9c4060ed207226b69fada2d61e01a97d7077eae data/create/advancements/nixie_tube.json
9329cb210a954c0de1dcf517e7dff1ece77c19c0 data/create/advancements/overstress_flywheel.json

View File

@ -29,8 +29,8 @@
},
{
"when": {
"axis": "x",
"sticky_south": "true"
"sticky_south": "true",
"axis": "x"
},
"apply": {
"model": "create:block/radial_chassis_side_x_sticky",
@ -39,8 +39,8 @@
},
{
"when": {
"axis": "y",
"sticky_south": "true"
"sticky_south": "true",
"axis": "y"
},
"apply": {
"model": "create:block/radial_chassis_side_y_sticky"
@ -48,8 +48,8 @@
},
{
"when": {
"axis": "z",
"sticky_south": "true"
"sticky_south": "true",
"axis": "z"
},
"apply": {
"model": "create:block/radial_chassis_side_x_sticky",
@ -59,8 +59,8 @@
},
{
"when": {
"axis": "x",
"sticky_south": "false"
"sticky_south": "false",
"axis": "x"
},
"apply": {
"model": "create:block/radial_chassis_side_x",
@ -69,8 +69,8 @@
},
{
"when": {
"axis": "y",
"sticky_south": "false"
"sticky_south": "false",
"axis": "y"
},
"apply": {
"model": "create:block/radial_chassis_side_y"
@ -78,8 +78,8 @@
},
{
"when": {
"axis": "z",
"sticky_south": "false"
"sticky_south": "false",
"axis": "z"
},
"apply": {
"model": "create:block/radial_chassis_side_x",
@ -89,8 +89,8 @@
},
{
"when": {
"axis": "x",
"sticky_west": "true"
"sticky_west": "true",
"axis": "x"
},
"apply": {
"model": "create:block/radial_chassis_side_x_sticky",
@ -99,8 +99,8 @@
},
{
"when": {
"axis": "y",
"sticky_west": "true"
"sticky_west": "true",
"axis": "y"
},
"apply": {
"model": "create:block/radial_chassis_side_y_sticky",
@ -109,8 +109,8 @@
},
{
"when": {
"axis": "z",
"sticky_west": "true"
"sticky_west": "true",
"axis": "z"
},
"apply": {
"model": "create:block/radial_chassis_side_z_sticky",
@ -119,8 +119,8 @@
},
{
"when": {
"axis": "x",
"sticky_west": "false"
"sticky_west": "false",
"axis": "x"
},
"apply": {
"model": "create:block/radial_chassis_side_x",
@ -129,8 +129,8 @@
},
{
"when": {
"axis": "y",
"sticky_west": "false"
"sticky_west": "false",
"axis": "y"
},
"apply": {
"model": "create:block/radial_chassis_side_y",
@ -139,8 +139,8 @@
},
{
"when": {
"axis": "z",
"sticky_west": "false"
"sticky_west": "false",
"axis": "z"
},
"apply": {
"model": "create:block/radial_chassis_side_z",
@ -149,8 +149,8 @@
},
{
"when": {
"axis": "x",
"sticky_north": "true"
"sticky_north": "true",
"axis": "x"
},
"apply": {
"model": "create:block/radial_chassis_side_x_sticky"
@ -158,8 +158,8 @@
},
{
"when": {
"axis": "y",
"sticky_north": "true"
"sticky_north": "true",
"axis": "y"
},
"apply": {
"model": "create:block/radial_chassis_side_y_sticky",
@ -168,8 +168,8 @@
},
{
"when": {
"axis": "z",
"sticky_north": "true"
"sticky_north": "true",
"axis": "z"
},
"apply": {
"model": "create:block/radial_chassis_side_x_sticky",
@ -178,8 +178,8 @@
},
{
"when": {
"axis": "x",
"sticky_north": "false"
"sticky_north": "false",
"axis": "x"
},
"apply": {
"model": "create:block/radial_chassis_side_x"
@ -187,8 +187,8 @@
},
{
"when": {
"axis": "y",
"sticky_north": "false"
"sticky_north": "false",
"axis": "y"
},
"apply": {
"model": "create:block/radial_chassis_side_y",
@ -197,8 +197,8 @@
},
{
"when": {
"axis": "z",
"sticky_north": "false"
"sticky_north": "false",
"axis": "z"
},
"apply": {
"model": "create:block/radial_chassis_side_x",
@ -207,8 +207,8 @@
},
{
"when": {
"axis": "x",
"sticky_east": "true"
"sticky_east": "true",
"axis": "x"
},
"apply": {
"model": "create:block/radial_chassis_side_x_sticky",
@ -217,8 +217,8 @@
},
{
"when": {
"axis": "y",
"sticky_east": "true"
"sticky_east": "true",
"axis": "y"
},
"apply": {
"model": "create:block/radial_chassis_side_y_sticky",
@ -227,8 +227,8 @@
},
{
"when": {
"axis": "z",
"sticky_east": "true"
"sticky_east": "true",
"axis": "z"
},
"apply": {
"model": "create:block/radial_chassis_side_z_sticky"
@ -236,8 +236,8 @@
},
{
"when": {
"axis": "x",
"sticky_east": "false"
"sticky_east": "false",
"axis": "x"
},
"apply": {
"model": "create:block/radial_chassis_side_x",
@ -246,8 +246,8 @@
},
{
"when": {
"axis": "y",
"sticky_east": "false"
"sticky_east": "false",
"axis": "y"
},
"apply": {
"model": "create:block/radial_chassis_side_y",
@ -256,8 +256,8 @@
},
{
"when": {
"axis": "z",
"sticky_east": "false"
"sticky_east": "false",
"axis": "z"
},
"apply": {
"model": "create:block/radial_chassis_side_z"

View File

@ -28,8 +28,8 @@
"trigger": "create:bracket_apply",
"conditions": {
"accepted_entries": [
"create:cogwheel",
"create:large_cogwheel"
"create:large_cogwheel",
"create:cogwheel"
]
}
},

View File

@ -23,14 +23,6 @@
}
},
"1": {
"trigger": "create:kinetic_block",
"conditions": {
"accepted_entries": [
"create:mechanical_mixer"
]
}
},
"2": {
"trigger": "create:mixer"
}
},
@ -40,9 +32,6 @@
],
[
"1"
],
[
"2"
]
]
}

View File

@ -173,10 +173,6 @@ public abstract class KineticTileEntity extends SmartTileEntity
boolean directionSwap = !fromOrToZero && Math.signum(previousSpeed) != Math.signum(getSpeed());
if (fromOrToZero || directionSwap)
flickerTally = getFlickerScore() + 5;
if (fromOrToZero && previousSpeed == 0 && !world.isRemote)
AllTriggers.getPlayersInRange(world, pos, 4)
.forEach(p -> AllTriggers.KINETIC_BLOCK.trigger(p, getBlockState().getBlock()));
}
@Override

View File

@ -8,8 +8,6 @@ import java.util.Set;
import javax.annotation.Nullable;
import com.simibubi.create.AllFluids;
import com.simibubi.create.foundation.advancement.AllAdvancements;
import com.simibubi.create.foundation.advancement.AllTriggers;
import com.simibubi.create.foundation.fluid.FluidHelper;
import com.simibubi.create.foundation.tileEntity.SmartTileEntity;
@ -134,16 +132,7 @@ public class FluidDrainingBehaviour extends FluidManipulationBehaviour {
AllTriggers.triggerForNearbyPlayers(AllTriggers.HOSE_PULLEY, world, tileEntity.getPos(), 8);
if (infinite) {
Fluid stillFluid = FluidHelper.convertToStill(fluid);
AllTriggers.getPlayersInRange(world, tileEntity.getPos(), 8)
.forEach(p -> AllTriggers.INFINITE_FLUID.trigger(p, FluidHelper.convertToStill(stillFluid)));
/*
if (FluidHelper.isLava(fluid))
AllTriggers.triggerForNearbyPlayers(AllTriggers.INFINITE_LAVA, world, tileEntity.getPos(), 8);
if (FluidHelper.isWater(fluid))
AllTriggers.triggerForNearbyPlayers(AllTriggers.INFINITE_WATER, world, tileEntity.getPos(), 8);
if (fluid.isEquivalentTo(AllFluids.CHOCOLATE.get()))
AllTriggers.triggerForNearbyPlayers(AllTriggers.INFINITE_CHOCOLATE, world, tileEntity.getPos(), 8);*/
AllTriggers.triggerForNearbyPlayers(AllTriggers.INFINITE_FLUID.constructTriggerFor(FluidHelper.convertToStill(fluid)), world, tileEntity.getPos(), 8);
return true;
}

View File

@ -160,8 +160,7 @@ public class AllAdvancements implements IDataProvider {
Advancement mixer = advancement("mixer", AllBlocks.MECHANICAL_MIXER.get(), TaskType.MILESTONE)
.withCriterion("0", placeBlock(AllBlocks.MECHANICAL_MIXER.get()))
.withCriterion("1", isPowered(AllBlocks.MECHANICAL_MIXER.get()))
.withCriterion("2", AllTriggers.MIXER_MIX.instance())
.withCriterion("1", AllTriggers.MIXER_MIX.instance())
.withParent(basin)
.register(t, id + ":mixer");
@ -496,10 +495,6 @@ public class AllAdvancements implements IDataProvider {
return PlacedBlockTrigger.Instance.placedBlock(block);
}
public RegistryTrigger.Instance<Block> isPowered(Block block) {
return AllTriggers.KINETIC_BLOCK.forEntries(block);
}
public RegistryTrigger.Instance<Fluid> isInfinite(FlowingFluid fluid) {
return AllTriggers.INFINITE_FLUID.forEntries(fluid.getStillFluid());
}

View File

@ -17,7 +17,6 @@ public class AllTriggers {
private static final List<CriterionTriggerBase<?>> triggers = new LinkedList<>();
public static RegistryTrigger<Block> KINETIC_BLOCK = add(new RegistryTrigger<>("kinetic_block", Block.class));
public static RegistryTrigger<Fluid> INFINITE_FLUID = add(new RegistryTrigger<>("infinite_fluid", Fluid.class));
public static RegistryTrigger<Block> BRACKET_APPLY_TRIGGER = add(new RegistryTrigger<>("bracket_apply", Block.class));