mirror of
https://github.com/GTNewHorizons/CodeChickenCore.git
synced 2026-11-14 01:04:28 +00:00
Maybe more backwards compatible (#16)
* Maybe more backwards compatible
This commit is contained in:
1 parent
183e658bb4
commit
3740253590
14 files changed
+132
-103
No files matched your search
@@ -55,6 +55,9 @@ generateGradleTokenClass = codechicken.core.asm.Tags
|
||||
# Name of the token containing the project's current version to generate/replace.
|
||||
gradleTokenVersion = VERSION
|
||||
|
||||
# [DEPRECATED] Mod Group replacement token.
|
||||
gradleTokenGroupName =
|
||||
|
||||
# [DEPRECATED]
|
||||
# Multiple source files can be defined here by providing a comma-separated list: Class1.java,Class2.java,Class3.java
|
||||
# public static final String VERSION = "GRADLETOKEN_VERSION";
|
||||
|
||||
@@ -119,11 +119,9 @@ public class RedirectorTransformer implements IClassTransformer {
|
||||
changed = true;
|
||||
|
||||
}
|
||||
} else if (node.getOpcode() == Opcodes.INVOKESTATIC && node instanceof MethodInsnNode mNode) {
|
||||
if (redirectedMethods.contains(mNode.name) && mNode.owner.equals(RenderStateClass)) {
|
||||
mNode.name = mNode.name + "Static";
|
||||
changed = true;
|
||||
} else if (redirectedSimpleMethods.contains(mNode.name) && mNode.owner.equals(RenderStateClass)) {
|
||||
} else if (node instanceof MethodInsnNode mNode) {
|
||||
if (node.getOpcode() == Opcodes.INVOKESTATIC && redirectedSimpleMethods.contains(mNode.name)
|
||||
&& mNode.owner.equals(RenderStateClass)) {
|
||||
mn.instructions.insertBefore(
|
||||
mNode,
|
||||
new MethodInsnNode(
|
||||
@@ -132,8 +130,15 @@ public class RedirectorTransformer implements IClassTransformer {
|
||||
"instance",
|
||||
"()Lcodechicken/lib/render/CCRenderState;"));
|
||||
mNode.setOpcode(Opcodes.INVOKEVIRTUAL);
|
||||
mNode.name = mNode.name + "Instance";
|
||||
changed = true;
|
||||
}
|
||||
} else if (node.getOpcode() == Opcodes.INVOKEVIRTUAL && mNode.owner.equals(RenderStateClass)
|
||||
&& (redirectedSimpleMethods.contains(mNode.name)
|
||||
|| redirectedMethods.contains(mNode.name))) {
|
||||
// Handle mods that updated to previously new API
|
||||
mNode.name = mNode.name + "Instance";
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,15 +64,15 @@ public class Canvas9Seg {
|
||||
|
||||
public void draw(CCRenderState state, int x, int y, int w, int h) {
|
||||
CCRenderState.changeTexture(tex);
|
||||
state.reset();
|
||||
state.startDrawing();
|
||||
state.resetInstance();
|
||||
state.startDrawingInstance();
|
||||
|
||||
int[] sw = new int[] { x, x + seg_w[0], x + w - seg_w[2], x + w };
|
||||
int[] sh = new int[] { y, y + seg_h[0], y + h - seg_h[2], y + h };
|
||||
|
||||
for (int seg = 0; seg < 9; seg++) drawSeg(sw, sh, seg);
|
||||
|
||||
state.draw();
|
||||
state.drawInstance();
|
||||
}
|
||||
|
||||
public void draw(int x, int y, int w, int h) {
|
||||
|
||||
@@ -128,8 +128,8 @@ public class LightMatrix implements CCRenderState.IVertexOperation {
|
||||
float[] a = ao(lc.side);
|
||||
float f = (a[0] * lc.fa + a[1] * lc.fb + a[2] * lc.fc + a[3] * lc.fd);
|
||||
int[] b = brightness(lc.side);
|
||||
state.setColour(ColourRGBA.multiplyC(state.colour, f));
|
||||
state.setBrightness((int) (b[0] * lc.fa + b[1] * lc.fb + b[2] * lc.fc + b[3] * lc.fd) & 0xFF00FF);
|
||||
state.setColourInstance(ColourRGBA.multiplyC(state.colour, f));
|
||||
state.setBrightnessInstance((int) (b[0] * lc.fa + b[1] * lc.fb + b[2] * lc.fc + b[3] * lc.fd) & 0xFF00FF);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -88,7 +88,7 @@ public class LightModel implements CCRenderState.IVertexOperation {
|
||||
|
||||
@Override
|
||||
public void operate(CCRenderState state) {
|
||||
state.setColour(apply(state.colour, state.normal));
|
||||
state.setColourInstance(apply(state.colour, state.normal));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -47,7 +47,7 @@ public class PlanarLightMatrix extends PlanarLightModel {
|
||||
@Override
|
||||
public void operate(CCRenderState state) {
|
||||
super.operate(state);
|
||||
state.setBrightness(brightness(state.side));
|
||||
state.setBrightnessInstance(brightness(state.side));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -27,7 +27,7 @@ public class PlanarLightModel implements CCRenderState.IVertexOperation {
|
||||
|
||||
@Override
|
||||
public void operate(CCRenderState state) {
|
||||
state.setColour(ColourRGBA.multiply(state.colour, colours[state.side]));
|
||||
state.setColourInstance(ColourRGBA.multiply(state.colour, colours[state.side]));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -46,7 +46,7 @@ public class SimpleBrightnessModel implements CCRenderState.IVertexOperation {
|
||||
|
||||
@Override
|
||||
public void operate(CCRenderState state) {
|
||||
state.setBrightness(sample(state.side));
|
||||
state.setBrightnessInstance(sample(state.side));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -154,7 +154,7 @@ public class BlockRenderer {
|
||||
|
||||
// public static void renderFullBlock(int sideMask) {
|
||||
public static void renderFullBlock(CCRenderState state, int sideMask) {
|
||||
state.setModel(fullBlock);
|
||||
state.setModelInstance(fullBlock);
|
||||
renderFaces(state, sideMask);
|
||||
}
|
||||
|
||||
@@ -171,8 +171,8 @@ public class BlockRenderer {
|
||||
public static void renderFaces(CCRenderState state, int sideMask) {
|
||||
if (sideMask == 0x3F) return;
|
||||
for (int s = 0; s < 6; s++) if ((sideMask & 1 << s) == 0) {
|
||||
state.setVertexRange(s * 4, (s + 1) * 4);
|
||||
state.render();
|
||||
state.setVertexRangeInstance(s * 4, (s + 1) * 4);
|
||||
state.renderInstance();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -191,10 +191,10 @@ public class BlockRenderer {
|
||||
public static void renderCuboid(CCRenderState state, Cuboid6 bounds, int sideMask) {
|
||||
if (sideMask == 0x3F) return;
|
||||
|
||||
state.setModel(face);
|
||||
state.setModelInstance(face);
|
||||
for (int s = 0; s < 6; s++) if ((sideMask & 1 << s) == 0) {
|
||||
face.loadCuboidFace(bounds, s);
|
||||
state.render();
|
||||
state.renderInstance();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -467,8 +467,8 @@ public class CCModel implements CCRenderState.IVertexSource, Copyable<CCModel> {
|
||||
* @param ops Operations to apply
|
||||
*/
|
||||
public void render(CCRenderState state, int start, int end, CCRenderState.IVertexOperation... ops) {
|
||||
state.setPipeline(this, start, end, ops);
|
||||
state.render();
|
||||
state.setPipelineInstance(this, start, end, ops);
|
||||
state.renderInstance();
|
||||
}
|
||||
|
||||
public void render(int start, int end, CCRenderState.IVertexOperation... ops) {
|
||||
|
||||
@@ -49,7 +49,7 @@ public class CCRenderPipeline {
|
||||
|
||||
public void render() {
|
||||
rebuild();
|
||||
renderState.render();
|
||||
renderState.renderInstance();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -193,8 +193,8 @@ public class CCRenderState {
|
||||
|
||||
@Override
|
||||
public void operate(CCRenderState state) {
|
||||
if (normalRef != null) state.setNormal(normalRef[state.vertexIndex]);
|
||||
else state.setNormal(Rotation.axes[state.side]);
|
||||
if (normalRef != null) state.setNormalInstance(normalRef[state.vertexIndex]);
|
||||
else state.setNormalInstance(Rotation.axes[state.side]);
|
||||
}
|
||||
};
|
||||
public static VertexAttribute<int[]> colourAttrib = new VertexAttribute<>() {
|
||||
@@ -214,8 +214,9 @@ public class CCRenderState {
|
||||
|
||||
@Override
|
||||
public void operate(CCRenderState state) {
|
||||
if (colourRef != null) state.setColour(ColourRGBA.multiply(state.baseColour, colourRef[state.vertexIndex]));
|
||||
else state.setColour(state.baseColour);
|
||||
if (colourRef != null)
|
||||
state.setColourInstance(ColourRGBA.multiply(state.baseColour, colourRef[state.vertexIndex]));
|
||||
else state.setColourInstance(state.baseColour);
|
||||
}
|
||||
};
|
||||
public static VertexAttribute<int[]> lightingAttrib = new VertexAttribute<>() {
|
||||
@@ -241,7 +242,7 @@ public class CCRenderState {
|
||||
|
||||
@Override
|
||||
public void operate(CCRenderState state) {
|
||||
state.setColour(ColourRGBA.multiply(state.colour, colourRef[state.vertexIndex]));
|
||||
state.setColourInstance(ColourRGBA.multiply(state.colour, colourRef[state.vertexIndex]));
|
||||
}
|
||||
};
|
||||
public static VertexAttribute<int[]> sideAttrib = new VertexAttribute<>() {
|
||||
@@ -326,11 +327,15 @@ public class CCRenderState {
|
||||
public boolean hasBrightness;
|
||||
public int brightness;
|
||||
|
||||
// attrute storage
|
||||
// attribute storage
|
||||
public int side;
|
||||
public LC lc = new LC();
|
||||
|
||||
public void reset() {
|
||||
public static void reset() {
|
||||
instance().resetInstance();
|
||||
}
|
||||
|
||||
public void resetInstance() {
|
||||
model = null;
|
||||
pipeline.reset();
|
||||
useNormals = hasNormal = hasBrightness = hasColour = false;
|
||||
@@ -338,27 +343,27 @@ public class CCRenderState {
|
||||
baseColour = alphaOverride = -1;
|
||||
}
|
||||
|
||||
public void setPipeline(IVertexOperation... ops) {
|
||||
public void setPipelineInstance(IVertexOperation... ops) {
|
||||
pipeline.setPipeline(ops);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static void setPipelineStatic(IVertexOperation... ops) {
|
||||
instance().setPipeline(ops);
|
||||
public static void setPipeline(IVertexOperation... ops) {
|
||||
instance().setPipelineInstance(ops);
|
||||
}
|
||||
|
||||
public void setPipeline(IVertexSource model, int start, int end, IVertexOperation... ops) {
|
||||
public void setPipelineInstance(IVertexSource model, int start, int end, IVertexOperation... ops) {
|
||||
pipeline.reset();
|
||||
setModel(model, start, end);
|
||||
setModelInstance(model, start, end);
|
||||
pipeline.setPipeline(ops);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static void setPipelineStatic(IVertexSource model, int start, int end, IVertexOperation... ops) {
|
||||
instance().setPipeline(model, start, end, ops);
|
||||
public static void setPipeline(IVertexSource model, int start, int end, IVertexOperation... ops) {
|
||||
instance().setPipelineInstance(model, start, end, ops);
|
||||
}
|
||||
|
||||
public void bindModel(IVertexSource model) {
|
||||
public void bindModelInstance(IVertexSource model) {
|
||||
if (this.model != model) {
|
||||
this.model = model;
|
||||
pipeline.rebuild();
|
||||
@@ -366,74 +371,74 @@ public class CCRenderState {
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static void bindModelStatic(IVertexSource model) {
|
||||
instance().bindModel(model);
|
||||
public static void bindModel(IVertexSource model) {
|
||||
instance().bindModelInstance(model);
|
||||
}
|
||||
|
||||
public void setModel(IVertexSource source) {
|
||||
setModel(source, 0, source.getVertices().length);
|
||||
public void setModelInstance(IVertexSource source) {
|
||||
setModelInstance(source, 0, source.getVertices().length);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static void setModelStatic(IVertexSource source) {
|
||||
instance().setModel(source);
|
||||
public static void setModel(IVertexSource source) {
|
||||
instance().setModelInstance(source);
|
||||
}
|
||||
|
||||
public void setModel(IVertexSource source, int start, int end) {
|
||||
bindModel(source);
|
||||
setVertexRange(start, end);
|
||||
public void setModelInstance(IVertexSource source, int start, int end) {
|
||||
bindModelInstance(source);
|
||||
setVertexRangeInstance(start, end);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static void setModelStatic(IVertexSource source, int start, int end) {
|
||||
instance().setModel(source, start, end);
|
||||
public static void setModel(IVertexSource source, int start, int end) {
|
||||
instance().setModelInstance(source, start, end);
|
||||
}
|
||||
|
||||
public void setVertexRange(int start, int end) {
|
||||
public void setVertexRangeInstance(int start, int end) {
|
||||
firstVertexIndex = start;
|
||||
lastVertexIndex = end;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static void setVertexRangeStatic(int start, int end) {
|
||||
instance().setVertexRange(start, end);
|
||||
public static void setVertexRange(int start, int end) {
|
||||
instance().setVertexRangeInstance(start, end);
|
||||
}
|
||||
|
||||
public void render(IVertexOperation... ops) {
|
||||
setPipeline(ops);
|
||||
render();
|
||||
public void renderInstance(IVertexOperation... ops) {
|
||||
setPipelineInstance(ops);
|
||||
renderInstance();
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static void renderStatic(IVertexOperation... ops) {
|
||||
instance().render(ops);
|
||||
public static void render(IVertexOperation... ops) {
|
||||
instance().renderInstance(ops);
|
||||
}
|
||||
|
||||
public void render() {
|
||||
public void renderInstance() {
|
||||
Vertex5[] verts = model.getVertices();
|
||||
for (vertexIndex = firstVertexIndex; vertexIndex < lastVertexIndex; vertexIndex++) {
|
||||
model.prepareVertex(this);
|
||||
vert.set(verts[vertexIndex]);
|
||||
runPipeline();
|
||||
writeVert();
|
||||
runPipelineInstance();
|
||||
writeVertInstance();
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static void renderStatic() {
|
||||
instance().render();
|
||||
public static void render() {
|
||||
instance().renderInstance();
|
||||
}
|
||||
|
||||
public void runPipeline() {
|
||||
public void runPipelineInstance() {
|
||||
pipeline.operate();
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static void runPipelineStatic() {
|
||||
instance().runPipeline();
|
||||
public static void runPipeline() {
|
||||
instance().runPipelineInstance();
|
||||
}
|
||||
|
||||
public void writeVert() {
|
||||
public void writeVertInstance() {
|
||||
if (hasNormal) Tessellator.instance.setNormal((float) normal.x, (float) normal.y, (float) normal.z);
|
||||
if (hasColour) Tessellator.instance.setColorRGBA(
|
||||
colour >>> 24,
|
||||
@@ -445,71 +450,83 @@ public class CCRenderState {
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static void writeVertStatic() {
|
||||
instance().writeVert();
|
||||
public static void writeVert() {
|
||||
instance().writeVertInstance();
|
||||
}
|
||||
|
||||
public void setNormal(double x, double y, double z) {
|
||||
public void setNormalInstance(double x, double y, double z) {
|
||||
hasNormal = true;
|
||||
normal.set(x, y, z);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static void setNormalStatic(double x, double y, double z) {
|
||||
instance().setNormal(x, y, z);
|
||||
public static void setNormal(double x, double y, double z) {
|
||||
instance().setNormalInstance(x, y, z);
|
||||
}
|
||||
|
||||
public void setNormal(Vector3 n) {
|
||||
public void setNormalInstance(Vector3 n) {
|
||||
hasNormal = true;
|
||||
normal.set(n);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static void setNormalStatic(Vector3 n) {
|
||||
instance().setNormal(n);
|
||||
public static void setNormal(Vector3 n) {
|
||||
instance().setNormalInstance(n);
|
||||
}
|
||||
|
||||
public void setColour(int c) {
|
||||
public void setColourInstance(int c) {
|
||||
hasColour = true;
|
||||
colour = c;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static void setColourStatic(int c) {
|
||||
instance().setColour(c);
|
||||
public static void setColour(int c) {
|
||||
instance().setColourInstance(c);
|
||||
}
|
||||
|
||||
public void setBrightness(int b) {
|
||||
public void setBrightnessInstance(int b) {
|
||||
hasBrightness = true;
|
||||
brightness = b;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static void setBrightnessStatic(int b) {
|
||||
instance().setBrightness(b);
|
||||
public static void setBrightness(int b) {
|
||||
instance().setBrightnessInstance(b);
|
||||
}
|
||||
|
||||
public void setBrightness(IBlockAccess world, int x, int y, int z) {
|
||||
setBrightness(world.getBlock(x, y, z).getMixedBrightnessForBlock(world, x, y, z));
|
||||
public void setBrightnessInstance(IBlockAccess world, int x, int y, int z) {
|
||||
setBrightnessInstance(world.getBlock(x, y, z).getMixedBrightnessForBlock(world, x, y, z));
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static void setBrightnessStatic(IBlockAccess world, int x, int y, int z) {
|
||||
instance().setBrightness(world, x, y, z);
|
||||
public static void setBrightness(IBlockAccess world, int x, int y, int z) {
|
||||
instance().setBrightnessInstance(world, x, y, z);
|
||||
}
|
||||
|
||||
public void pullLightmap() {
|
||||
setBrightness((int) OpenGlHelper.lastBrightnessY << 16 | (int) OpenGlHelper.lastBrightnessX);
|
||||
public static void pullLightMap() {
|
||||
instance().pullLightmapInstance();
|
||||
}
|
||||
|
||||
public void pushLightmap() {
|
||||
public void pullLightmapInstance() {
|
||||
setBrightnessInstance((int) OpenGlHelper.lastBrightnessY << 16 | (int) OpenGlHelper.lastBrightnessX);
|
||||
}
|
||||
|
||||
public static void pushLightmap() {
|
||||
instance().pushLightmapInstance();
|
||||
}
|
||||
|
||||
public void pushLightmapInstance() {
|
||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, brightness & 0xFFFF, brightness >>> 16);
|
||||
}
|
||||
|
||||
/**
|
||||
* Compact helper for setting dynamic rendering context. Uses normals and doesn't compute lighting
|
||||
*/
|
||||
public void setDynamic() {
|
||||
public static void setDynamic() {
|
||||
instance().setDynamicInstance();
|
||||
}
|
||||
|
||||
public void setDynamicInstance() {
|
||||
useNormals = true;
|
||||
computeLighting = false;
|
||||
}
|
||||
@@ -522,16 +539,16 @@ public class CCRenderState {
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(texture);
|
||||
}
|
||||
|
||||
public void startDrawing() {
|
||||
startDrawing(7);
|
||||
public void startDrawingInstance() {
|
||||
startDrawingInstance(7);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static void startDrawingStatic() {
|
||||
instance().startDrawing();
|
||||
public static void startDrawing() {
|
||||
instance().startDrawingInstance();
|
||||
}
|
||||
|
||||
public void startDrawing(int mode) {
|
||||
public void startDrawingInstance(int mode) {
|
||||
Tessellator.instance.startDrawing(mode);
|
||||
if (hasColour) Tessellator.instance.setColorRGBA(
|
||||
colour >>> 24,
|
||||
@@ -542,11 +559,15 @@ public class CCRenderState {
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static void startDrawingStatic(int mode) {
|
||||
instance().startDrawing(mode);
|
||||
public static void startDrawing(int mode) {
|
||||
instance().startDrawingInstance(mode);
|
||||
}
|
||||
|
||||
public void draw() {
|
||||
public static void draw() {
|
||||
Tessellator.instance.draw();
|
||||
}
|
||||
|
||||
public void drawInstance() {
|
||||
Tessellator.instance.draw();
|
||||
}
|
||||
}
|
||||
@@ -23,7 +23,7 @@ public class ColourMultiplier implements CCRenderState.IVertexOperation {
|
||||
@Override
|
||||
public boolean load(CCRenderState state) {
|
||||
if (colour == -1) {
|
||||
state.setColour(-1);
|
||||
state.setColourInstance(-1);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ public class ColourMultiplier implements CCRenderState.IVertexOperation {
|
||||
|
||||
@Override
|
||||
public void operate(CCRenderState state) {
|
||||
state.setColour(ColourRGBA.multiply(state.colour, colour));
|
||||
state.setColourInstance(ColourRGBA.multiply(state.colour, colour));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -259,7 +259,7 @@ public class RenderUtils {
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
Fluid fluid = stack.getFluid();
|
||||
state.setColour(fluid.getColor(stack) << 8 | alpha);
|
||||
state.setColourInstance(fluid.getColor(stack) << 8 | alpha);
|
||||
TextureUtils.bindAtlas(fluid.getSpriteNumber());
|
||||
return TextureUtils.safeIcon(fluid.getIcon(stack));
|
||||
}
|
||||
@@ -300,9 +300,9 @@ public class RenderUtils {
|
||||
else bound.max.y = bound.min.y + (bound.max.y - bound.min.y) * density;
|
||||
|
||||
IIcon tex = prepareFluidRender(state, stack, alpha);
|
||||
state.startDrawing();
|
||||
state.startDrawingInstance();
|
||||
renderFluidCuboid(state, bound, tex, res);
|
||||
state.draw();
|
||||
state.drawInstance();
|
||||
postFluidRender();
|
||||
}
|
||||
|
||||
@@ -323,14 +323,14 @@ public class RenderUtils {
|
||||
}
|
||||
|
||||
IIcon tex = prepareFluidRender(state, stack, alpha);
|
||||
state.startDrawing();
|
||||
state.startDrawingInstance();
|
||||
renderFluidQuad(
|
||||
new Vector3(rect.x, rect.y + rect.h, 0),
|
||||
new Vector3(rect.w, 0, 0),
|
||||
new Vector3(0, -rect.h, 0),
|
||||
tex,
|
||||
res);
|
||||
state.draw();
|
||||
state.drawInstance();
|
||||
postFluidRender();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user