Compare commits

..

No commits in common. "73bf27bdda9a9bf73e90537754ccb978cd6264a7" and "402caaf54949fc77592cdc98e892887c44c93cd9" have entirely different histories.

2 changed files with 2 additions and 8 deletions

View File

@ -9,7 +9,7 @@ loader_version=0.15.11
# Mod Properties # Mod Properties
modrinth_id = jCpoCBpn modrinth_id = jCpoCBpn
mod_version = 1.6.3 mod_version = 1.6.2
maven_group = fr.adrien1106 maven_group = fr.adrien1106
archives_base_name = ReFramed archives_base_name = ReFramed
mod_id = reframed mod_id = reframed

View File

@ -2,7 +2,6 @@ package fr.adrien1106.reframed.util.mixin;
import fr.adrien1106.reframed.util.blocks.ThemeableBlockEntity; import fr.adrien1106.reframed.util.blocks.ThemeableBlockEntity;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
import net.minecraft.block.entity.BlockEntity; import net.minecraft.block.entity.BlockEntity;
import net.minecraft.nbt.NbtCompound; import net.minecraft.nbt.NbtCompound;
import net.minecraft.nbt.NbtHelper; import net.minecraft.nbt.NbtHelper;
@ -30,17 +29,12 @@ public class ThemedBlockEntity extends BlockEntity implements ThemeableBlockEnti
@Override @Override
public BlockState getTheme(int i) { public BlockState getTheme(int i) {
if (i > themes.size())
return Blocks.AIR.getDefaultState();
return themes.get(Math.max(0, i-1)); return themes.get(Math.max(0, i-1));
} }
@Override @Override
public void setTheme(BlockState state, int i) { public void setTheme(BlockState state, int i) {
if (i > themes.size()) themes.set(Math.max(0, i-1), state);
themes.add(state);
else
themes.set(Math.max(0, i-1), state);
} }
@Override @Override