Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

human action space + enabled GUI #449

Merged
merged 60 commits into from
Feb 4, 2021
Merged
Changes from 1 commit
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
d16da17
human inputs envs - wip. Made FakeKeyboard work, need to modify launcher
pzhokhov Nov 13, 2020
b9c1540
enable modding the lwjgl
pzhokhov Nov 13, 2020
e8c5511
.
pzhokhov Nov 16, 2020
2ab9143
fixed rendering the gui for python
pzhokhov Nov 16, 2020
ba75232
add use button == right click, hotbar keys
pzhokhov Nov 17, 2020
18374b9
equip weapon task
pzhokhov Nov 18, 2020
52b48f3
equip item env
pzhokhov Nov 18, 2020
a60400f
equip weapon length is now 10 seconds
pzhokhov Nov 18, 2020
2017caa
render in java
pzhokhov Nov 18, 2020
2ea9f9e
episode length 1200
pzhokhov Nov 19, 2020
a64c982
.
pzhokhov Nov 19, 2020
0178a88
remove warning about gui open
pzhokhov Nov 19, 2020
4155dbc
make hotbar configurable in equip env
pzhokhov Nov 19, 2020
89a8d45
wip
pzhokhov Nov 30, 2020
4742c29
got viewer to work, checked causality of inventory and hotbar buttons…
pzhokhov Dec 10, 2020
e0691eb
data rendering pipeline fixes an updates
pzhokhov Dec 11, 2020
e460d56
Merge branch 'peterz/human_action_space' of github.com:minerllabs/min…
pzhokhov Dec 11, 2020
5e1ae4e
fixes
pzhokhov Dec 12, 2020
6b1a072
Merge branch 'peterz/human_action_space' of github.com:minerllabs/min…
pzhokhov Dec 12, 2020
faa60e8
.
pzhokhov Dec 12, 2020
dd2a93f
update anvil jar
pzhokhov Dec 12, 2020
dff4972
.
pzhokhov Dec 12, 2020
66f4be5
Merge branch 'peterz/human_action_space' of github.com:minerllabs/min…
pzhokhov Dec 12, 2020
2f4cea5
.
pzhokhov Dec 12, 2020
58e8737
update render jar
pzhokhov Dec 12, 2020
f7b2b12
re-rendering pipeline
pzhokhov Dec 12, 2020
dc4d459
.
pzhokhov Dec 15, 2020
0507b31
pull latest master, resolve conflicts
pzhokhov Dec 15, 2020
fe63cce
update render jar, fake mouse
pzhokhov Jan 4, 2021
dfd03da
Merge branch 'dev' of github.com:minerllabs/minerl into peterz/human_…
pzhokhov Feb 1, 2021
cf5de27
remove debug port in java startup command
pzhokhov Feb 1, 2021
9b3013c
Merge branch 'dev' of github.com:minerllabs/minerl into peterz/human_…
pzhokhov Feb 1, 2021
06800ac
cleanups
pzhokhov Feb 1, 2021
2971892
.
pzhokhov Feb 1, 2021
ccc3abd
.
pzhokhov Feb 1, 2021
fb4f36b
.
pzhokhov Feb 1, 2021
e6698ee
.
pzhokhov Feb 1, 2021
2971d1b
grab video after rendering gui (or, rather, restore that logic)
pzhokhov Feb 1, 2021
551b59f
cleanups
pzhokhov Feb 2, 2021
9632e39
.
pzhokhov Feb 2, 2021
20c04d9
.
pzhokhov Feb 2, 2021
a6dc3a3
.
pzhokhov Feb 2, 2021
4c43ae6
propagate LowLevelInputs flag from python
pzhokhov Feb 2, 2021
6214ec8
use FakeMouse version from the recorder to enable drag-splitting
pzhokhov Feb 2, 2021
dfd3f42
reset changes in data/
pzhokhov Feb 2, 2021
2b32e48
cleanups
pzhokhov Feb 2, 2021
c7a765c
more cleanups
pzhokhov Feb 2, 2021
fc51e0b
more cleanups
pzhokhov Feb 2, 2021
052c322
.
pzhokhov Feb 2, 2021
a26f349
.
pzhokhov Feb 2, 2021
091f4d5
pep8
pzhokhov Feb 2, 2021
ef92e40
more pep8
pzhokhov Feb 2, 2021
29dd741
do not use gcs
pzhokhov Feb 2, 2021
4b8ad78
.
pzhokhov Feb 2, 2021
39cf9e9
merge dev
pzhokhov Feb 2, 2021
ece6b95
cleanups, trying to fix build
pzhokhov Feb 2, 2021
f108e3b
remove logic that denies block usage
pzhokhov Feb 3, 2021
91a9252
disable cursor
pzhokhov Feb 3, 2021
372f907
restore logic disabling right click
pzhokhov Feb 3, 2021
c82dafc
PR comments
pzhokhov Feb 4, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -208,43 +208,6 @@ public void onPressed()
this.keyManager = new KeyManager(settings, extraKeys);
}

/**
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How will we prevent locking out non-gui agents from moving?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh you make a good point, let me restore this bit of code. Deleted it accidentally with the debug function ^_^

* Event listener that prevents agents from opening gui windows by canceling the 'USE' action of a block
* deny (most) blocks that open a gui when {@link net.minecraft.block.Block#onBlockActivated} is called
* @param event the captured event
*/
@SideOnly(Side.CLIENT)
@SubscribeEvent(priority = EventPriority.HIGH)
public void onRightClickEvent(PlayerInteractEvent.RightClickBlock event){
if(this.stateMachine.getStableState() == ClientState.RUNNING){
Logger logger = Logger.getLogger("MalmoModClient.onRightClickEvent");
Minecraft mc = Minecraft.getMinecraft();
logger.log(Level.INFO, "Saw hit on " + mc.objectMouseOver.typeOfHit.toString());
if (mc.objectMouseOver.typeOfHit.equals(RayTraceResult.Type.BLOCK)) {
BlockPos blockpos = mc.objectMouseOver.getBlockPos();
IBlockState blockState = mc.world.getBlockState(blockpos);
if ((!isLowLevelInput()) && (blockState.getBlock() instanceof BlockContainer
|| blockState.getBlock() instanceof BlockWorkbench)){
event.setUseBlock(Event.Result.DENY);
logger.log(Level.INFO, "Denied usage of " + blockState.getBlock().getRegistryName().toString());
}
else
logger.log(Level.INFO, "Allowed usage of " + blockState.getBlock().getRegistryName().toString());
} else if (mc.objectMouseOver.typeOfHit.equals(RayTraceResult.Type.ENTITY)) {
// This does not seem to be possible given the case logic in Minecraft.java @ line 1585
// Included here in the event objectMouseOver changes between these cases
if (mc.objectMouseOver.entityHit instanceof EntityVillager
|| mc.objectMouseOver.entityHit instanceof EntityMinecartContainer
|| mc.objectMouseOver.entityHit instanceof EntityMinecartCommandBlock) {
event.setUseBlock(Event.Result.DENY);
logger.log(Level.SEVERE, "Denied usage of " + mc.objectMouseOver.entityHit.getName() + "! This" +
"is not expected to happen!");
}

}
}
}

public boolean isLowLevelInput() {
return stateMachine.currentMissionBehaviour().lowLevelInputs;
}
Expand Down