Seat-hopping into oblivion

- Fixed Seat interaction being too restrictive with max reach
- Contraption seats can no longer be mounted while riding something else
This commit is contained in:
simibubi 2021-04-16 01:13:46 +02:00
parent db3c296792
commit 6db763ed5d
9 changed files with 11 additions and 9 deletions

View file

@ -4,7 +4,7 @@ org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false org.gradle.daemon=false
# mod version info # mod version info
mod_version=0.3.1b mod_version=0.3.1c
minecraft_version=1.16.5 minecraft_version=1.16.5
forge_version=36.0.42 forge_version=36.0.42

View file

@ -1648,7 +1648,7 @@ d080b1b25e5bc8baf5aee68691b08c7f12ece3b0 assets/create/models/item/windmill_bear
866fbb0ce2878a73e0440d1caf6534c8bd7c384f assets/create/models/item/zinc_ingot.json 866fbb0ce2878a73e0440d1caf6534c8bd7c384f assets/create/models/item/zinc_ingot.json
a80fb25a0b655e76be986b5b49fcb0f03461a1ab assets/create/models/item/zinc_nugget.json a80fb25a0b655e76be986b5b49fcb0f03461a1ab assets/create/models/item/zinc_nugget.json
b1689617190c05ef34bd18456b0c7ae09bb3210f assets/create/models/item/zinc_ore.json b1689617190c05ef34bd18456b0c7ae09bb3210f assets/create/models/item/zinc_ore.json
56fa207f8d0d76e0435252d13dbe4b967c61aa89 assets/create/sounds.json f98bf9f870ac5ee5b31c12a20739773c5fee4949 assets/create/sounds.json
5d0cc4c0255dc241e61c173b31ddca70c88d08e4 data/create/advancements/aesthetics.json 5d0cc4c0255dc241e61c173b31ddca70c88d08e4 data/create/advancements/aesthetics.json
187921fa131b06721bfaf63f2623a28c141aae9a data/create/advancements/andesite_alloy.json 187921fa131b06721bfaf63f2623a28c141aae9a data/create/advancements/andesite_alloy.json
0ea2db7173b5be28b289ea7c9a6a0cf5805c60c7 data/create/advancements/andesite_casing.json 0ea2db7173b5be28b289ea7c9a6a0cf5805c60c7 data/create/advancements/andesite_casing.json

View file

@ -38,7 +38,7 @@
"mechanical_press_activation": { "mechanical_press_activation": {
"sounds": [ "sounds": [
{ {
"name": "minecraft:block.netherite_block.hit", "name": "minecraft:block.anvil.land",
"type": "event" "type": "event"
} }
], ],

View file

@ -51,8 +51,8 @@ public class AllSoundEvents {
.build(), .build(),
MECHANICAL_PRESS_ACTIVATION = create("mechanical_press_activation").subtitle("Mechanical Press clangs") MECHANICAL_PRESS_ACTIVATION = create("mechanical_press_activation").subtitle("Mechanical Press clangs")
.playExisting(SoundEvents.BLOCK_NETHERITE_BLOCK_HIT, .5f, 1.25f) .playExisting(SoundEvents.BLOCK_ANVIL_LAND, .125f, 1f)
.playExisting(SoundEvents.ENTITY_ITEM_BREAK, .15f, .75f) .playExisting(SoundEvents.ENTITY_ITEM_BREAK, .5f, 1f)
.category(SoundCategory.BLOCKS) .category(SoundCategory.BLOCKS)
.build(), .build(),

View file

@ -55,7 +55,7 @@ public class Create {
public static final String ID = "create"; public static final String ID = "create";
public static final String NAME = "Create"; public static final String NAME = "Create";
public static final String VERSION = "0.3.1b"; public static final String VERSION = "0.3.1c";
public static Logger logger = LogManager.getLogger(); public static Logger logger = LogManager.getLogger();
public static ItemGroup baseCreativeTab = new CreateItemGroup(); public static ItemGroup baseCreativeTab = new CreateItemGroup();

View file

@ -186,7 +186,7 @@ public class MechanicalPressTileEntity extends BasinOperatingTileEntity {
if (world.getBlockState(pos.down(2)).getSoundType() == SoundType.CLOTH) if (world.getBlockState(pos.down(2)).getSoundType() == SoundType.CLOTH)
AllSoundEvents.MECHANICAL_PRESS_ACTIVATION_ON_BELT.playOnServer(world, pos); AllSoundEvents.MECHANICAL_PRESS_ACTIVATION_ON_BELT.playOnServer(world, pos);
else else
AllSoundEvents.MECHANICAL_PRESS_ACTIVATION.playOnServer(world, pos); AllSoundEvents.MECHANICAL_PRESS_ACTIVATION.playOnServer(world, pos, .5f, .75f + (Math.abs(getSpeed()) / 1024f));
if (!world.isRemote) if (!world.isRemote)
sendData(); sendData();

View file

@ -63,6 +63,8 @@ public class ContraptionHandlerClient {
ClientPlayerEntity player = mc.player; ClientPlayerEntity player = mc.player;
if (player == null) if (player == null)
return; return;
if (player.isPassenger())
return;
if (mc.world == null) if (mc.world == null)
return; return;
if (!event.isUseItem()) if (!event.isUseItem())

View file

@ -54,7 +54,7 @@ public class ContraptionInteractionPacket extends SimplePacketBase {
if (!(entityByID instanceof AbstractContraptionEntity)) if (!(entityByID instanceof AbstractContraptionEntity))
return; return;
AbstractContraptionEntity contraptionEntity = (AbstractContraptionEntity) entityByID; AbstractContraptionEntity contraptionEntity = (AbstractContraptionEntity) entityByID;
double d = sender.getAttribute(ForgeMod.REACH_DISTANCE.get()).getValue(); double d = sender.getAttribute(ForgeMod.REACH_DISTANCE.get()).getValue() + 10;
if (!sender.canEntityBeSeen(entityByID)) if (!sender.canEntityBeSeen(entityByID))
d -= 3; d -= 3;
d *= d; d *= d;

View file

@ -15,7 +15,7 @@ Technology that empowers the player.'''
[[dependencies.create]] [[dependencies.create]]
modId="forge" modId="forge"
mandatory=true mandatory=true
versionRange="[34.0.0,)" versionRange="[35.1.16,)"
ordering="NONE" ordering="NONE"
side="BOTH" side="BOTH"