Added some comments to easily check what I changed from the straight copied files

This commit is contained in:
Buuz135
2021-09-12 23:44:04 +02:00
parent 32f88fbd37
commit 5b26057dc1
3 changed files with 4 additions and 4 deletions

View File

@@ -149,7 +149,7 @@ public class CoverManager {
BlockState state = getBlockState(item);
return block != null && state != null && ((isModelSupported(state) && !block.ticksRandomly(state) && !block.hasTileEntity(state) && !state.isTransparent())); //Removed is top solid as it needs world param
return block != null && state != null && ((isModelSupported(state) && !block.ticksRandomly(state) && !block.hasTileEntity(state) && !state.isTransparent())); //Changed from 1.12: to use 1.16 methods
}
private static boolean isModelSupported(BlockState state) {

View File

@@ -73,7 +73,7 @@ public class CoverItem extends Item {
@Override
public void fillItemGroup(ItemGroup group, NonNullList<ItemStack> items) {
if (this.isInGroup(group)) {
if (this.isInGroup(group)) { //Changed from 1.12: to use 1.16 configs
if (!RS.CLIENT_CONFIG.getCover().showAllRecipesInJEI()) {
ItemStack stack = new ItemStack(this);

View File

@@ -137,7 +137,7 @@ public class BakedModelCableCover extends DelegateBakedModel{
}
}
HashMap<Direction, TextureAtlasSprite> spriteCache = new HashMap<>();
HashMap<Direction, TextureAtlasSprite> spriteCache = new HashMap<>(); //Changed from 1.12: to improve sprite getting for each side
quads.addAll(new CubeBuilder().from(from.getX(), from.getY(), from.getZ()).to(to.getX(), to.getY(), to.getZ()).addFaces(face -> new CubeBuilder.Face(face, spriteCache.computeIfAbsent(face, direction -> RenderUtils.getSprite(Minecraft.getInstance().getBlockRendererDispatcher().getModelForState(state), state, direction, random)))).bake());
if (handle) {
@@ -197,7 +197,7 @@ public class BakedModelCableCover extends DelegateBakedModel{
from.setZ(16 - size);
to.setZ(16);
}
HashMap<Direction, TextureAtlasSprite> spriteCache = new HashMap<>();
HashMap<Direction, TextureAtlasSprite> spriteCache = new HashMap<>(); //Changed from 1.12: to improve sprite getting for each side
quads.addAll(new CubeBuilder()
.from(from.getX(), from.getY(), from.getZ())
.to(to.getX(), to.getY(), to.getZ())