Skip to content

Commit

Permalink
Add renderTentPlacement option
Browse files Browse the repository at this point in the history
Will not render the tent - keeps the existing invalid overlay
  • Loading branch information
hugeblank committed Jun 1, 2021
1 parent fd78c09 commit cc9a2d1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
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

0 comments on commit cc9a2d1

Please sign in to comment.