Skip to content

Commit 55ca929

Browse files
committed
Backport to 1.21.5
1 parent d448ae1 commit 55ca929

File tree

2 files changed

+10
-12
lines changed

2 files changed

+10
-12
lines changed

src/client/java/io/github/openbagtwo/lighterend/datagen/BlockTagProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ protected void configure(RegistryWrapper.WrapperLookup lookup) {
144144
LighterEndBlocks.AGAVE,
145145
LighterEndBlocks.AGAVE_BULB
146146
);
147-
valueLookupBuilder(BlockTags.FLOWER_POTS).add(
147+
getOrCreateTagBuilder(BlockTags.FLOWER_POTS).add(
148148
LighterEndBlocks.POTTED_TENANEA_SAPLING,
149149
LighterEndBlocks.POTTED_UMBRELLA_SAPLING,
150150
LighterEndBlocks.POTTED_GLOWSHROOM_SAPLING

src/main/java/io/github/openbagtwo/lighterend/mobs/GlossyMooshroom.java

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,11 @@
3030
import net.minecraft.item.ItemStack;
3131
import net.minecraft.item.ItemUsage;
3232
import net.minecraft.item.Items;
33+
import net.minecraft.nbt.NbtCompound;
3334
import net.minecraft.particle.ParticleTypes;
3435
import net.minecraft.server.world.ServerWorld;
3536
import net.minecraft.sound.SoundCategory;
3637
import net.minecraft.sound.SoundEvents;
37-
import net.minecraft.storage.ReadView;
38-
import net.minecraft.storage.WriteView;
3938
import net.minecraft.util.ActionResult;
4039
import net.minecraft.util.Hand;
4140
import net.minecraft.util.math.BlockPos;
@@ -162,20 +161,19 @@ private void setSheared(boolean sheared) {
162161
}
163162

164163
@Override
165-
protected void writeCustomData(WriteView view) {
166-
super.writeCustomData(view);
167-
view.putInt("Variant", this.getVariant());
168-
view.putBoolean("Sheared", this.isSheared());
164+
public void writeCustomDataToNbt(NbtCompound nbt) {
165+
super.writeCustomDataToNbt(nbt);
166+
nbt.putInt("Variant", this.getVariant());
167+
nbt.putBoolean("Sheared", this.isSheared());
169168
}
170169

171170
@Override
172-
protected void readCustomData(ReadView view) {
173-
super.readCustomData(view);
174-
this.setVariant(view.getInt("Variant", 0));
175-
this.setSheared(view.getBoolean("Sheared", false));
171+
public void readCustomDataFromNbt(NbtCompound nbt) {
172+
super.readCustomDataFromNbt(nbt);
173+
this.setVariant(nbt.getInt("Variant", 0));
174+
this.setSheared(nbt.getBoolean("Sheared", false));
176175
}
177176

178-
179177
private void setVariant(int variant) {
180178
this.dataTracker.set(VARIANT, variant);
181179
}

0 commit comments

Comments
 (0)