mirror of
https://github.com/FabricMC/fabric.git
synced 2024-11-14 19:25:23 -05:00
19w13a
EntityType's can now say if the entity is immune to fire, the builder has been update to support this. Mainly mapping updates
This commit is contained in:
parent
163d37cd42
commit
240d8ab775
6 changed files with 19 additions and 13 deletions
|
@ -26,8 +26,8 @@ targetCompatibility = 1.8
|
|||
|
||||
archivesBaseName = "fabric"
|
||||
|
||||
def baseVersion = "0.2.5"
|
||||
def mcVersion = "19w12b"
|
||||
def baseVersion = "0.2.6"
|
||||
def mcVersion = "19w13a"
|
||||
|
||||
def ENV = System.getenv()
|
||||
version = baseVersion + "." + (ENV.BUILD_NUMBER ?: "local")
|
||||
|
@ -38,7 +38,7 @@ minecraft {
|
|||
|
||||
dependencies {
|
||||
minecraft "com.mojang:minecraft:$mcVersion"
|
||||
mappings "net.fabricmc:yarn:$mcVersion.1"
|
||||
mappings "net.fabricmc:yarn:$mcVersion.2"
|
||||
modCompile "net.fabricmc:fabric-loader:0.3.7.109"
|
||||
}
|
||||
|
||||
|
|
|
@ -42,6 +42,7 @@ public class FabricEntityTypeBuilder<T extends Entity> {
|
|||
private int trackingDistance = -1;
|
||||
private int updateIntervalTicks = -1;
|
||||
private boolean alwaysUpdateVelocity = true;
|
||||
private boolean immunteToFire = false;
|
||||
private EntitySize size = EntitySize.resizeable(-1.0f, -1.0f);
|
||||
|
||||
protected FabricEntityTypeBuilder(EntityCategory category, EntityType.class_4049<T> function) {
|
||||
|
@ -75,6 +76,11 @@ public class FabricEntityTypeBuilder<T extends Entity> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public FabricEntityTypeBuilder<T> setImmuneToFire() {
|
||||
this.immunteToFire = true;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link FabricEntityTypeBuilder#size(EntitySize)}
|
||||
*/
|
||||
|
@ -106,7 +112,7 @@ public class FabricEntityTypeBuilder<T extends Entity> {
|
|||
// TODO: Flesh out once modded datafixers exist.
|
||||
}
|
||||
|
||||
EntityType<T> type = new EntityType<T>(this.function, this.category, this.saveable, this.summonable, null, size);
|
||||
EntityType<T> type = new EntityType<T>(this.function, this.category, this.saveable, this.summonable, this.immunteToFire, null, size);
|
||||
if (trackingDistance != -1) {
|
||||
EntityTrackingRegistry.INSTANCE.register(type, trackingDistance, updateIntervalTicks, alwaysUpdateVelocity);
|
||||
}
|
||||
|
|
|
@ -62,10 +62,10 @@ public class FabricCreativeGuiComponents {
|
|||
minecraftClient.getTextureManager().bindTexture(BUTTON_TEX);
|
||||
GlStateManager.disableLighting();
|
||||
GlStateManager.color4f(1F, 1F, 1F, 1F);
|
||||
this.drawTexturedRect(this.x, this.y, (type == Type.NEXT ? 12 : 0), (active ? 0 : 12), 12, 12);
|
||||
this.blit(this.x, this.y, (type == Type.NEXT ? 12 : 0), (active ? 0 : 12), 12, 12);
|
||||
|
||||
if(mouseX >= this.x && mouseY >= this.y && mouseX < this.x + this.width && mouseY < this.y + this.height){
|
||||
gui.drawTooltip(I18n.translate("fabric.gui.creativeTabPage", extensions.fabric_currentPage() + 1, ((ItemGroup.GROUPS.length - 12) / 9) + 2), mouseX, mouseY);
|
||||
gui.renderTooltip(I18n.translate("fabric.gui.creativeTabPage", extensions.fabric_currentPage() + 1, ((ItemGroup.GROUPS.length - 12) / 9) + 2), mouseX, mouseY);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -110,8 +110,8 @@ public abstract class MixinCreativePlayerInventoryGui extends AbstractPlayerInve
|
|||
}
|
||||
}
|
||||
|
||||
@Inject(method = "onInitialized", at = @At("RETURN"))
|
||||
private void onInitialized(CallbackInfo info) {
|
||||
@Inject(method = "init", at = @At("RETURN"))
|
||||
private void init(CallbackInfo info) {
|
||||
fabric_updateSelection();
|
||||
|
||||
int xpos = left + 170;
|
||||
|
|
|
@ -66,7 +66,7 @@ public abstract class MixinMinecraftClient {
|
|||
// I don't like that we clone vanilla logic here, but it's our best bet for now.
|
||||
PlayerInventory playerInventory = client.player.inventory;
|
||||
|
||||
if (client.player.abilities.creativeMode && Screen.isControlPressed() && client.hitResult.getType() == HitResult.Type.BLOCK) {
|
||||
if (client.player.abilities.creativeMode && Screen.hasControlDown() && client.hitResult.getType() == HitResult.Type.BLOCK) {
|
||||
BlockEntity be = client.world.getBlockEntity(((BlockHitResult) client.hitResult).getBlockPos());
|
||||
if (be != null) {
|
||||
stack = addBlockEntityNbt(stack, be);
|
||||
|
|
|
@ -54,7 +54,7 @@ public class ContainerModClient implements ClientModInitializer {
|
|||
|
||||
@Override
|
||||
protected void drawBackground(float v, int i, int i1) {
|
||||
fontRenderer.draw(pos.toString(), width / 2, height / 2, 0);
|
||||
font.draw(pos.toString(), width / 2, height / 2, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -71,7 +71,7 @@ public class ContainerModClient implements ClientModInitializer {
|
|||
|
||||
@Override
|
||||
protected void drawBackground(float v, int i, int i1) {
|
||||
fontRenderer.draw(pos.toString(), width / 2, height / 2, 0);
|
||||
font.draw(pos.toString(), width / 2, height / 2, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -87,8 +87,8 @@ public class ContainerModClient implements ClientModInitializer {
|
|||
@Override
|
||||
protected void drawBackground(float v, int i, int i1) {
|
||||
GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
client.getTextureManager().bindTexture(BG_TEXTURE);
|
||||
this.drawTexturedRect(left, top, 0, 0, width, height);
|
||||
minecraft.getTextureManager().bindTexture(BG_TEXTURE);
|
||||
this.blit(left, top, 0, 0, width, height);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue