File tree Expand file tree Collapse file tree
station-blocks-v0/src/main/java/net/modificationstation/stationapi/mixin/block Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11package net .modificationstation .stationapi .mixin .block ;
22
3+ import com .llamalad7 .mixinextras .injector .wrapoperation .Operation ;
4+ import com .llamalad7 .mixinextras .injector .wrapoperation .WrapOperation ;
35import net .minecraft .block .Block ;
46import net .modificationstation .stationapi .api .block .StationBlock ;
57import net .modificationstation .stationapi .api .util .Namespace ;
68import org .spongepowered .asm .mixin .Mixin ;
79import org .spongepowered .asm .mixin .Shadow ;
10+ import org .spongepowered .asm .mixin .injection .At ;
811
912@ Mixin (Block .class )
1013abstract class BlockMixin implements StationBlock {
@@ -14,4 +17,15 @@ abstract class BlockMixin implements StationBlock {
1417 public Block setTranslationKey (Namespace namespace , String translationKey ) {
1518 return setTranslationKey (namespace + "." + translationKey );
1619 }
20+
21+ @ WrapOperation (
22+ method = "getDroppedItemId" ,
23+ at = @ At (
24+ value = "FIELD" ,
25+ target = "Lnet/minecraft/block/Block;id:I"
26+ )
27+ )
28+ private int stationapi_returnCorrectItem (Block instance , Operation <Integer > original ) {
29+ return instance .asItem ().id ;
30+ }
1731}
You can’t perform that action at this time.
0 commit comments