Skip to content

Commit f19ec87

Browse files
authored
Document Vanilla Registries (#300)
* document forge registry wrapper * ensure gamerules only happens on overworld * add vanilla alias * furnace builder uses parent fields * adjust the text of the replace for crafting recipes * use methods instead of field access * document vanilla minecraft * remove custom vanilla with new minecraft * include method override info for vanilla
1 parent f99bbea commit f19ec87

File tree

15 files changed

+463
-286
lines changed

15 files changed

+463
-286
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
2+
import net.minecraftforge.event.entity.living.EnderTeleportEvent
3+
import net.minecraftforge.event.world.BlockEvent
4+
import net.minecraft.util.text.TextComponentString
5+
6+
7+
// Use eventManager.listen and listen to the desired event.
8+
/*eventManager.listen(BlockEvent.BreakEvent) {
9+
it.setCanceled(true) // Many events can be canceled.
10+
it.player.sendMessage(new TextComponentString("${it.getState().getBlock().getLocalizedName()} Block was prevent from being broken"))
11+
}*/
12+
13+
// The outer parentheses and inner curly braces are optional.
14+
eventManager.listen(EnderTeleportEvent) { event ->
15+
event.setAttackDamage 19.5f
16+
}

examples/postInit/custom/vanilla.groovy

Lines changed: 0 additions & 255 deletions
This file was deleted.

0 commit comments

Comments
 (0)