You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: common/src/main/java/generations/gg/generations/core/generationscore/common/world/level/block/GenerationsDecorationBlocks.kt
Copy file name to clipboardExpand all lines: common/src/main/java/generations/gg/generations/core/generationscore/common/world/level/block/entities/VendingMachineBlock.java
Copy file name to clipboardExpand all lines: common/src/main/java/generations/gg/generations/core/generationscore/common/world/level/block/utilityblocks/DyeableBlock.kt
@@ -113,11 +120,11 @@ abstract class DyeableBlock<T : ModelProvidingBlockEntity, V : DyeableBlock<T, V
113
120
}
114
121
115
122
fungetItemFromDyeColor(color:DyeColor): Item {
116
-
return getBlockFromDyeColor(color)!!.asItem()
123
+
return getBlockFromDyeColor(color).asItem()
117
124
}
118
125
119
-
fungetBlockFromDyeColor(color:DyeColor): V {
120
-
return function[color]!!.get()
126
+
fungetBlockFromDyeColor(color:DyeColor): Block {
127
+
return function[color]!!.value()
121
128
}
122
129
123
130
funtryDyeColor(
@@ -147,9 +154,9 @@ abstract class DyeableBlock<T : ModelProvidingBlockEntity, V : DyeableBlock<T, V
147
154
148
155
if (!player.isCreative) heldItem.shrink(1)
149
156
150
-
val newBlock = getBlockFromDyeColor(dyeColor)
157
+
val newBlock = getBlockFromDyeColor(dyeColor).instanceOrNull<DyeableBlock<*, *>>() ?:returnfalse//TODO: This is a stop gap due to codec(). Yea its that expansive.
151
158
152
-
val defaultState = newBlock!!.defaultBlockState().setValue(FACING, baseState.getValue(FACING))
0 commit comments