We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e0d4fcf commit fdb6ca5Copy full SHA for fdb6ca5
src/legacy/api/EventAPI.cpp
@@ -256,6 +256,27 @@ void EnableEventListener(int eventId) {
256
case EVENT_TYPES::onPlaceBlock:
257
bus.emplaceListener<PlayerPlacingBlockEvent>([](PlayerPlacingBlockEvent& ev) {
258
IF_LISTENED(EVENT_TYPES::onPlaceBlock) {
259
+ BlockPos truePos = ev.pos();
260
+ switch (ev.face()) {
261
+ case 0:
262
+ --truePos.y;
263
+ break;
264
+ case 1:
265
+ ++truePos.y;
266
267
+ case 2:
268
+ --truePos.z;
269
270
+ case 3:
271
+ ++truePos.z;
272
273
+ case 4:
274
+ --truePos.x;
275
276
+ case 5:
277
+ ++truePos.x;
278
279
+ }
280
CallEvent(
281
EVENT_TYPES::onPlaceBlock,
282
PlayerClass::newPlayer(&ev.self()),
0 commit comments