Natural spawning in Bedrock Edition shares only a few similarities to natural spawning in Java Edition. In Bedrock Edition, there are two main types of natural spawns: pack spawns and structure mob spawns. Structure mob spawns are mobs spawned as part of a structure, such as nether fortresses, witch huts, etc. Pack spawns account for all other types of natural spawns, including mobs that spawn individually (i.e. not in a pack of 2 or more). Both types of natural spawns follow the same rules for spawn conditions and the mob cap.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; ivy-richが提供する変数、一部省略 | |
;; この先頭に(#'counsel-switch-buffer A)を足したい | |
(defcustom ivy-rich-display-transformers-list | |
'(ivy-switch-buffer | |
(...) ; A | |
counsel-M-x | |
(...) | |
counsel-describe-function | |
(...) | |
counsel-describe-variable |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defvar test-var 1) | |
(symbol-value 'test-var) | |
;; => 1 | |
(defun f () test-var) | |
(symbol-function 'f) | |
;; => (lambda nil test-var) | |
(f) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(let* ((a (...)) | |
(a (if cond a (f a))) | |
(a (...))) | |
g a) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(let ((a (list 2 1))) | |
(sort a #'<) | |
a) | |
;; => (2) | |
(let ((a (list 1 2))) | |
(sort a #'<) | |
a) | |
;; => (1 2) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* | |
* A original problem is here. | |
* https://twitter.com/kokuyouwind/status/1141602930019061760 | |
*) | |
fun fizzBuzz n = | |
let | |
val div3 = n mod 3 = 0 | |
val div5 = n mod 5 = 0 | |
in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun stalinSort nil = nil | |
| stalinSort (h::t) = | |
let | |
fun sort _ nil = nil | |
| sort x (h::t) = | |
if x < h then h :: sort h t | |
else sort x t | |
in | |
h :: sort h t | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; (setq lexical-binding nil) | |
;;; 任意のregionを使う関数を、選択regionがないときは現在行を与えるようにする | |
(defun call-with-region-or-line (func) | |
"" | |
(lambda () (interactive) | |
(if (region-active-p) (call-interactively func) | |
(let ((begin (line-beginning-position)) | |
(end (1+ (line-end-position)))) | |
(funcall func begin end))))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; 結局採用したやつ | |
(defun call-with-region-or-line (func-symbol) | |
"Call FUNC-SYMBOL with marked region or current line. | |
If the region is active, beggining and end of region is used for the function | |
arguments, othewise current line is used." | |
(if (region-active-p) | |
(funcall func-symbol (region-beginning) (region-end)) | |
(let* ((begin (line-beginning-position)) | |
(end (1+ (line-end-position)))) |