Skip to content
This repository has been archived by the owner on Apr 2, 2021. It is now read-only.

Add World Events #4

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ build
.classpath
.settings/
/bin/

.idea/
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ plugins {
id 'de.undercouch.download' version '3.4.3'
}

def minecraft_version = '1.15.2'
def minecraft_version = '1.16.2-pre3'
def cacheFilesMinecraft = file('.gradle/minecraft')

archivesBaseName = 'weft'
Expand Down
67 changes: 67 additions & 0 deletions src/main/java/io/github/weavemc/weft/world/WorldEvents.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
package io.github.weavemc.weft.world;

/**
* https://github.com/FabricMC/yarn/pull/1652
*/
@SuppressWarnings("unused")
public class WorldEvents {
public static final int DISPENSER_DISPENSE_ONE = 1000;
public static final int DISPENSER_FAIL = 1001;
public static final int DISPENSER_LAUNCH = 1002;
public static final int ENDER_EYE_LAUNCH = 1003;
public static final int FIREWORK_SHOOT = 1004;
public static final int IRON_DOOR_OPEN = 1005;
public static final int WOODEN_DOOR_OPEN = 1006;
public static final int WOODEN_TRAPDOOR_OPEN = 1007;
public static final int FENCE_GATE_OPEN = 1008;
public static final int FIRE_EXTINGUISH = 1009;
public static final int PLAY_MUSIC_DISC_DATA = 1010;
public static final int IRON_DOOR_CLOSE = 1011;
public static final int WOODEN_DOOR_CLOSE = 1012;
public static final int WOODEN_TRAPDOOR_CLOSE = 1013;
public static final int FENCE_GATE_CLOSE = 1014;
public static final int GHAST_WARN = 1015;
public static final int GHAST_SHOOT = 1016;
public static final int ENDER_DRAGON_SHOOT = 1017;
public static final int BLAZE_SHOOT = 1018;
public static final int ZOMBIE_ATTACK_WOODEN_DOOR = 1019;
public static final int ZOMBIE_ATTACK_IRON_DOOR = 1020;
public static final int ZOMBIE_BREAK_WOODEN_DOOR = 1021;
public static final int WITHER_BREAK_BLOCK = 1022;
public static final int WITHER_SHOOT = 1024;
public static final int BAT_TAKEOFF = 1025;
public static final int DISPENSER_DISPENSE_TWO = 1026;
public static final int ZOMBIE_INFECT = 1027;
public static final int ZOMBIE_VILLAGER_CONVERTED = 1028;
public static final int ANVIL_DESTROY = 1029;
public static final int ANVIL_USE = 1030;
public static final int ANVIL_LAND = 1031;
public static final int PORTAL_TRAVEL = 1032;
public static final int CHORUS_FLOWER_GROW = 1033;
public static final int CHORUS_FLOWER_DEATH = 1034;
public static final int BREWING_STAND_BREW = 1035;
public static final int IRON_TRAPDOOR_CLOSE = 1036;
public static final int IRON_TRAPDOOR_OPEN = 1037;
public static final int PHANTOM_BITE = 1039;
public static final int ZOMBIE_TO_DROWNED = 1040;
public static final int HUSK_TO_ZOMBIE = 1041;
public static final int GRINDSTONE_USE = 1042;
public static final int BOOK_PAGE_TURN = 1043;
public static final int SMITHING_TABLE_USE = 1044;
public static final int DRAGON_GROWL = 3001;
public static final int COMPOSTER_FILL_ACTIONS = 1500;
public static final int LAVA_EXTINGUISH_AND_SMOKE_PARTICLES = 1501;
public static final int REDSTONE_TORCH_BURNOUT_AND_SMOKE_PARTICLES = 1502;
public static final int END_PORTAL_FRAME_FILL_AND_SMOKE_PARTICLES = 1503;
public static final int BLOCK_BREAK_SOUND_AND_PARTICLES = 2001;
public static final int SPLASH_POTION_BREAK_ONE = 2002;
public static final int SPLASH_POTION_BREAK_TWO = 2007;
public static final int ENDER_EYE_FALL = 2003;
public static final int ENDER_EYE_BREAK = 2004;
public static final int DRAGON_FIREBALL_BREAK = 2006;
public static final int END_GATEWAY_SPAWN = 3000;
public static final int SMOKE_PARTICLES = 2000;
public static final int BONEMEAL_PARTICLES = 2005;
public static final int EXPLOSION = 2008;
public static final int CLOUD = 2009;
}
73 changes: 73 additions & 0 deletions unpick-definitions/world_events.unpick
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
v2

