1 package com.irtimaled.bbor.client.models;
3 import com.irtimaled.bbor.client.ClientRenderer;
4 import com.irtimaled.bbor.client.config.ColorHelper;
5 import com.irtimaled.bbor.client.config.HexColor;
6 import com.irtimaled.bbor.client.config.Setting;
7 import com.irtimaled.bbor.client.renderers.AbstractRenderer;
8 import com.irtimaled.bbor.client.renderers.FlowerForestRenderer;
9 import com.irtimaled.bbor.common.BoundingBoxType;
10 import com.irtimaled.bbor.common.models.AbstractBoundingBox;
11 import com.irtimaled.bbor.common.models.Coords;
15 public class BoundingBoxFlowerForest extends AbstractBoundingBox {
16 private static final AbstractRenderer<BoundingBoxFlowerForest> RENDERER = ClientRenderer.registerRenderer(BoundingBoxFlowerForest.class, new FlowerForestRenderer());
18 private final Coords coords;
19 private final Setting<HexColor> colorSetting;
21 public BoundingBoxFlowerForest(Coords coords, Setting<HexColor> colorSetting) {
22 super(BoundingBoxType.FlowerForest);
24 this.colorSetting = colorSetting;
28 public Boolean intersectsBounds(int minX, int minZ, int maxX, int maxZ) {
29 return coords.getX() >= minX && coords.getZ() >= minZ && coords.getX() <= maxX && coords.getZ() <= maxZ;
32 public Color getColor() {
33 return ColorHelper.getColor(colorSetting);
36 public Coords getCoords() {
41 public double getDistanceX(double x) {
42 return x - coords.getX();
46 public double getDistanceY(double y) {
47 return y - coords.getY();
51 public double getDistanceZ(double z) {
52 return z - coords.getZ();
56 public AbstractRenderer<?> getRenderer() {