Skip to content

Commit

Permalink
mc.override now supports minecraft.block.Block
Browse files Browse the repository at this point in the history
  • Loading branch information
Red-exe-Engineer authored Sep 4, 2023
1 parent 141504d commit c4587f8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions mcpi_addons/minecraft.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,12 @@ def inventory(self):

def override(self, before, after):
"""Overrides a tile or item"""
if isinstance(before, Block):
before = before.id

if isinstance(after, Block):
after = after.id

self.conn.send(b"custom.override", before, after)

def resetOverrides(self):
Expand Down

0 comments on commit c4587f8

Please sign in to comment.