Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add renderTentPlacement option
Will not render the tent - keeps the existing invalid overlay
  • Loading branch information
hugeblank committed Jun 1, 2021
commit cc9a2d166e238a9c2efc36736a4b66d3aacbe5a9
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
public class CampanionConfig {

public boolean renderTentContents = true;
public boolean renderTentPlacement = true;

public CampanionConfig() {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import com.terraformersmc.campanion.client.renderer.item.BuiltTentItemRenderer;
import com.terraformersmc.campanion.client.util.TentPreviewImmediate;
import com.terraformersmc.campanion.config.CampanionConfigManager;
import com.terraformersmc.campanion.item.PlaceableTentItem;
import com.terraformersmc.campanion.item.TentBagItem;
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
import net.minecraft.block.Material;
Expand Down Expand Up @@ -58,7 +58,9 @@ public void render(MatrixStack matrices, float tickDelta, long limitTime, boolea

List<BlockPos> list = tent.getErrorPosition(this.client.world, placePos, stack);
TentPreviewImmediate.STORAGE.setApplyModifiers(!list.isEmpty());
BuiltTentItemRenderer.INSTANCE.render(stack, matrices, placePos, immediate, -1);
if (CampanionConfigManager.getConfig().renderTentPlacement) {
BuiltTentItemRenderer.INSTANCE.render(stack, matrices, placePos, immediate, -1);
}

for (BlockPos pos : list) {
matrices.push();
Expand Down