0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

minecraft で creeper の 破壊活動だけを止めるまで

Posted at

実を言うとプログラミング技術と関係があるかなって疑問に思って、
投稿をためらっていたのですが、
他に相応しい場所も持っていないし、
遠回りに技術として役に立つのなら良いかなと思い、
投稿するに至りました。

0. 理由

mobGriefing falseで爆発してもブロックを破壊しないようにはできるのですが、
村人が農業しなくなってしまって困ったので、
手軽に破壊活動だけを止めれないかと考えて、
この方法に至った次第。

1. 環境

  • minecraft 1.15.2

2. 方法

すべてのmobの持つ、entityデータを編集する。
今回は爆発半径のExplosionRadiusを0にした。

3. コマンド

/execute as @e[type=minecraft:creeper] run data merge entity @s[type=minecraft:creeper] {ExplosionRadius:0}

4. 困ったこと

ログがうるさい

/gamerule commandBlockOutput false

で黙らせた。

X. あとがき

ガストの破壊活動も止める。
本当は爆発によるブロックへのダメージをなくせば良いんだけど、
そんなピンポイントな方法知らないので、
今度また考えます。
pluginとかdatapackとか、
今は色々できるみたいだし。

では。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?