constant world_events io/github/weavemc/weft/world/WorldEvents DISPENSER_DISPENSE_ONE
constant world_events io/github/weavemc/weft/world/WorldEvents DISPENSER_FAIL
constant world_events io/github/weavemc/weft/world/WorldEvents DISPENSER_LAUNCH
constant world_events io/github/weavemc/weft/world/WorldEvents ENDER_EYE_LAUNCH
constant world_events io/github/weavemc/weft/world/WorldEvents FIREWORK_SHOOT
constant world_events io/github/weavemc/weft/world/WorldEvents IRON_DOOR_OPEN
constant world_events io/github/weavemc/weft/world/WorldEvents WOODEN_DOOR_OPEN
constant world_events io/github/weavemc/weft/world/WorldEvents WOODEN_TRAPDOOR_OPEN
constant world_events io/github/weavemc/weft/world/WorldEvents FENCE_GATE_OPEN
constant world_events io/github/weavemc/weft/world/WorldEvents FIRE_EXTINGUISH
constant world_events io/github/weavemc/weft/world/WorldEvents PLAY_MUSIC_DISC_DATA
constant world_events io/github/weavemc/weft/world/WorldEvents IRON_DOOR_CLOSE
constant world_events io/github/weavemc/weft/world/WorldEvents WOODEN_DOOR_CLOSE
constant world_events io/github/weavemc/weft/world/WorldEvents WOODEN_TRAPDOOR_CLOSE
constant world_events io/github/weavemc/weft/world/WorldEvents FENCE_GATE_CLOSE
constant world_events io/github/weavemc/weft/world/WorldEvents GHAST_WARN
constant world_events io/github/weavemc/weft/world/WorldEvents GHAST_SHOOT
constant world_events io/github/weavemc/weft/world/WorldEvents ENDER_DRAGON_SHOOT
constant world_events io/github/weavemc/weft/world/WorldEvents BLAZE_SHOOT
constant world_events io/github/weavemc/weft/world/WorldEvents ZOMBIE_ATTACK_WOODEN_DOOR
constant world_events io/github/weavemc/weft/world/WorldEvents ZOMBIE_ATTACK_IRON_DOOR
constant world_events io/github/weavemc/weft/world/WorldEvents ZOMBIE_BREAK_WOODEN_DOOR
constant world_events io/github/weavemc/weft/world/WorldEvents WITHER_BREAK_BLOCK
constant world_events io/github/weavemc/weft/world/WorldEvents WITHER_SHOOT
constant world_events io/github/weavemc/weft/world/WorldEvents BAT_TAKEOFF
constant world_events io/github/weavemc/weft/world/WorldEvents DISPENSER_DISPENSE_TWO
constant world_events io/github/weavemc/weft/world/WorldEvents ZOMBIE_INFECT
constant world_events io/github/weavemc/weft/world/WorldEvents ZOMBIE_VILLAGER_CONVERTED
constant world_events io/github/weavemc/weft/world/WorldEvents ANVIL_DESTROY
constant world_events io/github/weavemc/weft/world/WorldEvents ANVIL_USE
constant world_events io/github/weavemc/weft/world/WorldEvents ANVIL_LAND
constant world_events io/github/weavemc/weft/world/WorldEvents PORTAL_TRAVEL
constant world_events io/github/weavemc/weft/world/WorldEvents CHORUS_FLOWER_GROW
constant world_events io/github/weavemc/weft/world/WorldEvents CHORUS_FLOWER_DEATH
constant world_events io/github/weavemc/weft/world/WorldEvents BREWING_STAND_BREW
constant world_events io/github/weavemc/weft/world/WorldEvents IRON_TRAPDOOR_CLOSE
constant world_events io/github/weavemc/weft/world/WorldEvents IRON_TRAPDOOR_OPEN
constant world_events io/github/weavemc/weft/world/WorldEvents PHANTOM_BITE
constant world_events io/github/weavemc/weft/world/WorldEvents ZOMBIE_TO_DROWNED
constant world_events io/github/weavemc/weft/world/WorldEvents HUSK_TO_ZOMBIE
constant world_events io/github/weavemc/weft/world/WorldEvents GRINDSTONE_USE
constant world_events io/github/weavemc/weft/world/WorldEvents BOOK_PAGE_TURN
constant world_events io/github/weavemc/weft/world/WorldEvents SMITHING_TABLE_USE
constant world_events io/github/weavemc/weft/world/WorldEvents DRAGON_GROWL
constant world_events io/github/weavemc/weft/world/WorldEvents COMPOSTER_FILL_ACTIONS
constant world_events io/github/weavemc/weft/world/WorldEvents LAVA_EXTINGUISH_AND_SMOKE_PARTICLES
constant world_events io/github/weavemc/weft/world/WorldEvents REDSTONE_TORCH_BURNOUT_AND_SMOKE_PARTICLES
constant world_events io/github/weavemc/weft/world/WorldEvents END_PORTAL_FRAME_FILL_AND_SMOKE_PARTICLES
constant world_events io/github/weavemc/weft/world/WorldEvents BLOCK_BREAK_SOUND_AND_PARTICLES
constant world_events io/github/weavemc/weft/world/WorldEvents SPLASH_POTION_BREAK_ONE
constant world_events io/github/weavemc/weft/world/WorldEvents SPLASH_POTION_BREAK_TWO
constant world_events io/github/weavemc/weft/world/WorldEvents ENDER_EYE_FALL
constant world_events io/github/weavemc/weft/world/WorldEvents ENDER_EYE_BREAK
constant world_events io/github/weavemc/weft/world/WorldEvents DRAGON_FIREBALL_BREAK
constant world_events io/github/weavemc/weft/world/WorldEvents END_GATEWAY_SPAWN
constant world_events io/github/weavemc/weft/world/WorldEvents SMOKE_PARTICLES
constant world_events io/github/weavemc/weft/world/WorldEvents BONEMEAL_PARTICLES
constant world_events io/github/weavemc/weft/world/WorldEvents EXPLOSION
constant world_events io/github/weavemc/weft/world/WorldEvents CLOUD

#WorldRenderer.processWorldEvent(PlayerEnetity, int, BlockPos, int)
target_method net/minecraft/class_761 method_8567 (Lnet/minecraft/class_1657;ILnet/minecraft/class_2338;I)V
param 1 world_events

#WorldAccess.syncWorldEvent(PlayerEnetity, int, BlockPos, int)
target_method net/minecraft/class_1936 method_8444 (Lnet/minecraft/class_1657;ILnet/minecraft/class_2338;I)V
param 1 world_events

#WorldAccess.syncWorldEvent(int, BlockPos, int)
target_method net/minecraft/class_1936 method_20290 (ILnet/minecraft/class_2338;I)V
param 0 world_events